mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
refactor: select the previous tab while closing the actived one (#621)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
b175ab3a3e
commit
4a6cbddeac
1 changed files with 1 additions and 6 deletions
|
@ -204,12 +204,7 @@ namespace SourceGit.ViewModels
|
|||
var activeIdx = Pages.IndexOf(_activePage);
|
||||
if (removeIdx == activeIdx)
|
||||
{
|
||||
ActivePage = Pages[removeIdx == Pages.Count - 1 ? removeIdx - 1 : removeIdx + 1];
|
||||
CloseRepositoryInTab(page);
|
||||
Pages.RemoveAt(removeIdx);
|
||||
}
|
||||
else if (removeIdx + 1 == activeIdx)
|
||||
{
|
||||
ActivePage = Pages[removeIdx > 0 ? removeIdx - 1 : removeIdx + 1];
|
||||
CloseRepositoryInTab(page);
|
||||
Pages.RemoveAt(removeIdx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue