|
|
|
@ -154,21 +154,21 @@ int docstructure_move(docstructure* ds, int newy){
|
|
|
|
|
docnode* pdn = NULL;
|
|
|
|
|
docnode* dn;
|
|
|
|
|
if(newy > ds->cury){
|
|
|
|
|
while((dn = nctree_prev(ds->nct)) != pdn){
|
|
|
|
|
if(dn->y > newy){
|
|
|
|
|
dn = nctree_next(ds->nct);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
pdn = dn;
|
|
|
|
|
dn = nctree_prev(ds->nct);
|
|
|
|
|
if(dn->y > newy){
|
|
|
|
|
dn = nctree_next(ds->nct);
|
|
|
|
|
}
|
|
|
|
|
}else if(newy < ds->cury){
|
|
|
|
|
while((dn = nctree_next(ds->nct)) != pdn){
|
|
|
|
|
if(dn->y > newy){
|
|
|
|
|
dn = nctree_prev(ds->nct);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
/*while((dn = nctree_prev(ds->nct)) != pdn){
|
|
|
|
|
pdn = dn;
|
|
|
|
|
}*/
|
|
|
|
|
}else if(newy < ds->cury){
|
|
|
|
|
dn = nctree_next(ds->nct);
|
|
|
|
|
if(dn->y < newy){
|
|
|
|
|
dn = nctree_prev(ds->nct);
|
|
|
|
|
}
|
|
|
|
|
/*while((dn = nctree_next(ds->nct)) != pdn){
|
|
|
|
|
pdn = dn;
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
ds->cury = newy;
|
|
|
|
|
if(nctree_redraw(ds->nct)){
|
|
|
|
|