summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/node-tool.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-18 18:07:14 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-18 18:07:14 +0000
commite77956b4dbd029c9f6949f81fe083606f995c624 (patch)
tree74adda4df8986d65f70efb341c6235277361fd35 /src/ui/tools/node-tool.cpp
parentupdated code to work on 0.92 code (diff)
parentLatvian translation update (diff)
downloadinkscape-e77956b4dbd029c9f6949f81fe083606f995c624.tar.gz
inkscape-e77956b4dbd029c9f6949f81fe083606f995c624.zip
update to trunk
(bzr r12588.1.39)
Diffstat (limited to 'src/ui/tools/node-tool.cpp')
-rw-r--r--src/ui/tools/node-tool.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index 838c2a884..f8045a029 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -13,7 +13,7 @@
#include "ui/tool/curve-drag-point.h"
#include <glib/gi18n.h>
#include "desktop.h"
-#include "desktop-handles.h"
+
#include "display/sp-canvas-group.h"
#include "display/canvas-bpath.h"
#include "display/curve.h"
@@ -107,20 +107,10 @@
using Inkscape::ControlManager;
-#include "ui/tool-factory.h"
-
namespace Inkscape {
namespace UI {
namespace Tools {
-namespace {
- ToolBase* createNodesContext() {
- return new NodeTool();
- }
-
- bool nodesContextRegistered = ToolFactory::instance().registerObject("/tools/nodes", createNodesContext);
-}
-
const std::string& NodeTool::getPrefsPath() {
return NodeTool::prefsPath;
}
@@ -155,7 +145,7 @@ NodeTool::NodeTool()
SPCanvasGroup *create_control_group(SPDesktop *d)
{
return reinterpret_cast<SPCanvasGroup*>(sp_canvas_item_new(
- sp_desktop_controls(d), SP_TYPE_CANVAS_GROUP, NULL));
+ d->getControls(), SP_TYPE_CANVAS_GROUP, NULL));
}
void destroy_group(SPCanvasGroup *g)
@@ -215,7 +205,7 @@ void NodeTool::setup() {
data.node_data.node_group = create_control_group(this->desktop);
data.node_data.handle_group = create_control_group(this->desktop);
- Inkscape::Selection *selection = sp_desktop_selection (this->desktop);
+ Inkscape::Selection *selection = this->desktop->getSelection();
this->_selection_changed_connection.disconnect();
this->_selection_changed_connection =
@@ -295,7 +285,7 @@ void NodeTool::setup() {
// show helper paths of the applied LPE, if any
void NodeTool::update_helperpath () {
- Inkscape::Selection *selection = sp_desktop_selection (this->desktop);
+ Inkscape::Selection *selection = this->desktop->getSelection();
if (this->helperpath_tmpitem) {
this->desktop->remove_temporary_canvasitem(this->helperpath_tmpitem);
@@ -324,7 +314,7 @@ void NodeTool::update_helperpath () {
cc->reset();
}
if (!c->is_empty()) {
- SPCanvasItem *helperpath = sp_canvas_bpath_new(sp_desktop_tempgroup(this->desktop), c);
+ SPCanvasItem *helperpath = sp_canvas_bpath_new(this->desktop->getTempGroup(), c);
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath), 0x0000ff9A, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath), 0, SP_WIND_RULE_NONZERO);
sp_canvas_item_affine_absolute(helperpath, selection->singleItem()->i2dt_affine());
@@ -527,7 +517,7 @@ bool NodeTool::root_handler(GdkEvent* event) {
}
c->transform(over_item->i2dt_affine());
- SPCanvasItem *flash = sp_canvas_bpath_new(sp_desktop_tempgroup(desktop), c);
+ SPCanvasItem *flash = sp_canvas_bpath_new(desktop->getTempGroup(), c);
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(flash),
//prefs->getInt("/tools/nodes/highlight_color", 0xff0000ff), 1.0,
@@ -668,7 +658,7 @@ void NodeTool::select_area(Geom::Rect const &sel, GdkEventButton *event) {
if (this->_multipath->empty()) {
// if multipath is empty, select rubberbanded items rather than nodes
Inkscape::Selection *selection = this->desktop->selection;
- GSList *items = sp_desktop_document(this->desktop)->getItemsInBox(this->desktop->dkey, sel);
+ GSList *items = this->desktop->getDocument()->getItemsInBox(this->desktop->dkey, sel);
selection->setList(items);
g_slist_free(items);
} else {