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++)
|
for (int i = 0; i < _tabs.count(); i++)
|
||||||
graphs.append(_tabs.at(i)->loadData(data, _map));
|
graphs.append(_tabs.at(i)->loadData(data, _map));
|
||||||
updateGraphTabs();
|
if (updateGraphTabs())
|
||||||
|
_splitter->refresh();
|
||||||
paths = _mapView->loadData(data);
|
paths = _mapView->loadData(data);
|
||||||
|
|
||||||
GraphTab *gt = static_cast<GraphTab*>(_graphTabWidget->currentWidget());
|
GraphTab *gt = static_cast<GraphTab*>(_graphTabWidget->currentWidget());
|
||||||
@ -1619,7 +1620,7 @@ void GUI::closeAll()
|
|||||||
|
|
||||||
void GUI::showGraphs(bool show)
|
void GUI::showGraphs(bool show)
|
||||||
{
|
{
|
||||||
_graphTabWidget->setVisible(show);
|
_graphTabWidget->setHidden(!show);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
@ -2219,10 +2220,11 @@ void GUI::updateNavigationActions()
|
|||||||
#endif // Q_OS_ANDROID
|
#endif // Q_OS_ANDROID
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::updateGraphTabs()
|
bool GUI::updateGraphTabs()
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
GraphTab *tab;
|
GraphTab *tab;
|
||||||
|
bool hidden = _graphTabWidget->isHidden();
|
||||||
|
|
||||||
for (int i = 0; i < _tabs.size(); i++) {
|
for (int i = 0; i < _tabs.size(); i++) {
|
||||||
tab = _tabs.at(i);
|
tab = _tabs.at(i);
|
||||||
@ -2240,12 +2242,14 @@ void GUI::updateGraphTabs()
|
|||||||
((_showTracksAction->isChecked() && _trackCount)
|
((_showTracksAction->isChecked() && _trackCount)
|
||||||
|| (_showRoutesAction->isChecked() && _routeCount))) {
|
|| (_showRoutesAction->isChecked() && _routeCount))) {
|
||||||
if (_showGraphsAction->isChecked())
|
if (_showGraphsAction->isChecked())
|
||||||
_graphTabWidget->show();
|
_graphTabWidget->setHidden(false);
|
||||||
_showGraphsAction->setEnabled(true);
|
_showGraphsAction->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
_graphTabWidget->hide();
|
_graphTabWidget->setHidden(true);
|
||||||
_showGraphsAction->setEnabled(false);
|
_showGraphsAction->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (hidden != _graphTabWidget->isHidden());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::updateDataDEMDownloadAction()
|
void GUI::updateDataDEMDownloadAction()
|
||||||
|
@ -165,7 +165,7 @@ private:
|
|||||||
QMenu *menu, const QList<QAction*> &existingActions, int &showError);
|
QMenu *menu, const QList<QAction*> &existingActions, int &showError);
|
||||||
void updateStatusBarInfo();
|
void updateStatusBarInfo();
|
||||||
void updateWindowTitle();
|
void updateWindowTitle();
|
||||||
void updateGraphTabs();
|
bool updateGraphTabs();
|
||||||
void updateDataDEMDownloadAction();
|
void updateDataDEMDownloadAction();
|
||||||
void updateMapDEMDownloadAction();
|
void updateMapDEMDownloadAction();
|
||||||
#ifndef Q_OS_ANDROID
|
#ifndef Q_OS_ANDROID
|
||||||
|
Loading…
Reference in New Issue
Block a user