mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Replace global in_planner variable by helper function
as promised earlier Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4e89a6020e
commit
72806e42bc
4 changed files with 12 additions and 9 deletions
|
@ -1716,7 +1716,6 @@ void MainWindow::setApplicationState(const QByteArray& state) {
|
|||
return;
|
||||
|
||||
currentApplicationState = state;
|
||||
in_planner = (state == "PlanDive" || state == "EditPlannedDive");
|
||||
|
||||
#define SET_CURRENT_INDEX( X ) \
|
||||
if (applicationState[state].X) { \
|
||||
|
@ -1732,3 +1731,8 @@ void MainWindow::setApplicationState(const QByteArray& state) {
|
|||
SET_CURRENT_INDEX( bottomRight )
|
||||
#undef SET_CURRENT_INDEX
|
||||
}
|
||||
|
||||
bool MainWindow::inPlanner()
|
||||
{
|
||||
return (currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue