mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-26 21:57:48 +08:00
(ChangePosition): new history navigation method.
Push current position into undo stack only if directory has been changed.
This commit is contained in:
@@ -613,6 +613,14 @@ namespace GARbro.GUI
|
||||
m_history.Push (GetCurrentPosition());
|
||||
}
|
||||
|
||||
public void ChangePosition (DirectoryPosition new_pos)
|
||||
{
|
||||
var current = GetCurrentPosition();
|
||||
if (current.Path != new_pos.Path || current.ArchivePath != new_pos.ArchivePath)
|
||||
SaveCurrentPosition();
|
||||
SetCurrentPosition (new_pos);
|
||||
}
|
||||
|
||||
private void GoBackExec (object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
DirectoryPosition current = m_history.Undo (GetCurrentPosition());
|
||||
|
||||
Reference in New Issue
Block a user