1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Properly reset the last graph tab

This commit is contained in:
Martin Tůma 2021-03-06 12:19:18 +01:00
parent c6cc34c73f
commit 68f67425c3
2 changed files with 7 additions and 6 deletions

View File

@ -91,7 +91,7 @@ GUI::GUI()
_routeDistance = 0;
_time = 0;
_movingTime = 0;
_lastGraphTab = 0;
_lastTab = 0;
_dataDir = QDir::homePath();
_mapDir = QDir::homePath();
@ -1356,6 +1356,8 @@ void GUI::closeFiles()
for (int i = 0; i < _tabs.count(); i++)
_tabs.at(i)->clear();
_lastTab = 0;
_mapView->clear();
_files.clear();
@ -1730,9 +1732,9 @@ void GUI::graphChanged(int index)
_mapView->setGraph(_tabs.indexOf(gt));
if (_lastGraphTab)
gt->setSliderPosition(_lastGraphTab->sliderPosition());
_lastGraphTab = gt;
if (_lastTab)
gt->setSliderPosition(_lastTab->sliderPosition());
_lastTab = gt;
}
void GUI::updateNavigationActions()

View File

@ -226,6 +226,7 @@ private:
MapView *_mapView;
QTabWidget *_graphTabWidget;
QList<GraphTab*> _tabs;
GraphTab *_lastTab;
POI *_poi;
Map *_map;
@ -239,8 +240,6 @@ private:
DateTimeRange _dateRange;
QString _pathName;
GraphTab *_lastGraphTab;
QList<QByteArray> _windowStates;
QList<QByteArray> _windowGeometries;
int _frameStyle;