diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-10-10 21:06:27 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-10-10 21:06:27 +0000 |
| commit | 8a5208f4a875cd7a70739f5b559e6a116c0c280a (patch) | |
| tree | b75b6d405e9706fd45fdc2b7823a109aaf3e3e50 /src | |
| parent | Cleanup: remove unused winmain.cpp (diff) | |
| download | inkscape-8a5208f4a875cd7a70739f5b559e6a116c0c280a.tar.gz inkscape-8a5208f4a875cd7a70739f5b559e6a116c0c280a.zip | |
Prevent crash in measure LPE when pasting LPE to multiple elements
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-measure-segments.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/live_effects/lpe-measure-segments.cpp b/src/live_effects/lpe-measure-segments.cpp index 90f469963..6d1f46535 100644 --- a/src/live_effects/lpe-measure-segments.cpp +++ b/src/live_effects/lpe-measure-segments.cpp @@ -479,6 +479,7 @@ LPEMeasureSegments::doOnApply(SPLPEItem const* lpeitem) g_warning("LPE measure line can only be applied to shapes (not groups)."); SPLPEItem * item = const_cast<SPLPEItem*>(lpeitem); item->removeCurrentPathEffect(false); + return; } SPDocument *document = SP_ACTIVE_DOCUMENT; bool saved = DocumentUndo::getUndoSensitive(document); @@ -523,8 +524,8 @@ LPEMeasureSegments::doOnApply(SPLPEItem const* lpeitem) styleContent = styleContent + Glib::ustring("\n.measure-arrows") + Glib::ustring("\n{\n}"); styleContent = styleContent + Glib::ustring("\n.measure-labels") + Glib::ustring("\n{\nline-height:125%;\nletter-spacing:0;\nword-spacing:0;\ntext-align:center;\ntext-anchor:middle;\nstroke:none;\n}"); styleContent = styleContent + Glib::ustring("\n.measure-lines") + Glib::ustring("\n{\n}"); + textNode->setContent(styleContent.c_str()); } - textNode->setContent(styleContent.c_str()); DocumentUndo::setUndoSensitive(document, saved); } |
