diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-08-06 12:33:36 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-06 12:33:36 -0700 |
commit | b0addb456767916935a65361338b0cd68c76eb2f (patch) | |
tree | 03c2ee825d7b08d3e29fca1d3b6015da98492af9 | |
parent | 150783f180f606248fcb0fd64d39856eaad49484 (diff) | |
download | subsurface-b0addb456767916935a65361338b0cd68c76eb2f.tar.gz |
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>
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 2c5bbb0d4..413414ec8 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -814,10 +814,8 @@ void ProfileWidget2::setProfileState() HIDE_ALL(DiveHandler, handles); HIDE_ALL(QGraphicsSimpleTextItem, gases); #undef HIDE_ALL - mouseFollowerHorizontal->setVisible(true); - mouseFollowerVertical->setVisible(true); - mouseFollowerHorizontal->setLine(timeAxis->line()); - mouseFollowerVertical->setLine(QLineF(0, profileYAxis->pos().y(), 0, timeAxis->pos().y())); + mouseFollowerHorizontal->setVisible(false); + mouseFollowerVertical->setVisible(false); } void ProfileWidget2::setAddState() @@ -826,6 +824,10 @@ void ProfileWidget2::setAddState() return; setProfileState(); + mouseFollowerHorizontal->setVisible(true); + mouseFollowerVertical->setVisible(true); + mouseFollowerHorizontal->setLine(timeAxis->line()); + mouseFollowerVertical->setLine(QLineF(0, profileYAxis->pos().y(), 0, timeAxis->pos().y())); disconnectTemporaryConnections(); //TODO: Move this method to another place, shouldn't be on mainwindow. MainWindow::instance()->disableDcShortcuts(); @@ -855,6 +857,10 @@ void ProfileWidget2::setPlanState() return; setProfileState(); + mouseFollowerHorizontal->setVisible(true); + mouseFollowerVertical->setVisible(true); + mouseFollowerHorizontal->setLine(timeAxis->line()); + mouseFollowerVertical->setLine(QLineF(0, profileYAxis->pos().y(), 0, timeAxis->pos().y())); disconnectTemporaryConnections(); //TODO: Move this method to another place, shouldn't be on mainwindow. MainWindow::instance()->disableDcShortcuts(); |