mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
enhance: stop switching workspace when one or more tasks are running in opened pages
This commit is contained in:
parent
6ca6399bd3
commit
c67cdb931f
1 changed files with 9 additions and 0 deletions
|
@ -465,6 +465,15 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
private void SwitchWorkspace(Workspace to)
|
private void SwitchWorkspace(Workspace to)
|
||||||
{
|
{
|
||||||
|
foreach (var one in Pages)
|
||||||
|
{
|
||||||
|
if (one.IsInProgress())
|
||||||
|
{
|
||||||
|
App.RaiseException(null, "You have unfinished task(s) in opened pages. Please wait!!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_ignoreIndexChange = true;
|
_ignoreIndexChange = true;
|
||||||
|
|
||||||
var pref = Preference.Instance;
|
var pref = Preference.Instance;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue