diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-03-17 15:21:00 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-03-17 09:49:58 +0100 |
| commit | 7321b9078c86d640c0df6120134d9c2a2274e4aa (patch) | |
| tree | bc92d852b7c6e27746d54875c3f528f54d730893 /src/main.cpp | |
| parent | f60dac9d7ebb5b989aad67d67d5ab3ccef7d278c (diff) | |
| download | kristall-7321b9078c86d640c0df6120134d9c2a2274e4aa.tar.gz | |
sessions: restore window tab indices
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index c881ee8..2554535 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -704,6 +704,9 @@ int main(int argc, char *argv[]) auto * const window = kristall::openNewWindow(urls); + int tab_index = settings.value("tab_index").toInt(); + window->setCurrentTabIndex(tab_index); + if(settings.contains("state")) { window->restoreState(settings.value("state").toByteArray()); } @@ -1066,6 +1069,8 @@ void kristall::saveSession() } settings.endArray(); + settings.setValue("tab_index", main_window->currentTabIndex()); + window_index += 1; }); |
