From f51e8d7c6b4e2caa9e470af674949f3cd1695bf5 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 5 Nov 2014 19:30:49 +0100 Subject: Refactor to remove references to Desktop/Ui in Effect, bspline and fillet-chamfer. Also fixed the selected node problem in units not px. Also fixed two var to not allow NULL pointed by Johan Engelen. (bzr r13672) --- src/ui/tools/node-tool.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ui/tools/node-tool.cpp') diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp index e2bb85d11..99d60e2b7 100644 --- a/src/ui/tools/node-tool.cpp +++ b/src/ui/tools/node-tool.cpp @@ -305,6 +305,16 @@ void NodeTool::update_helperpath () { if (SP_IS_LPE_ITEM(selection->singleItem())) { Inkscape::LivePathEffect::Effect *lpe = SP_LPE_ITEM(selection->singleItem())->getCurrentLPE(); if (lpe && lpe->isVisible()/* && lpe->showOrigPath()*/) { + Inkscape::UI::ControlPointSelection::Set &selectionNodes = _selected_nodes->allPoints(); + std::vector selectedNodesPositions; + for (Inkscape::UI::ControlPointSelection::Set::iterator i = selectionNodes.begin(); i != selectionNodes.end(); ++i) { + if ((*i)->selected()) { + Inkscape::UI::Node *n = dynamic_cast(*i); + selectedNodesPositions.push_back(desktop->doc2dt(n->position())); + } + } + lpe->setSelectedNodePoints(selectedNodesPositions); + lpe->setCurrentZoom(this->desktop->current_zoom()); SPCurve *c = new SPCurve(); SPCurve *cc = new SPCurve(); std::vector cs = lpe->getCanvasIndicators(SP_LPE_ITEM(selection->singleItem())); -- cgit v1.2.3