summaryrefslogtreecommitdiffstats
path: root/src/box3d-context.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-03-19 10:37:50 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-03-19 10:37:50 +0000
commitada45404a3eae549b4fe3d1fcd7ebab7704c086e (patch)
tree2e5cd6e9371f34c67254238da082a33494d3f010 /src/box3d-context.cpp
parentupdate lpe commands (diff)
downloadinkscape-ada45404a3eae549b4fe3d1fcd7ebab7704c086e.tar.gz
inkscape-ada45404a3eae549b4fe3d1fcd7ebab7704c086e.zip
Make grouped 3D boxes work correctly when transformed (fixes: LP 188991)
(bzr r5122)
Diffstat (limited to 'src/box3d-context.cpp')
-rw-r--r--src/box3d-context.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index 9ee920c1b..7414fcd77 100644
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -186,10 +186,6 @@ static void sp_box3d_context_selection_changed(Inkscape::Selection *selection, g
ec->shape_repr = 0;
}
- SPDocument *doc = sp_desktop_document(bc->desktop);
- doc->persps_sel.clear();
- doc->persps_sel = persp3d_currently_selected_persps();
-
SPItem *item = selection->singleItem();
if (item) {
ec->shape_knot_holder = sp_item_knot_holder(item, ec->desktop);
@@ -201,9 +197,9 @@ static void sp_box3d_context_selection_changed(Inkscape::Selection *selection, g
}
}
- if (doc->persps_sel.size() == 1) {
+ if (selection->perspList().size() == 1) {
// selecting a single box changes the current perspective
- doc->current_persp3d = *(doc->persps_sel.begin());
+ ec->desktop->doc()->current_persp3d = selection->perspList().front();
}
}
@@ -509,7 +505,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
ret = TRUE;
}
if (MOD__SHIFT_ONLY) {
- persp3d_toggle_VPs(persp3d_currently_selected_persps(), Proj::X);
+ persp3d_toggle_VPs(selection->perspList(), Proj::X);
bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
ret = true;
}
@@ -518,7 +514,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
case GDK_y:
case GDK_Y:
if (MOD__SHIFT_ONLY) {
- persp3d_toggle_VPs(persp3d_currently_selected_persps(), Proj::Y);
+ persp3d_toggle_VPs(selection->perspList(), Proj::Y);
bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
ret = true;
}
@@ -527,7 +523,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
case GDK_z:
case GDK_Z:
if (MOD__SHIFT_ONLY) {
- persp3d_toggle_VPs(persp3d_currently_selected_persps(), Proj::Z);
+ persp3d_toggle_VPs(selection->perspList(), Proj::Z);
bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
ret = true;
}