mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-06 05:38:48 +08:00
(ImagePreview): better recognize new entry.
use entry object instead of its name.
This commit is contained in:
@@ -79,9 +79,9 @@ namespace GARbro.GUI
|
|||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public Entry Entry { get; set; }
|
public Entry Entry { get; set; }
|
||||||
|
|
||||||
public bool IsEqual (IEnumerable<string> path, string name)
|
public bool IsEqual (IEnumerable<string> path, Entry entry)
|
||||||
{
|
{
|
||||||
return Path != null && path.SequenceEqual (Path) && name.Equals (Name);
|
return Path != null && path.SequenceEqual (Path) && Entry == entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ namespace GARbro.GUI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void PreviewEntry (Entry entry)
|
private void PreviewEntry (Entry entry)
|
||||||
{
|
{
|
||||||
if (m_current_preview.IsEqual (ViewModel.Path, entry.Name))
|
if (m_current_preview.IsEqual (ViewModel.Path, entry))
|
||||||
return;
|
return;
|
||||||
UpdatePreviewPane (entry);
|
UpdatePreviewPane (entry);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user