diff options
| author | Ted Gould <ted@gould.cx> | 2016-07-27 15:50:24 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2016-07-27 15:50:24 +0000 |
| commit | e0564a4174331f32970bd28695fae5732420accc (patch) | |
| tree | c6b4c430d785bd83f7a930ce4b2c17d6c5a68980 /src/live_effects/parameter/path.cpp | |
| parent | Add build dependencies (diff) | |
| parent | Revert the canvas widget changes, which cause performance regressions (diff) | |
| download | inkscape-e0564a4174331f32970bd28695fae5732420accc.tar.gz inkscape-e0564a4174331f32970bd28695fae5732420accc.zip | |
Merge 0.92.x branch
(bzr r14950.1.12)
Diffstat (limited to 'src/live_effects/parameter/path.cpp')
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index 7ea1d465c..f0c494267 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -73,7 +73,21 @@ PathParam::PathParam( const Glib::ustring& label, const Glib::ustring& tip, PathParam::~PathParam() { remove_link(); - + using namespace Inkscape::UI; + SPDesktop *desktop = SP_ACTIVE_DESKTOP; + if (desktop) { + if (tools_isactive(desktop, TOOLS_NODES)) { + SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem(); + if (item != NULL) { + Inkscape::UI::Tools::NodeTool *nt = static_cast<Inkscape::UI::Tools::NodeTool*>(desktop->event_context); + std::set<ShapeRecord> shapes; + ShapeRecord r; + r.item = item; + shapes.insert(r); + nt->_multipath->setItems(shapes); + } + } + } g_free(defvalue); } @@ -207,6 +221,9 @@ PathParam::param_newWidget() void PathParam::param_editOncanvas(SPItem *item, SPDesktop * dt) { + SPDocument *document = dt->getDocument(); + bool saved = DocumentUndo::getUndoSensitive(document); + DocumentUndo::setUndoSensitive(document, false); using namespace Inkscape::UI; // TODO remove the tools_switch atrocity. @@ -223,11 +240,16 @@ PathParam::param_editOncanvas(SPItem *item, SPDesktop * dt) if (!href) { r.item = reinterpret_cast<SPItem*>(param_effect->getLPEObj()); r.lpe_key = param_key; + Geom::PathVector stored_pv = _pathvector; + param_write_to_repr("M0,0 L1,0"); + const char *svgd = sp_svg_write_path(stored_pv); + param_write_to_repr(svgd); } else { r.item = ref.getObject(); } shapes.insert(r); nt->_multipath->setItems(shapes); + DocumentUndo::setUndoSensitive(document, saved); } void |
