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)
|
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*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user