mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
feature: remember last active tab index if restore tabs is enabled
This commit is contained in:
parent
0e824f12b4
commit
3bf962d745
2 changed files with 11 additions and 0 deletions
|
@ -30,6 +30,11 @@ namespace SourceGit.ViewModels {
|
|||
|
||||
OpenRepositoryInTab(node, null);
|
||||
}
|
||||
|
||||
var lastActiveIdx = Preference.Instance.LastActiveTabIdx;
|
||||
if (lastActiveIdx >= 0 && lastActiveIdx < Pages.Count) {
|
||||
ActivePage = Pages[lastActiveIdx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +47,7 @@ namespace SourceGit.ViewModels {
|
|||
}
|
||||
}
|
||||
|
||||
Preference.Instance.LastActiveTabIdx = Pages.IndexOf(ActivePage);
|
||||
Preference.Save();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue