+ if (ui.cur_item_type == ITEM_MOVESEL_VERT) pt[0] = 0;
+ pt[1] += ui.selection->move_pagedelta;
+
+ // check for page jumps
+ if (ui.cur_item_type == ITEM_MOVESEL_VERT)
+ upmargin = ui.selection->bbox.bottom - ui.selection->bbox.top;
+ else upmargin = VIEW_CONTINUOUS_SKIP;
+ tmppageno = ui.selection->move_pageno;
+ tmppage = g_list_nth_data(journal.pages, tmppageno);
+ while (ui.view_continuous && (pt[1] < - upmargin)) {
+ if (tmppageno == 0) break;
+ tmppageno--;
+ tmppage = g_list_nth_data(journal.pages, tmppageno);
+ pt[1] += tmppage->height + VIEW_CONTINUOUS_SKIP;
+ ui.selection->move_pagedelta += tmppage->height + VIEW_CONTINUOUS_SKIP;
+ }
+ while (ui.view_continuous && (pt[1] > tmppage->height+VIEW_CONTINUOUS_SKIP)) {
+ if (tmppageno == journal.npages-1) break;
+ pt[1] -= tmppage->height + VIEW_CONTINUOUS_SKIP;
+ ui.selection->move_pagedelta -= tmppage->height + VIEW_CONTINUOUS_SKIP;
+ tmppageno++;
+ tmppage = g_list_nth_data(journal.pages, tmppageno);
+ }
+
+ if (tmppageno != ui.selection->move_pageno) {
+ // move to a new page !
+ ui.selection->move_pageno = tmppageno;
+ if (tmppageno == ui.selection->orig_pageno)
+ ui.selection->move_layer = ui.selection->layer;
+ else
+ ui.selection->move_layer = (struct Layer *)(g_list_last(
+ ((struct Page *)g_list_nth_data(journal.pages, tmppageno))->layers)->data);
+ gnome_canvas_item_reparent(ui.selection->canvas_item, ui.selection->move_layer->group);
+ for (list = ui.selection->items; list!=NULL; list = list->next) {
+ item = (struct Item *)list->data;
+ if (item->canvas_item!=NULL)
+ gnome_canvas_item_reparent(item->canvas_item, ui.selection->move_layer->group);
+ }
+ // avoid a refresh bug
+ gnome_canvas_item_move(GNOME_CANVAS_ITEM(ui.selection->move_layer->group), 0., 0.);
+ if (ui.cur_item_type == ITEM_MOVESEL_VERT)
+ gnome_canvas_item_set(ui.selection->canvas_item,
+ "x2", tmppage->width+100,
+ "y1", ui.selection->anchor_y+ui.selection->move_pagedelta, NULL);
+ }
+
+ // now, process things normally
+