mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Show the cross hair only when planning or adding a dive
In normal profile mode it's rather redundant and clatters the profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
150783f180
commit
b0addb4567
1 changed files with 10 additions and 4 deletions
|
@ -814,10 +814,8 @@ void ProfileWidget2::setProfileState()
|
||||||
HIDE_ALL(DiveHandler, handles);
|
HIDE_ALL(DiveHandler, handles);
|
||||||
HIDE_ALL(QGraphicsSimpleTextItem, gases);
|
HIDE_ALL(QGraphicsSimpleTextItem, gases);
|
||||||
#undef HIDE_ALL
|
#undef HIDE_ALL
|
||||||
mouseFollowerHorizontal->setVisible(true);
|
mouseFollowerHorizontal->setVisible(false);
|
||||||
mouseFollowerVertical->setVisible(true);
|
mouseFollowerVertical->setVisible(false);
|
||||||
mouseFollowerHorizontal->setLine(timeAxis->line());
|
|
||||||
mouseFollowerVertical->setLine(QLineF(0, profileYAxis->pos().y(), 0, timeAxis->pos().y()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfileWidget2::setAddState()
|
void ProfileWidget2::setAddState()
|
||||||
|
@ -826,6 +824,10 @@ void ProfileWidget2::setAddState()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
setProfileState();
|
setProfileState();
|
||||||
|
mouseFollowerHorizontal->setVisible(true);
|
||||||
|
mouseFollowerVertical->setVisible(true);
|
||||||
|
mouseFollowerHorizontal->setLine(timeAxis->line());
|
||||||
|
mouseFollowerVertical->setLine(QLineF(0, profileYAxis->pos().y(), 0, timeAxis->pos().y()));
|
||||||
disconnectTemporaryConnections();
|
disconnectTemporaryConnections();
|
||||||
//TODO: Move this method to another place, shouldn't be on mainwindow.
|
//TODO: Move this method to another place, shouldn't be on mainwindow.
|
||||||
MainWindow::instance()->disableDcShortcuts();
|
MainWindow::instance()->disableDcShortcuts();
|
||||||
|
@ -855,6 +857,10 @@ void ProfileWidget2::setPlanState()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
setProfileState();
|
setProfileState();
|
||||||
|
mouseFollowerHorizontal->setVisible(true);
|
||||||
|
mouseFollowerVertical->setVisible(true);
|
||||||
|
mouseFollowerHorizontal->setLine(timeAxis->line());
|
||||||
|
mouseFollowerVertical->setLine(QLineF(0, profileYAxis->pos().y(), 0, timeAxis->pos().y()));
|
||||||
disconnectTemporaryConnections();
|
disconnectTemporaryConnections();
|
||||||
//TODO: Move this method to another place, shouldn't be on mainwindow.
|
//TODO: Move this method to another place, shouldn't be on mainwindow.
|
||||||
MainWindow::instance()->disableDcShortcuts();
|
MainWindow::instance()->disableDcShortcuts();
|
||||||
|
|
Loading…
Reference in a new issue