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

Peter Kümmel syntheticpp at gmx.net
Thu Sep 2 16:38:07 CEST 2010


SVN commit 1171050 by kuemmel:

don't confuse layout mode: D&D in Data mode

BUG: 249253

 M  +2 -2      viewitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1171049:1171050
@@ -948,7 +948,7 @@
 
 void ViewItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
 
-  if (event->buttons() & Qt::LeftButton &&
+  if (event->buttons() & Qt::LeftButton && parentView()->viewMode() == View::Data &&
       (event->pos() - dragStartPosition).toPoint().manhattanLength() > QApplication::startDragDistance()) {
 
     // UNDO tied zoom settings done in PlotItem::mousePressEvent
@@ -1643,7 +1643,7 @@
 void ViewItem::mousePressEvent(QGraphicsSceneMouseEvent *event) {
 
   QPointF p = event->pos();
-  if (checkBox().contains(p)) {
+  if (checkBox().contains(p) && parentView()->viewMode() == View::Data) {
     if (event->buttons() & Qt::LeftButton) {
        dragStartPosition = p;
     }


More information about the Kst mailing list