1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +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); _navigationActionGroup->setEnabled(true);
updateNavigationActions(); updateNavigationActions();
return true; return true;
} else } else {
updateNavigationActions();
return false; return false;
}
} }
bool GUI::loadFile(const QString &fileName) bool GUI::loadFile(const QString &fileName)
@ -537,7 +539,6 @@ void GUI::closeFile()
_files.clear(); _files.clear();
_fileActionGroup->setEnabled(false); _fileActionGroup->setEnabled(false);
_navigationActionGroup->setEnabled(false);
updateStatusBarInfo(); updateStatusBarInfo();
} }
@ -640,8 +641,6 @@ void GUI::next()
closeFile(); closeFile();
openFile(file); openFile(file);
updateNavigationActions();
} }
void GUI::prev() void GUI::prev()
@ -652,8 +651,6 @@ void GUI::prev()
closeFile(); closeFile();
openFile(file); openFile(file);
updateNavigationActions();
} }
void GUI::last() void GUI::last()
@ -664,8 +661,6 @@ void GUI::last()
closeFile(); closeFile();
openFile(file); openFile(file);
updateNavigationActions();
} }
void GUI::first() void GUI::first()
@ -676,8 +671,6 @@ void GUI::first()
closeFile(); closeFile();
openFile(file); openFile(file);
updateNavigationActions();
} }
void GUI::keyPressEvent(QKeyEvent *event) void GUI::keyPressEvent(QKeyEvent *event)
@ -704,6 +697,4 @@ void GUI::keyPressEvent(QKeyEvent *event)
closeFile(); closeFile();
openFile(file); openFile(file);
} }
updateNavigationActions();
} }