mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop: remember previous state when switching to dive site mode
The dive-site editing can be reached from two states: from the dive view and the dive list view. It always jumped back to the dive view. Therefore, remember the state. Use a stack-like structure, so that the feature can be used for the dive-site view as well. This is a bit inconsistent, because for example the statistics view does not remember the previous state and allows a direct jump to a different state. That should be fixed at some point. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
17033d0d83
commit
621a0a4e3a
4 changed files with 17 additions and 2 deletions
|
|
@ -72,6 +72,7 @@ public:
|
|||
void importFiles(const QStringList importFiles);
|
||||
void setToolButtonsEnabled(bool enabled);
|
||||
void setApplicationState(ApplicationState state);
|
||||
void enterPreviousState();
|
||||
NotificationWidget *getNotificationWidget();
|
||||
void enableDisableCloudActions();
|
||||
void enableDisableOtherDCsActions();
|
||||
|
|
@ -162,6 +163,7 @@ slots:
|
|||
|
||||
private:
|
||||
ApplicationState appState;
|
||||
std::vector<ApplicationState> state_stack;
|
||||
Ui::MainWindow ui;
|
||||
FilterWidget filterWidget;
|
||||
std::unique_ptr<QSplitter> topSplitter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue