summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-26 15:17:34 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-26 15:18:15 -0700
commit0d58cfb6411080053e99b0caa042278c19441b9d (patch)
tree91f8e2f1d01d2f57a56379d942e02f0e4933c024 /qt-ui/profile
parent0f023791f8e47bae725629954454d7c623ca3c4d (diff)
downloadsubsurface-0d58cfb6411080053e99b0caa042278c19441b9d.tar.gz
Planner: don't try to update the MainTab dive info while in plan mode
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/profilewidget2.cpp5
-rw-r--r--qt-ui/profile/profilewidget2.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index f62299648..6cb258060 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -816,6 +816,11 @@ extern struct ev_select *ev_namelist;
extern int evn_allocated;
extern int evn_used;
+bool ProfileWidget2::isPlanner()
+{
+ return currentState == PLAN;
+}
+
void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
{
if (currentState == ADD || currentState == PLAN) {
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h
index fbfd1947f..b1a415eb3 100644
--- a/qt-ui/profile/profilewidget2.h
+++ b/qt-ui/profile/profilewidget2.h
@@ -71,6 +71,7 @@ public:
void setupItem(AbstractProfilePolygonItem *item, DiveCartesianAxis *hAxis, DiveCartesianAxis *vAxis, DivePlotDataModel *model, int vData, int hData, int zValue);
void setPrintMode(bool mode, bool grayscale = false);
bool isPointOutOfBoundaries(const QPointF &point) const;
+ bool isPlanner();
State currentState;
public