mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 21:54:59 +00:00
fix: System.NullReferenceException
raised after popup stop (success or not) running
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
22d4f26bc3
commit
00e56ce9d1
2 changed files with 5 additions and 12 deletions
|
@ -15,8 +15,7 @@
|
||||||
<TextBlock Margin="6,0,0,0" FontSize="14" FontWeight="Bold" Text="{DynamicResource Text.Running}"/>
|
<TextBlock Margin="6,0,0,0" FontSize="14" FontWeight="Bold" Text="{DynamicResource Text.Running}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<TextBlock x:Name="TxtDesc"
|
<TextBlock HorizontalAlignment="Stretch"
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
FontSize="{Binding Source={x:Static vm:Preferences.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Decrease}}"
|
FontSize="{Binding Source={x:Static vm:Preferences.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Decrease}}"
|
||||||
FontStyle="Italic"
|
FontStyle="Italic"
|
||||||
|
|
|
@ -21,17 +21,9 @@ namespace SourceGit.Views
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnLoaded(RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnLoaded(e);
|
|
||||||
|
|
||||||
if (IsVisible)
|
|
||||||
StartAnim();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnUnloaded(RoutedEventArgs e)
|
protected override void OnUnloaded(RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
StopAnim();
|
_isUnloading = true;
|
||||||
base.OnUnloaded(e);
|
base.OnUnloaded(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +33,7 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
if (change.Property == IsVisibleProperty)
|
if (change.Property == IsVisibleProperty)
|
||||||
{
|
{
|
||||||
if (IsVisible)
|
if (IsVisible && !_isUnloading)
|
||||||
StartAnim();
|
StartAnim();
|
||||||
else
|
else
|
||||||
StopAnim();
|
StopAnim();
|
||||||
|
@ -61,5 +53,7 @@ namespace SourceGit.Views
|
||||||
Icon.Content = null;
|
Icon.Content = null;
|
||||||
ProgressBar.IsIndeterminate = false;
|
ProgressBar.IsIndeterminate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool _isUnloading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue