Commit 40c7e4f8 authored by Nathan Lee's avatar Nathan Lee

Crashfix: Undo with Text Dialog and text on path

Stop unnecessary write when offset not being changed.
Fix inbox#592
parent 84d14604
Pipeline #67673502 passed with stages
in 9 minutes and 13 seconds
......@@ -694,9 +694,10 @@ void TextEdit::onStartOffsetChange(GtkTextBuffer * /*text_buffer*/, TextEdit *se
{
SPTextPath *tp = SP_TEXTPATH(text->firstChild());
const gchar *sstr = gtk_combo_box_text_get_active_text(reinterpret_cast<GtkComboBoxText *>(self->startOffset));
tp->setAttribute("startOffset", sstr);
DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "startOffset", SP_VERB_CONTEXT_TEXT, _("Set text style"));
if (g_strcmp0(sstr,tp->getAttribute("startOffset"))) {
tp->setAttribute("startOffset", sstr);
DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "startOffset", SP_VERB_CONTEXT_TEXT, _("Set text style"));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment