[Kst] branches/work/kst/portto4/kst/src/libkstapp

Peter Kümmel syntheticpp at gmx.net
Thu Sep 2 09:57:15 CEST 2010


SVN commit 1170822 by kuemmel:

- switch to cross cursor on modifier release event 
- show selection lines only when one uses the mouse for "X/Y Mouse Zoom"
  http://kst.kde.org/handbook/view-zoomingandscrolling.html

BUG:247637

 M  +1 -4      plotrenderitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/plotrenderitem.cpp #1170821:1170822
@@ -374,12 +374,8 @@
   const Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers();
   if (modifiers & Qt::ShiftModifier) {
     parentView()->setCursor(Qt::SizeVerCursor);
-    _selectionRect.setFrom(QPointF(rect().left(), _lastPos.y()));
-    _selectionRect.setTo(QPointF(rect().right(), _lastPos.y()));
   } else if (modifiers & Qt::ControlModifier) {
     parentView()->setCursor(Qt::SizeHorCursor);
-    _selectionRect.setFrom(QPointF(_lastPos.x(), rect().top()));
-    _selectionRect.setTo(QPointF(_lastPos.x(), rect().bottom()));
   }
 
   ViewItem::keyPressEvent(event);
@@ -399,6 +395,7 @@
   } else if (modifiers & Qt::ControlModifier) {
     parentView()->setCursor(Qt::SizeHorCursor);
   } else {
+    parentView()->setCursor(Qt::CrossCursor);
     resetSelectionRect();
   }
   ViewItem::keyReleaseEvent(event);


More information about the Kst mailing list