fixed read marks on FlowGL after delete a comic

This commit is contained in:
Luis Ángel San Martín 2013-12-22 11:32:16 +01:00
parent d075b111ee
commit 6624b0d483

View File

@ -661,22 +661,25 @@ void YACReaderFlowGL::insert(char *name, GLuint Tex, float x, float y,int item)
void YACReaderFlowGL::remove(int item)
{
loaded.removeAt(item);
marks.removeAt(item);
paths.removeAt(item);
//reposition current selection
if(item <= currentSelected && currentSelected != 0){
if(item < currentSelected && currentSelected != 0){
currentSelected--;
}
int count = item;
while(count <= numObjects-2){
cfImages[count] = cfImages[count+1];
cfImages[count].index--;
count++;
}
numObjects--;
cfImages = (CFImage*)realloc(cfImages,numObjects*sizeof(CFImage));
loaded.remove(item);
marks.remove(item);
paths.removeAt(item);
numObjects--;
}
/*Info*/