summaryrefslogtreecommitdiffstats
path: root/src/select-context.cpp
diff options
context:
space:
mode:
authorEd Halley <ed@halley.cc>2009-03-14 18:24:07 +0000
committerspeare <speare@users.sourceforge.net>2009-03-14 18:24:07 +0000
commitc3e32ec060103bd65b05ecab7cb548b0adbc5747 (patch)
tree2cd3ad4fb54105eeba0688632ab5681e40261256 /src/select-context.cpp
parentMicrotypo update (diff)
downloadinkscape-c3e32ec060103bd65b05ecab7cb548b0adbc5747.tar.gz
inkscape-c3e32ec060103bd65b05ecab7cb548b0adbc5747.zip
allow full mouse dragging, rotating, scaling, etc. if a single layer is the selection
(bzr r7490)
Diffstat (limited to '')
-rw-r--r--src/select-context.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/select-context.cpp b/src/select-context.cpp
index 0e35c6546..b2a05dca2 100644
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -515,6 +515,8 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
if (!sc->moved) {
item_in_group = desktop->item_at_point(Geom::Point(event->button.x, event->button.y), TRUE);
group_at_point = desktop->group_at_point(Geom::Point(event->button.x, event->button.y));
+ if (SP_IS_LAYER(selection->single()))
+ group_at_point = SP_GROUP(selection->single());
// group-at-point is meant to be topmost item if it's a group,
// not topmost group of all items at point
@@ -577,9 +579,12 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
seltrans->resetState();
selection->toggle(sc->item);
} else {
+ SPObject* single = selection->single();
// without shift, increase state (i.e. toggle scale/rotation handles)
if (selection->includes(sc->item)) {
seltrans->increaseState();
+ } else if (SP_IS_LAYER(single) && single->isAncestorOf(sc->item)) {
+ seltrans->increaseState();
} else {
seltrans->resetState();
selection->set(sc->item);