summaryrefslogtreecommitdiffstats
path: root/src/ui
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
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')
-rw-r--r--src/ui/shape-editor.cpp12
-rw-r--r--src/ui/tool/control-point-selection.cpp2
2 files changed, 6 insertions, 8 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);
}
}
}
diff --git a/src/ui/tool/control-point-selection.cpp b/src/ui/tool/control-point-selection.cpp
index 81c6851c7..a5611addc 100644
--- a/src/ui/tool/control-point-selection.cpp
+++ b/src/ui/tool/control-point-selection.cpp
@@ -645,7 +645,7 @@ void ControlPointSelection::_commitHandlesTransform(CommitEvent ce)
signal_commit.emit(ce);
}
-bool ControlPointSelection::event(Inkscape::UI::Tools::ToolBase * event_context, GdkEvent *event)
+bool ControlPointSelection::event(Inkscape::UI::Tools::ToolBase * /*event_context*/, GdkEvent *event)
{
// implement generic event handling that should apply for all control point selections here;
// for example, keyboard moves and transformations. This way this functionality doesn't need