Properly handle load when QPixmap is null

This commit is contained in:
2021-04-14 10:28:38 +02:00
parent 05b40b64f8
commit 8aeafbdc5e
+2 -2
View File
@@ -19,13 +19,13 @@ Image::Image(const QString name, ImageRingList *ringList) :
void Image::load()
{
if(m_pixmap.isNull() && !m_loading)
if(m_pixmap.isNull() && !m_rawImage && !m_loading)
{
m_loading = true;
m_released = false;
QThreadPool::globalInstance()->start(new LoadRunable(m_name, this, m_ringList->analyzeLevel()));
}
if(!m_loading && !m_pixmap.isNull())
if(!m_loading && (!m_pixmap.isNull() || m_rawImage))
emit pixmapLoaded(this);
}