From e38781a95326314ffbcda428d3f67f63a525f3a4 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Mon, 14 Sep 2009 03:29:43 +0000 Subject: [PATCH] fix crash when moving a box after copying it to clipboard; this code is still badly broken, we must not use any UI classes such as selection in set_transform, but at least it does not crash now --- src/box3d.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/box3d.cpp b/src/box3d.cpp index 5cffa66d9..93efa5c35 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -335,7 +335,8 @@ box3d_set_transform(SPItem *item, Geom::Matrix const &xform) Persp3D *persp = box3d_get_perspective(box); Persp3D *transf_persp; - if (!persp3d_has_all_boxes_in_selection (persp)) { + if (sp_desktop_document(inkscape_active_desktop()) == SP_OBJECT_DOCUMENT(item) && + !persp3d_has_all_boxes_in_selection (persp)) { std::list selboxes = sp_desktop_selection(inkscape_active_desktop())->box3DList(); /* create a new perspective as a copy of the current one and link the selected boxes to it */ -- 2.30.2