[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Fri Dec 2 02:08:10 CET 2005


SVN commit 484819 by staikos:

should fix the label creation regressions introduced recently - do settings
before the dialog is shown.


 M  +2 -2      kstgfxpicturemousehandler.cpp  
 M  +15 -16    kstgfxtextmousehandler.cpp  


--- trunk/extragear/graphics/kst/kst/kstgfxpicturemousehandler.cpp #484818:484819
@@ -76,9 +76,9 @@
   // once released, create a picture and popup the edit dialog
   if (!_cancelled && _mouseOrigin != pos) {
     KstViewPicturePtr pic = new KstViewPicture;
+    pic->move(_prevBand.topLeft());
+    pic->resize(_prevBand.size());
     if (pic->showDialog(view)) {
-      pic->move(_prevBand.topLeft());
-      pic->resize(_prevBand.size());
       _top->appendChild(KstViewObjectPtr(pic));
       KstApp::inst()->document()->setModified();
     }
--- trunk/extragear/graphics/kst/kst/kstgfxtextmousehandler.cpp #484818:484819
@@ -81,25 +81,24 @@
   if (!_cancelled) {
     KstViewLabelPtr label = new KstViewLabel;
     copyDefaults(KstViewObjectPtr(label));
+    QSize size(0,0);
+    if (_mouseOrigin != pos) {
+      label->move(_prevBand.topLeft());
+      size = _prevBand.size();
+    } else {
+      label->move(pos);
+    }
 
+    if (size.width() < 3) {
+      size.setWidth(3);
+    }
+    if (size.height() < 3) {
+      size.setHeight(3);
+    }
+    label->resize(size);
+
     if (label->showDialog(view)) {
       _top->appendChild(KstViewObjectPtr(label));
-
-      QSize size(0,0);
-      if (_mouseOrigin != pos) {
-        label->move(_prevBand.topLeft());
-        size = _prevBand.size();
-      } else {
-        label->move(pos);
-      }
-
-      if (size.width()<3) {
-        size.setWidth(3);
-      }
-      if (size.height()<3) {
-        size.setHeight(3);
-      }
-      label->resize(size);
       KstApp::inst()->document()->setModified();
     }
   }


More information about the Kst mailing list