Code

yet another crash/freeze in ungrab. IMPORTANT: the document_done calls and others...
authorbuliabyak <buliabyak@users.sourceforge.net>
Mon, 20 Nov 2006 18:37:19 +0000 (18:37 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Mon, 20 Nov 2006 18:37:19 +0000 (18:37 +0000)
src/seltrans.cpp

index 963c31d5b39229bbe32fb9ba3f2bc7586bfd682b..cd68399b03d6315f93b12e29302b8678f89ffb86 100644 (file)
@@ -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) */