mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
fix: should not use Active to close a running popup.
This commit is contained in:
parent
4b405dfc5f
commit
f00ecbd0a1
2 changed files with 6 additions and 18 deletions
|
@ -21,24 +21,11 @@ namespace SourceGit.ViewModels {
|
|||
Active.Popup = popup;
|
||||
}
|
||||
|
||||
public static async void ShowAndStartPopup(Popup popup) {
|
||||
popup.HostPageId = Active.GetId();
|
||||
Active.Popup = popup;
|
||||
|
||||
if (!popup.Check()) return;
|
||||
|
||||
popup.InProgress = true;
|
||||
var task = popup.Sure();
|
||||
if (task != null) {
|
||||
var finished = await task;
|
||||
if (finished) {
|
||||
Active.Popup = null;
|
||||
} else {
|
||||
popup.InProgress = false;
|
||||
}
|
||||
} else {
|
||||
Active.Popup = null;
|
||||
}
|
||||
public static void ShowAndStartPopup(Popup popup) {
|
||||
var dumpPage = Active;
|
||||
popup.HostPageId = dumpPage.GetId();
|
||||
dumpPage.Popup = popup;
|
||||
dumpPage.ProcessPopup();
|
||||
}
|
||||
|
||||
public virtual string GetId() {
|
||||
|
|
|
@ -282,6 +282,7 @@
|
|||
</StackPanel>
|
||||
<TextBlock HorizontalAlignment="Stretch"
|
||||
TextWrapping="Wrap"
|
||||
FontSize="12"
|
||||
FontStyle="Italic"
|
||||
Text="{Binding ProgressDescription}"/>
|
||||
<ProgressBar Margin="0,8,0,0"
|
||||
|
|
Loading…
Reference in a new issue