(ChangePosition): new history navigation method.

Push current position into undo stack only if directory has been
changed.
This commit is contained in:
morkt
2014-08-14 21:42:27 +04:00
parent d1bde19bb3
commit cfd71f5519
2 changed files with 9 additions and 2 deletions

View File

@@ -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());