summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e792cb)
raw | patch | inline | side by side (parent: 0e792cb)
author | speare <speare@users.sourceforge.net> | |
Sat, 14 Mar 2009 18:24:07 +0000 (18:24 +0000) | ||
committer | speare <speare@users.sourceforge.net> | |
Sat, 14 Mar 2009 18:24:07 +0000 (18:24 +0000) |
src/select-context.cpp | patch | blob | history | |
src/sp-item-group.h | patch | blob | history |
diff --git a/src/select-context.cpp b/src/select-context.cpp
index 0e35c6546fedb1accef8f3cd36ffdfc1125efd8b..b2a05dca2217567ab785f6bea5e767da91e1c2e9 100644 (file)
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
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
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);
diff --git a/src/sp-item-group.h b/src/sp-item-group.h
index 1cf4e9912da248834a2bdb6d68e1536a2f6997fd..65a51055a79aab462eb760c4a9d1a7cff0dcce82 100644 (file)
--- a/src/sp-item-group.h
+++ b/src/sp-item-group.h
#define SP_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_GROUP))
#define SP_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_GROUP))
+#define SP_IS_LAYER(obj) (SP_IS_GROUP(obj) && SP_GROUP(obj)->layerMode() == SPGroup::LAYER)
+
class CGroup;
struct SPGroup : public SPLPEItem {