mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 00:44:59 -04:00
fixed wrong cover being loaded after deleting a comic
This commit is contained in:
@ -691,11 +691,15 @@ CFImage YACReaderFlowGL::getCurrentSelected()
|
||||
void YACReaderFlowGL::replace(char *name, GLuint Tex, float x, float y,int item)
|
||||
{
|
||||
Q_UNUSED(name)
|
||||
cfImages[item].img = Tex;
|
||||
cfImages[item].width = x;
|
||||
cfImages[item].height = y;
|
||||
//strcpy(cfImages[item].name,name);
|
||||
loaded[item]=true;
|
||||
if(cfImages[item].index == item)
|
||||
{
|
||||
cfImages[item].img = Tex;
|
||||
cfImages[item].width = x;
|
||||
cfImages[item].height = y;
|
||||
loaded[item]=true;
|
||||
}
|
||||
else
|
||||
loaded[item]=false;
|
||||
}
|
||||
|
||||
void YACReaderFlowGL::populate(int n)
|
||||
@ -1081,7 +1085,7 @@ void YACReaderComicFlowGL::updateImageData()
|
||||
CFImages[idx].height = y;
|
||||
CFImages[idx].img = worker->resultTexture;
|
||||
strcpy(CFImages[idx].name,"cover");*/
|
||||
loaded[idx] = true;
|
||||
//loaded[idx] = true;
|
||||
//numImagesLoaded++;
|
||||
}
|
||||
}
|
||||
@ -1134,6 +1138,14 @@ void YACReaderComicFlowGL::updateImageData()
|
||||
}
|
||||
}
|
||||
|
||||
void YACReaderComicFlowGL::remove(int item)
|
||||
{
|
||||
worker->lock();
|
||||
worker->reset();
|
||||
YACReaderFlowGL::remove(item);
|
||||
worker->unlock();
|
||||
}
|
||||
|
||||
|
||||
YACReaderPageFlowGL::YACReaderPageFlowGL(QWidget *parent,struct Preset p )
|
||||
:YACReaderFlowGL(parent,p)
|
||||
@ -1312,6 +1324,16 @@ void ImageLoaderGL::generate(int index, const QString& fileName)
|
||||
}
|
||||
}
|
||||
|
||||
void ImageLoaderGL::lock()
|
||||
{
|
||||
mutex.lock();
|
||||
}
|
||||
|
||||
void ImageLoaderGL::unlock()
|
||||
{
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
void ImageLoaderGL::run()
|
||||
{
|
||||
for(;;)
|
||||
|
Reference in New Issue
Block a user