summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/maintab.cpp4
-rw-r--r--qt-ui/profile/profilewidget2.cpp5
-rw-r--r--qt-ui/profile/profilewidget2.h1
3 files changed, 8 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 34be53a90..af8240ed2 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -383,8 +383,8 @@ bool MainTab::isEditing()
void MainTab::updateDiveInfo(int dive)
{
- // don't execute this while adding a dive
- if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE)
+ // don't execute this while adding / planning a dive
+ if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE || MainWindow::instance()->graphics()->isPlanner())
return;
if (!isEnabled() && dive != -1)
setEnabled(true);
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