From: buliabyak Date: Mon, 20 Nov 2006 18:37:19 +0000 (+0000) Subject: yet another crash/freeze in ungrab. IMPORTANT: the document_done calls and others... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7926cf81f3c0dfb18b03c12c7cc5ba3a0d68dd77;p=inkscape.git yet another crash/freeze in ungrab. IMPORTANT: the document_done calls and others triggering screen redraw must come absolutely the last in any function, otherwise, because of the events that happened during the redraw, you risk seeing a vastly different landscape when you return for the remainder of your function (e.g. the tool context may have changed), and it will likely misbehave. --- diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 963c31d5b..cd68399b0 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -348,7 +348,6 @@ void Inkscape::SelTrans::ungrab() _message_context.clear(); - bool updh = true; if (!_empty && _changed) { sp_selection_apply_affine(selection, _current, (_show == SHOW_OUTLINE)? true : false); _center *= _current; @@ -367,6 +366,9 @@ void Inkscape::SelTrans::ungrab() } } + _items.clear(); + _items_centers.clear(); + if (_current.is_translation()) { sp_document_done(sp_desktop_document(_desktop), SP_VERB_CONTEXT_SELECT, _("Move")); @@ -381,15 +383,11 @@ void Inkscape::SelTrans::ungrab() _("Skew")); } - updh = false; - } - - if (updh) { + } else { + _items.clear(); + _items_centers.clear(); _updateHandles(); } - - _items.clear(); - _items_centers.clear(); } /* fixme: This is really bad, as we compare positions for each stamp (Lauris) */