mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed read marks on FlowGL after delete a comic
This commit is contained in:
parent
d075b111ee
commit
6624b0d483
@ -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*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user