1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Fixed navigation logic

This commit is contained in:
Martin Tůma 2015-12-19 13:15:13 +01:00
parent 0374e59bce
commit 3bba3d6cd7

View File

@ -400,8 +400,10 @@ bool GUI::openFile(const QString &fileName)
_navigationActionGroup->setEnabled(true);
updateNavigationActions();
return true;
} else
} else {
updateNavigationActions();
return false;
}
}
bool GUI::loadFile(const QString &fileName)
@ -537,7 +539,6 @@ void GUI::closeFile()
_files.clear();
_fileActionGroup->setEnabled(false);
_navigationActionGroup->setEnabled(false);
updateStatusBarInfo();
}
@ -640,8 +641,6 @@ void GUI::next()
closeFile();
openFile(file);
updateNavigationActions();
}
void GUI::prev()
@ -652,8 +651,6 @@ void GUI::prev()
closeFile();
openFile(file);
updateNavigationActions();
}
void GUI::last()
@ -664,8 +661,6 @@ void GUI::last()
closeFile();
openFile(file);
updateNavigationActions();
}
void GUI::first()
@ -676,8 +671,6 @@ void GUI::first()
closeFile();
openFile(file);
updateNavigationActions();
}
void GUI::keyPressEvent(QKeyEvent *event)
@ -704,6 +697,4 @@ void GUI::keyPressEvent(QKeyEvent *event)
closeFile();
openFile(file);
}
updateNavigationActions();
}