mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Revert "Clean up the splitter/graph tabs logic"
This reverts commit b01dcc4569
.
This commit is contained in:
parent
b01dcc4569
commit
17ef334c4c
@ -1171,7 +1171,8 @@ void GUI::loadData(const Data &data)
|
||||
|
||||
for (int i = 0; i < _tabs.count(); i++)
|
||||
graphs.append(_tabs.at(i)->loadData(data, _map));
|
||||
updateGraphTabs();
|
||||
if (updateGraphTabs())
|
||||
_splitter->refresh();
|
||||
paths = _mapView->loadData(data);
|
||||
|
||||
GraphTab *gt = static_cast<GraphTab*>(_graphTabWidget->currentWidget());
|
||||
@ -1619,7 +1620,7 @@ void GUI::closeAll()
|
||||
|
||||
void GUI::showGraphs(bool show)
|
||||
{
|
||||
_graphTabWidget->setVisible(show);
|
||||
_graphTabWidget->setHidden(!show);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
@ -2219,10 +2220,11 @@ void GUI::updateNavigationActions()
|
||||
#endif // Q_OS_ANDROID
|
||||
}
|
||||
|
||||
void GUI::updateGraphTabs()
|
||||
bool GUI::updateGraphTabs()
|
||||
{
|
||||
int index;
|
||||
GraphTab *tab;
|
||||
bool hidden = _graphTabWidget->isHidden();
|
||||
|
||||
for (int i = 0; i < _tabs.size(); i++) {
|
||||
tab = _tabs.at(i);
|
||||
@ -2240,12 +2242,14 @@ void GUI::updateGraphTabs()
|
||||
((_showTracksAction->isChecked() && _trackCount)
|
||||
|| (_showRoutesAction->isChecked() && _routeCount))) {
|
||||
if (_showGraphsAction->isChecked())
|
||||
_graphTabWidget->show();
|
||||
_graphTabWidget->setHidden(false);
|
||||
_showGraphsAction->setEnabled(true);
|
||||
} else {
|
||||
_graphTabWidget->hide();
|
||||
_graphTabWidget->setHidden(true);
|
||||
_showGraphsAction->setEnabled(false);
|
||||
}
|
||||
|
||||
return (hidden != _graphTabWidget->isHidden());
|
||||
}
|
||||
|
||||
void GUI::updateDataDEMDownloadAction()
|
||||
|
@ -165,7 +165,7 @@ private:
|
||||
QMenu *menu, const QList<QAction*> &existingActions, int &showError);
|
||||
void updateStatusBarInfo();
|
||||
void updateWindowTitle();
|
||||
void updateGraphTabs();
|
||||
bool updateGraphTabs();
|
||||
void updateDataDEMDownloadAction();
|
||||
void updateMapDEMDownloadAction();
|
||||
#ifndef Q_OS_ANDROID
|
||||
|
Loading…
Reference in New Issue
Block a user