diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-02-08 07:43:22 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-02-08 07:43:22 +0000 |
| commit | 13628b5047f1bdf3668eb3f378247f0d9ef5c704 (patch) | |
| tree | 6757ed95d67bcd750567d304d6734cdb7efb31b0 /src | |
| parent | * src/conn-avoid-ref.cpp: Include the "xml/simple-node" header, rather than (diff) | |
| download | inkscape-13628b5047f1bdf3668eb3f378247f0d9ef5c704.tar.gz inkscape-13628b5047f1bdf3668eb3f378247f0d9ef5c704.zip | |
fix bug: selected group gets moved even when click+drag on an object on top of it
(bzr r4681)
Diffstat (limited to 'src')
| -rw-r--r-- | src/select-context.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/select-context.cpp b/src/select-context.cpp index 0eb5777cf..13cb042cd 100644 --- a/src/select-context.cpp +++ b/src/select-context.cpp @@ -505,6 +505,14 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) if (!sc->moved) { item_in_group = desktop->item_at_point(NR::Point(event->button.x, event->button.y), TRUE); group_at_point = desktop->group_at_point(NR::Point(event->button.x, event->button.y)); + + // group-at-point is meant to be topmost item if it's a group, + // not topmost group of all items at point + if (group_at_point != item_in_group && + !(group_at_point && item_at_point && + group_at_point->isAncestorOf(item_at_point))) + group_at_point = NULL; + // if neither a group nor an item (possibly in a group) at point are selected, set selection to the item at point if ((!item_in_group || !selection->includes(item_in_group)) && (!group_at_point || !selection->includes(group_at_point)) |
