From ff04a08000adfa762ad1f4bc4f4df64c11ed499c Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 1 Jul 2017 02:35:09 +0200 Subject: working on knots selection --- src/ui/shape-editor.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/ui/shape-editor.cpp') diff --git a/src/ui/shape-editor.cpp b/src/ui/shape-editor.cpp index 98320ed8c..288c6dc5e 100644 --- a/src/ui/shape-editor.cpp +++ b/src/ui/shape-editor.cpp @@ -17,6 +17,8 @@ #include "desktop.h" #include "document.h" #include "knotholder.h" +#include "sp-ellipse.h" +#include "inkscape.h" #include "ui/object-edit.h" #include "ui/shape-editor.h" #include "xml/node-event-vector.h" @@ -81,7 +83,7 @@ const SPItem *ShapeEditor::get_item() { return item; } -void ShapeEditor::event_attr_changed(Inkscape::XML::Node *, gchar const *name, gchar const *, gchar const *, bool, void *data) +void ShapeEditor::event_attr_changed(Inkscape::XML::Node * node, gchar const *name, gchar const *, gchar const *, bool, void *data) { g_assert(data); ShapeEditor *sh = static_cast(data); @@ -94,7 +96,12 @@ void ShapeEditor::event_attr_changed(Inkscape::XML::Node *, gchar const *name, g 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")); + 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")))); } } } -- cgit v1.2.3