Continue to separate logic code from UI code

We don't want to call into the MainWindow from C code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-08-22 07:05:13 -07:00
parent e86fd45efd
commit ccd2cb2502
4 changed files with 17 additions and 9 deletions

View file

@ -1731,10 +1731,10 @@ void MainWindow::setApplicationState(const QByteArray& state) {
if (!applicationState.keys().contains(state))
return;
if (currentApplicationState == state)
if (getCurrentAppState() == state)
return;
currentApplicationState = state;
setCurrentAppState(state);
#define SET_CURRENT_INDEX( X ) \
if (applicationState[state].X) { \
@ -1762,8 +1762,3 @@ void MainWindow::setApplicationState(const QByteArray& state) {
}
#undef SET_CURRENT_INDEX
}
bool MainWindow::inPlanner()
{
return (currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive");
}