mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 08:55:39 +08:00
(GUI): don't clear preview pane before switching to another image.
This commit is contained in:
parent
8b1bf35a20
commit
f0ca4a57ca
@ -61,7 +61,7 @@ namespace GARbro.GUI
|
|||||||
m_active_viewer = value;
|
m_active_viewer = value;
|
||||||
m_active_viewer.Visibility = Visibility.Visible;
|
m_active_viewer.Visibility = Visibility.Visible;
|
||||||
bool exists = false;
|
bool exists = false;
|
||||||
foreach (var c in PreviewPane.Children.Cast<UIElement>())
|
foreach (UIElement c in PreviewPane.Children)
|
||||||
{
|
{
|
||||||
if (c != m_active_viewer)
|
if (c != m_active_viewer)
|
||||||
c.Visibility = Visibility.Collapsed;
|
c.Visibility = Visibility.Collapsed;
|
||||||
@ -163,11 +163,9 @@ namespace GARbro.GUI
|
|||||||
SetStatusText ("");
|
SetStatusText ("");
|
||||||
var vm = ViewModel;
|
var vm = ViewModel;
|
||||||
m_current_preview = new PreviewFile { Path = vm.Path, Name = entry.Name, Entry = entry };
|
m_current_preview = new PreviewFile { Path = vm.Path, Name = entry.Name, Entry = entry };
|
||||||
ImageCanvas.Source = null;
|
|
||||||
TextView.Clear();
|
|
||||||
if (!IsPreviewPossible (entry))
|
if (!IsPreviewPossible (entry))
|
||||||
{
|
{
|
||||||
ActiveViewer = ImageView;
|
ResetPreviewPane();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ("image" != entry.Type)
|
if ("image" != entry.Type)
|
||||||
@ -216,6 +214,7 @@ namespace GARbro.GUI
|
|||||||
}
|
}
|
||||||
catch (Exception X)
|
catch (Exception X)
|
||||||
{
|
{
|
||||||
|
ResetPreviewPane();
|
||||||
SetStatusText (X.Message);
|
SetStatusText (X.Message);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -236,6 +235,7 @@ namespace GARbro.GUI
|
|||||||
}
|
}
|
||||||
catch (Exception X)
|
catch (Exception X)
|
||||||
{
|
{
|
||||||
|
Dispatcher.Invoke (ResetPreviewPane);
|
||||||
SetStatusText (X.Message);
|
SetStatusText (X.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user