From d56821d07d8b5cbd124b3dd4e7ec74833d42de04 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Sun, 23 Dec 2007 22:37:31 +0000 Subject: Bug fix: prevent perspectives from being transformed more than once (by keeping track of selected boxes and their transformations). (bzr r4291) --- src/selection.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/selection.cpp') diff --git a/src/selection.cpp b/src/selection.cpp index 68a9a2cd9..d3b667a12 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -29,6 +29,7 @@ #include "sp-shape.h" #include "sp-path.h" #include "sp-item-group.h" +#include "box3d.h" #include @@ -166,6 +167,11 @@ void Selection::_add(SPObject *obj) { _objs = g_slist_prepend(_objs, obj); + if (SP_IS_BOX3D(obj)) { + // keep track of selected boxes for transformations + box3d_add_to_selection(SP_BOX3D(obj)); + } + _release_connections[obj] = obj->connectRelease(sigc::mem_fun(*this, (void (Selection::*)(SPObject *))&Selection::remove)); _modified_connections[obj] = obj->connectModified(sigc::mem_fun(*this, &Selection::_schedule_modified)); } @@ -200,6 +206,11 @@ void Selection::_remove(SPObject *obj) { _release_connections[obj].disconnect(); _release_connections.erase(obj); + if (SP_IS_BOX3D(obj)) { + // keep track of selected boxes for transformations + box3d_remove_from_selection(SP_BOX3D(obj)); + } + _objs = g_slist_remove(_objs, obj); } -- cgit v1.2.3