On Fri, 2003-12-19 at 04:25, bulia byak wrote:
Fixed, please test. I had to make use of
sp_document_partial_items_in_box()
for this, which was in the code but never used, and fixed a bug in it so
it
could actually work.
Hrm, I still can't get shift+click (versus shift+drag) to work. :/
That was a bad solution anyway. It just used bounding box, so objects with holes etc. were treated as opaque rectangles. Now a much better solution is checked in. I had to dig into the arena code (something I was trying to avoid) but I think I succeeded. Please test now.
Here's what I did: in document.cpp, a new function sp_document_item_at_point() was added, to complement items_in_box and partial_items_in_box. It calls nr_arena_item_invoke_pick() on all items to find those that are pickable at the given point, and returns the topmost of them. Now select-context.cpp simply uses sp_document_item_at_point() in its root_handler when shift-clicked and does selection toggle. This means we can do without the item that was passed on from the arena code - if we have mouse coordinates, we can always find out the item under mouse. This was necessary in this case because I do shift-rubberband in root_handler, and I must process shift-click in it too, and root_handler does not get an item as an argument.
The same approach can be used for ctrl-clicking to select within group. Mental, if you think this approach is acceptable, I'll go on and try to implement ctrl-click.
_________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2f...