On 03/17/2010 10:56 PM, bulia byak wrote:
pick_current_item is the place where new current_item is picked; it calls sp_canvas_item_invoke_point with the root canvas item, and that recurses down into descendants, checking each one through its point method if it is under cursor and on top. You may try to check this machinery to see why your snapping item is not picked.
I did ;-) and found out that after the snap indicator was deleted, the current_item was no longer valid (null). Events get lost in such a case because we don't know where to send them to. Although canvas->need_repick was flagged, a repick hadn't occured yet. I fixed this (rev. 9158) by explicitely calling pick_current_item() in emit_event() in such a case, which fixed scrolling when hovering above a snap indicator. I'm still not sure though if this is a proper fix, but I haven't heard of any regressions or side effects yet.
Regards,
Diederik