mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
enhance: disable CONTINUE
button while it is running (#1046)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
35ee4a47db
commit
d4bcc60113
2 changed files with 14 additions and 1 deletions
|
@ -440,6 +440,8 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
public void ContinueMerge()
|
public void ContinueMerge()
|
||||||
{
|
{
|
||||||
|
IsCommitting = true;
|
||||||
|
|
||||||
if (_inProgressContext != null)
|
if (_inProgressContext != null)
|
||||||
{
|
{
|
||||||
_repo.SetWatcherEnabled(false);
|
_repo.SetWatcherEnabled(false);
|
||||||
|
@ -456,17 +458,21 @@ namespace SourceGit.ViewModels
|
||||||
CommitMessage = string.Empty;
|
CommitMessage = string.Empty;
|
||||||
|
|
||||||
_repo.SetWatcherEnabled(true);
|
_repo.SetWatcherEnabled(true);
|
||||||
|
IsCommitting = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_repo.MarkWorkingCopyDirtyManually();
|
_repo.MarkWorkingCopyDirtyManually();
|
||||||
|
IsCommitting = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SkipMerge()
|
public void SkipMerge()
|
||||||
{
|
{
|
||||||
|
IsCommitting = true;
|
||||||
|
|
||||||
if (_inProgressContext != null)
|
if (_inProgressContext != null)
|
||||||
{
|
{
|
||||||
_repo.SetWatcherEnabled(false);
|
_repo.SetWatcherEnabled(false);
|
||||||
|
@ -479,17 +485,21 @@ namespace SourceGit.ViewModels
|
||||||
CommitMessage = string.Empty;
|
CommitMessage = string.Empty;
|
||||||
|
|
||||||
_repo.SetWatcherEnabled(true);
|
_repo.SetWatcherEnabled(true);
|
||||||
|
IsCommitting = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_repo.MarkWorkingCopyDirtyManually();
|
_repo.MarkWorkingCopyDirtyManually();
|
||||||
|
IsCommitting = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AbortMerge()
|
public void AbortMerge()
|
||||||
{
|
{
|
||||||
|
IsCommitting = true;
|
||||||
|
|
||||||
if (_inProgressContext != null)
|
if (_inProgressContext != null)
|
||||||
{
|
{
|
||||||
_repo.SetWatcherEnabled(false);
|
_repo.SetWatcherEnabled(false);
|
||||||
|
@ -502,12 +512,14 @@ namespace SourceGit.ViewModels
|
||||||
CommitMessage = string.Empty;
|
CommitMessage = string.Empty;
|
||||||
|
|
||||||
_repo.SetWatcherEnabled(true);
|
_repo.SetWatcherEnabled(true);
|
||||||
|
IsCommitting = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_repo.MarkWorkingCopyDirtyManually();
|
_repo.MarkWorkingCopyDirtyManually();
|
||||||
|
IsCommitting = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,7 +397,8 @@
|
||||||
Width="0" Height="0"
|
Width="0" Height="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Command="{Binding CommitWithAutoStage}"
|
Command="{Binding CommitWithAutoStage}"
|
||||||
HotKey="{OnPlatform Ctrl+Shift+Enter, macOS=⌘+Shift+Enter}"/>
|
HotKey="{OnPlatform Ctrl+Shift+Enter, macOS=⌘+Shift+Enter}"
|
||||||
|
IsEnabled="{Binding !IsCommitting}"/>
|
||||||
|
|
||||||
<Button Grid.Column="8"
|
<Button Grid.Column="8"
|
||||||
Classes="flat"
|
Classes="flat"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue