From a322f3bb70c6e4da49d2430a5c09c47ec8fbd2c0 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 12 Nov 2016 10:54:56 +0100 Subject: Fix rare crash on undo break apart Fixed bugs: - https://launchpad.net/bugs/1449276 (bzr r15241) --- src/widgets/stroke-style.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/widgets/stroke-style.cpp') diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 81a8e8115..de3e98297 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -940,7 +940,7 @@ StrokeStyle::updateLine() SPStyle * const style = object->style; /* Markers */ - updateAllMarkers(objects); // FIXME: make this desktop query too + updateAllMarkers(objects, true); // FIXME: make this desktop query too /* Dash */ setDashSelectorFromStyle(dashSelector, style); // FIXME: make this desktop query too @@ -1192,7 +1192,7 @@ StrokeStyle::setPaintOrderButtons(Gtk::ToggleButton *active) * that marker. */ void -StrokeStyle::updateAllMarkers(std::vector const &objects) +StrokeStyle::updateAllMarkers(std::vector const &objects, bool skip_undo) { struct { MarkerComboBox *key; int loc; } const keyloc[] = { { startMarkerCombo, SP_MARKER_LOC_START }, @@ -1246,9 +1246,11 @@ StrokeStyle::updateAllMarkers(std::vector const &objects) if (update) { setMarkerColor(marker, combo->get_loc(), SP_ITEM(object)); - SPDocument *document = desktop->getDocument(); - DocumentUndo::done(document, SP_VERB_DIALOG_FILL_STROKE, + if (!skip_undo) { + SPDocument *document = desktop->getDocument(); + DocumentUndo::maybeDone(document, "UaM", SP_VERB_DIALOG_FILL_STROKE, _("Set marker color")); + } } } else { -- cgit v1.2.3