Better handling of FITS loading error
This commit is contained in:
+10
-1
@@ -85,6 +85,11 @@ void Image::clearThumbnail()
|
||||
m_thumbnail.reset();
|
||||
}
|
||||
|
||||
bool Image::isLoading() const
|
||||
{
|
||||
return m_loading;
|
||||
}
|
||||
|
||||
void Image::imageLoaded(std::shared_ptr<RawImage> rawImage, ImageInfoData info)
|
||||
{
|
||||
m_loading = false;
|
||||
@@ -200,7 +205,7 @@ void ImageRingList::increment()
|
||||
if(m_images.size())
|
||||
{
|
||||
//don't increment if current image was not loaded yet
|
||||
if(!(*m_currImage)->rawImage())
|
||||
if((*m_currImage)->isLoading())
|
||||
return;
|
||||
|
||||
(*m_firstImage)->release();
|
||||
@@ -216,6 +221,10 @@ void ImageRingList::decrement()
|
||||
{
|
||||
if(m_images.size())
|
||||
{
|
||||
//don't decrement if current image was not loaded yet
|
||||
if((*m_currImage)->isLoading())
|
||||
return;
|
||||
|
||||
(*m_lastImage)->release();
|
||||
m_firstImage = decrement(m_firstImage);
|
||||
m_currImage = decrement(m_currImage);
|
||||
|
||||
Reference in New Issue
Block a user