mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: don't try to update the MainTab dive info while in plan mode
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0f023791f8
commit
0d58cfb641
3 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue