Add recursive directory

This commit is contained in:
2024-02-02 20:55:58 +01:00
parent 4e952873e3
commit af9187737f
5 changed files with 46 additions and 11 deletions
+4 -1
View File
@@ -211,7 +211,7 @@ void ImageWidget::allocateThumbnails(const QStringList &paths)
m_thumbnailTexture->create();
m_thumbnailTexture->setFormat(QOpenGLTexture::RGB16_UNorm);
m_thumbnailTexture->setSize(THUMB_SIZE, THUMB_SIZE);
m_thumbnailTexture->setLayers(paths.size());
m_thumbnailTexture->setLayers(std::min((int)paths.size(), m_maxArrayLayers));
m_thumbnailTexture->allocateStorage();
}
@@ -301,6 +301,9 @@ QImage ImageWidget::renderToImage()
void ImageWidget::thumbnailLoaded(const Image *image)
{
if(image->number() >= m_maxArrayLayers)
return;
makeCurrent();
const RawImage *raw = image->thumbnail();
if(!raw || !raw->valid())return;