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) void YACReaderFlowGL::remove(int item)
{ {
loaded.removeAt(item);
marks.removeAt(item);
paths.removeAt(item);
//reposition current selection //reposition current selection
if(item <= currentSelected && currentSelected != 0){ if(item < currentSelected && currentSelected != 0){
currentSelected--; currentSelected--;
} }
int count = item; int count = item;
while(count <= numObjects-2){ while(count <= numObjects-2){
cfImages[count] = cfImages[count+1]; cfImages[count] = cfImages[count+1];
cfImages[count].index--;
count++; count++;
} }
numObjects--;
cfImages = (CFImage*)realloc(cfImages,numObjects*sizeof(CFImage)); cfImages = (CFImage*)realloc(cfImages,numObjects*sizeof(CFImage));
loaded.remove(item); numObjects--;
marks.remove(item);
paths.removeAt(item);
} }
/*Info*/ /*Info*/