mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Better window title
This commit is contained in:
parent
5feec6ac0c
commit
1b5bdc0f07
12
src/gui.cpp
12
src/gui.cpp
@ -547,6 +547,7 @@ bool GUI::openFile(const QString &fileName)
|
||||
|
||||
updateNavigationActions();
|
||||
updateStatusBarInfo();
|
||||
updateWindowTitle();
|
||||
updateGraphTabs();
|
||||
updateTrackView();
|
||||
|
||||
@ -718,6 +719,7 @@ void GUI::reloadFile()
|
||||
}
|
||||
|
||||
updateStatusBarInfo();
|
||||
updateWindowTitle();
|
||||
updateGraphTabs();
|
||||
updateTrackView();
|
||||
if (_files.isEmpty())
|
||||
@ -748,6 +750,7 @@ void GUI::closeAll()
|
||||
|
||||
_fileActionGroup->setEnabled(false);
|
||||
updateStatusBarInfo();
|
||||
updateWindowTitle();
|
||||
updateGraphTabs();
|
||||
updateTrackView();
|
||||
}
|
||||
@ -853,6 +856,15 @@ void GUI::updateStatusBarInfo()
|
||||
_timeLabel->setText(timeSpan(_time));
|
||||
}
|
||||
|
||||
void GUI::updateWindowTitle()
|
||||
{
|
||||
if (_files.count() == 1)
|
||||
setWindowTitle(QFileInfo(_files.at(0)).fileName()
|
||||
+ QString(" - " APP_NAME));
|
||||
else
|
||||
setWindowTitle(APP_NAME);
|
||||
}
|
||||
|
||||
void GUI::mapChanged(int index)
|
||||
{
|
||||
_currentMap = _maps.at(index);
|
||||
|
Loading…
Reference in New Issue
Block a user