summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divetooltipitem.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-23 21:06:30 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-24 07:30:36 -0700
commit963178d3d4513b9c3e9a67ae56ae7e9fa6248304 (patch)
treed00bb4772d93f90f149f0cc77d44867a0837ee74 /qt-ui/profile/divetooltipitem.h
parentea4d4ac020319dee0e1d74ff793ef50ab8c47508 (diff)
downloadsubsurface-963178d3d4513b9c3e9a67ae56ae7e9fa6248304.tar.gz
Fixe movement of DiveHandlers when moving the NotificationArea
The QGraphicsView system moves every selected item when the user clicks and drags one. This patch makes a cache of all selected items and removes the selection on them. When the user stops dragging the Notification, the selection is restored. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divetooltipitem.h')
-rw-r--r--qt-ui/profile/divetooltipitem.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/profile/divetooltipitem.h b/qt-ui/profile/divetooltipitem.h
index 1f84d0664..c22287b06 100644
--- a/qt-ui/profile/divetooltipitem.h
+++ b/qt-ui/profile/divetooltipitem.h
@@ -45,6 +45,7 @@ public:
bool isExpanded() const;
void persistPos();
void readPos();
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void setTimeAxis(DiveCartesianAxis *axis);
void setPlotInfo(const plot_info &plot);
@@ -64,6 +65,8 @@ private:
DiveCartesianAxis *timeAxis;
plot_info pInfo;
int lastTime;
+
+ QList<QGraphicsItem*> oldSelection;
};
#endif // DIVETOOLTIPITEM_H