summaryrefslogtreecommitdiffstats
path: root/src/ui/tool
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/tool')
-rw-r--r--src/ui/tool/control-point.cpp6
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp8
-rw-r--r--src/ui/tool/node.cpp2
-rw-r--r--src/ui/tool/path-manipulator.cpp10
-rw-r--r--src/ui/tool/selector.cpp6
-rw-r--r--src/ui/tool/transform-handle-set.cpp4
6 files changed, 20 insertions, 16 deletions
diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp
index e98c7b2a2..bcf5c9fce 100644
--- a/src/ui/tool/control-point.cpp
+++ b/src/ui/tool/control-point.cpp
@@ -11,7 +11,7 @@
#include <gdkmm.h>
#include <2geom/point.h>
#include "desktop.h"
-#include "desktop-handles.h"
+
#include "display/sp-canvas.h"
#include "display/snap-indicator.h"
#include "ui/tools/tool-base.h"
@@ -74,7 +74,7 @@ ControlPoint::ControlPoint(SPDesktop *d, Geom::Point const &initial_pos, SPAncho
_lurking(false)
{
_canvas_item = sp_canvas_item_new(
- group ? group : sp_desktop_controls(_desktop), SP_TYPE_CTRL,
+ group ? group : _desktop->getControls(), SP_TYPE_CTRL,
"anchor", (SPAnchorType) anchor, "size", (gdouble) pixbuf->get_width(),
"shape", SP_CTRL_SHAPE_BITMAP, "pixbuf", pixbuf->gobj(),
"filled", TRUE, "fill_color", _cset.normal.fill,
@@ -93,7 +93,7 @@ ControlPoint::ControlPoint(SPDesktop *d, Geom::Point const &initial_pos, SPAncho
_position(initial_pos),
_lurking(false)
{
- _canvas_item = ControlManager::getManager().createControl(group ? group : sp_desktop_controls(_desktop), type);
+ _canvas_item = ControlManager::getManager().createControl(group ? group : _desktop->getControls(), type);
g_object_set(_canvas_item,
"anchor", anchor,
"filled", TRUE, "fill_color", _cset.normal.fill,
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp
index d7b35c974..f53cef5f4 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -14,7 +14,7 @@
#include "node.h"
#include <glibmm/i18n.h>
#include "desktop.h"
-#include "desktop-handles.h"
+
#include "document.h"
#include "document-undo.h"
#include "live_effects/lpeobject.h"
@@ -820,9 +820,9 @@ void MultiPathManipulator::_commit(CommitEvent cps)
_selection.signal_update.emit();
invokeForAll(&PathManipulator::writeXML);
if (key) {
- DocumentUndo::maybeDone(sp_desktop_document(_desktop), key, SP_VERB_CONTEXT_NODE, reason);
+ DocumentUndo::maybeDone(_desktop->getDocument(), key, SP_VERB_CONTEXT_NODE, reason);
} else {
- DocumentUndo::done(sp_desktop_document(_desktop), SP_VERB_CONTEXT_NODE, reason);
+ DocumentUndo::done(_desktop->getDocument(), SP_VERB_CONTEXT_NODE, reason);
}
signal_coords_changed.emit();
}
@@ -831,7 +831,7 @@ void MultiPathManipulator::_commit(CommitEvent cps)
void MultiPathManipulator::_done(gchar const *reason, bool alert_LPE) {
invokeForAll(&PathManipulator::update, alert_LPE);
invokeForAll(&PathManipulator::writeXML);
- DocumentUndo::done(sp_desktop_document(_desktop), SP_VERB_CONTEXT_NODE, reason);
+ DocumentUndo::done(_desktop->getDocument(), SP_VERB_CONTEXT_NODE, reason);
signal_coords_changed.emit();
}
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index 8c22f7c6e..eeea47e4d 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -17,7 +17,7 @@
#include "display/sp-canvas.h"
#include "display/sp-canvas-util.h"
#include "desktop.h"
-#include "desktop-handles.h"
+
#include "preferences.h"
#include "snap.h"
#include "snap-preferences.h"
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 8b99c33b8..c8b986824 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -23,7 +23,7 @@
#include <glibmm/i18n.h>
#include "ui/tool/path-manipulator.h"
#include "desktop.h"
-#include "desktop-handles.h"
+
#include "display/sp-canvas.h"
#include "display/sp-canvas-util.h"
#include "display/curve.h"
@@ -972,6 +972,10 @@ NodeList::iterator PathManipulator::subdivideSegment(NodeList::iterator first, d
NodeList &list = NodeList::get(first);
NodeList::iterator second = first.next();
if (!second) throw std::invalid_argument("Subdivide after last node in open path");
+ if (first->type() == NODE_SYMMETRIC)
+ first->setType(NODE_SMOOTH, false);
+ if (second->type() == NODE_SYMMETRIC)
+ second->setType(NODE_SMOOTH, false);
// We need to insert the segment after 'first'. We can't simply use 'second'
// as the point of insertion, because when 'first' is the last node of closed path,
@@ -1617,13 +1621,13 @@ void PathManipulator::_removeNodesFromSelection()
void PathManipulator::_commit(Glib::ustring const &annotation)
{
writeXML();
- DocumentUndo::done(sp_desktop_document(_desktop), SP_VERB_CONTEXT_NODE, annotation.data());
+ DocumentUndo::done(_desktop->getDocument(), SP_VERB_CONTEXT_NODE, annotation.data());
}
void PathManipulator::_commit(Glib::ustring const &annotation, gchar const *key)
{
writeXML();
- DocumentUndo::maybeDone(sp_desktop_document(_desktop), key, SP_VERB_CONTEXT_NODE,
+ DocumentUndo::maybeDone(_desktop->getDocument(), key, SP_VERB_CONTEXT_NODE,
annotation.data());
}
diff --git a/src/ui/tool/selector.cpp b/src/ui/tool/selector.cpp
index bdeacadc9..e4e701785 100644
--- a/src/ui/tool/selector.cpp
+++ b/src/ui/tool/selector.cpp
@@ -11,7 +11,7 @@
#include "control-point.h"
#include "desktop.h"
-#include "desktop-handles.h"
+
#include "display/sodipodi-ctrlrect.h"
#include "ui/tools/tool-base.h"
#include "preferences.h"
@@ -37,7 +37,7 @@ public:
_cancel(false)
{
setVisible(false);
- _rubber = static_cast<CtrlRect*>(sp_canvas_item_new(sp_desktop_controls(_desktop),
+ _rubber = static_cast<CtrlRect*>(sp_canvas_item_new(_desktop->getControls(),
SP_TYPE_CTRLRECT, NULL));
sp_canvas_item_hide(_rubber);
}
@@ -100,7 +100,7 @@ private:
Selector::Selector(SPDesktop *d)
: Manipulator(d)
- , _dragger(new SelectorPoint(d, sp_desktop_controls(d), this))
+ , _dragger(new SelectorPoint(d, d->getControls(), this))
{
_dragger->setVisible(false);
}
diff --git a/src/ui/tool/transform-handle-set.cpp b/src/ui/tool/transform-handle-set.cpp
index 7d5c9bf0c..da2a54989 100644
--- a/src/ui/tool/transform-handle-set.cpp
+++ b/src/ui/tool/transform-handle-set.cpp
@@ -15,7 +15,7 @@
#include <glib/gi18n.h>
#include <2geom/transforms.h>
#include "desktop.h"
-#include "desktop-handles.h"
+
#include "display/sodipodi-ctrlrect.h"
#include "preferences.h"
#include "snap.h"
@@ -686,7 +686,7 @@ TransformHandleSet::TransformHandleSet(SPDesktop *d, SPCanvasGroup *th_group)
, _in_transform(false)
, _visible(true)
{
- _trans_outline = static_cast<CtrlRect*>(sp_canvas_item_new(sp_desktop_controls(_desktop),
+ _trans_outline = static_cast<CtrlRect*>(sp_canvas_item_new(_desktop->getControls(),
SP_TYPE_CTRLRECT, NULL));
sp_canvas_item_hide(_trans_outline);
_trans_outline->setDashed(true);