summaryrefslogtreecommitdiffstats
path: root/src/ui/shape-editor.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-07-04 21:41:25 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-07-04 21:41:25 +0000
commit1d2fa48c9a62c4929264cf5b59907f8d4f0e55b5 (patch)
tree1c61f6d9affb0953e1d528704be7333d427fb516 /src/ui/shape-editor.cpp
parentMore icons clean-up. (diff)
downloadinkscape-1d2fa48c9a62c4929264cf5b59907f8d4f0e55b5.tar.gz
inkscape-1d2fa48c9a62c4929264cf5b59907f8d4f0e55b5.zip
Fix a bug with select knots and modifiers
Diffstat (limited to 'src/ui/shape-editor.cpp')
-rw-r--r--src/ui/shape-editor.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ui/shape-editor.cpp b/src/ui/shape-editor.cpp
index 51ea959cd..6a8f5e931 100644
--- a/src/ui/shape-editor.cpp
+++ b/src/ui/shape-editor.cpp
@@ -17,7 +17,8 @@
#include "desktop.h"
#include "document.h"
#include "knotholder.h"
-#include "sp-ellipse.h"
+#include "sp-shape.h"
+#include "sp-path.h"
#include "inkscape.h"
#include "ui/object-edit.h"
#include "ui/shape-editor.h"
@@ -96,12 +97,9 @@ void ShapeEditor::event_attr_changed(Inkscape::XML::Node * node, gchar const *na
if (changed_kh) {
// this can happen if an LPEItem's knotholder handle was dragged, in which case we want
// to keep the knotholder; in all other cases (e.g., if the LPE itself changes) we delete it
- sh->reset_item(!strcmp(name, "d") ||
- !strcmp(node->name(),"svg:rect") ||
- !strcmp(node->name(),"svg:star") |
- !strcmp(node->name(),"svg:spiral") ||
- !strcmp(node->name(),"svg:ellipse") ||
- SP_IS_GENERICELLIPSE(SP_ACTIVE_DOCUMENT->getObjectById(node->attribute("id"))));
+ SPObject * obj = SP_ACTIVE_DOCUMENT->getObjectById(node->attribute("id"));
+ bool is_shape = SP_IS_SHAPE(obj) && !SP_IS_PATH(obj);
+ sh->reset_item(!strcmp(name, "d") || is_shape);
}
}
}