summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-04-29 20:08:07 +0100
committersr55 <[email protected]>2017-04-29 20:08:07 +0100
commitb652292b6ae12e95f6ef24804a4cf8b51f32c47a (patch)
tree006d4ebc1946a39f30e63a75b21b82b9760da057 /win/CS
parent8c5233a199f09615c0924957bc602f33f89d9533 (diff)
WinGui: Minor change that might help #688
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/Services/Scan/LibScan.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs6
2 files changed, 5 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs
index fdeb88b2d..eac84f263 100644
--- a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs
+++ b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs
@@ -144,8 +144,7 @@ namespace HandBrakeWPF.Services.Scan
{
this.ServiceLogMessage("Stopping Scan ...");
this.IsScanning = false;
- this.instance.StopScan();
- this.ServiceLogMessage("Scan Stopped ...");
+ this.instance.StopScan();
}
catch (Exception exc)
{
@@ -154,6 +153,7 @@ namespace HandBrakeWPF.Services.Scan
finally
{
this.ScanCompleted?.Invoke(this, new ScanCompletedEventArgs(this.isCancelled, null, null, null));
+ this.ServiceLogMessage("Scan Stopped ...");
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index c11400bd7..c8a59bbbc 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -2336,6 +2336,8 @@ namespace HandBrakeWPF.ViewModels
/// </param>
private void ScanCompleted(object sender, ScanCompletedEventArgs e)
{
+ this.ShowStatusWindow = false;
+
if (e.ScannedSource != null && !e.Cancelled)
{
if (this.ScannedSource == null)
@@ -2351,9 +2353,7 @@ namespace HandBrakeWPF.ViewModels
Execute.OnUIThread(() =>
{
- this.ShowStatusWindow = false;
-
- if (e.Successful)
+ if (e.Successful && this.ScannedSource != null)
{
this.NotifyOfPropertyChange(() => this.ScannedSource);
this.NotifyOfPropertyChange(() => this.ScannedSource.Titles);