[Kst] extragear/graphics/kst/kst

Rick Chern rchern at interchange.ubc.ca
Fri Aug 19 22:33:51 CEST 2005


SVN commit 451080 by rchern:

Don't draw an object if mouse wasn't moved

 M  +1 -1      kstgfxarrowmousehandler.cpp  
 M  +1 -1      kstgfxellipsemousehandler.cpp  
 M  +1 -1      kstgfxlinemousehandler.cpp  
 M  +1 -1      kstgfxpicturemousehandler.cpp  
 M  +1 -1      kstgfxrectanglemousehandler.cpp  
 M  +1 -1      kstgfxtextmousehandler.cpp  


--- trunk/extragear/graphics/kst/kst/kstgfxarrowmousehandler.cpp #451079:451080
@@ -76,7 +76,7 @@
   _mouseDown = false;
       
   // make a new _drawingArrow using defaults
-  if (!_cancelled) {
+  if (!_cancelled && _mouseOrigin != pos) {
     KstViewArrowPtr arrow = new KstViewArrow();
     copyDefaults(KstViewObjectPtr(arrow));
     arrow->setFrom(_prevBand.topLeft());
--- trunk/extragear/graphics/kst/kst/kstgfxellipsemousehandler.cpp #451079:451080
@@ -101,7 +101,7 @@
   }
   _mouseDown = false;
       
-  if (!_cancelled) {
+  if (!_cancelled && _mouseOrigin != pos) {
     KstViewEllipsePtr ellipse = new KstViewEllipse();
     copyDefaults(KstViewObjectPtr(ellipse));
     ellipse->move(_prevBand.topLeft());
--- trunk/extragear/graphics/kst/kst/kstgfxlinemousehandler.cpp #451079:451080
@@ -76,7 +76,7 @@
   }
   _mouseDown = false;
       
-  if (!_cancelled) {
+  if (!_cancelled && _mouseOrigin != pos) {
     // make a new arrow
     KstViewArrowPtr arrow = new KstViewArrow();
     copyDefaults(KstViewObjectPtr(arrow));
--- trunk/extragear/graphics/kst/kst/kstgfxpicturemousehandler.cpp #451079:451080
@@ -72,7 +72,7 @@
   _mouseDown = false;
       
   // once released, create a picture and popup the edit dialog
-  if (!_cancelled) {
+  if (!_cancelled && _mouseOrigin != pos) {
     KstViewPicturePtr pic = new KstViewPicture();
     pic->move(_prevBand.topLeft());
     pic->resize(_prevBand.size());
--- trunk/extragear/graphics/kst/kst/kstgfxrectanglemousehandler.cpp #451079:451080
@@ -75,7 +75,7 @@
   }
   _mouseDown = false;
       
-  if (!_cancelled) {
+  if (!_cancelled && _mouseOrigin != pos) {
     // make a new rectangle
     KstViewBoxPtr box = new KstViewBox();
     copyDefaults(KstViewObjectPtr(box));
--- trunk/extragear/graphics/kst/kst/kstgfxtextmousehandler.cpp #451079:451080
@@ -76,7 +76,7 @@
   _mouseDown = false;
   
   // once released, create a new text object and popup the edit dialog
-  if (!_cancelled) {
+  if (!_cancelled && _mouseOrigin != pos) {
     KstViewLabelPtr label = new KstViewLabel("Text");
     copyDefaults(KstViewObjectPtr(label));
     _top->appendChild(KstViewObjectPtr(label));


More information about the Kst mailing list