diff --git a/GarCreate.cs b/GarCreate.cs index 9023f4e1..4cd1dd54 100644 --- a/GarCreate.cs +++ b/GarCreate.cs @@ -188,8 +188,7 @@ namespace GARbro.GUI { Settings.Default.appLastCreatedArchive = m_arc_name; m_main.Dispatcher.Invoke (() => { - m_main.SaveCurrentPosition(); - m_main.SetCurrentPosition (new DirectoryPosition (m_arc_name)); + m_main.ChangePosition (new DirectoryPosition (m_arc_name)); }); } else diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index d07cd36b..3a04a097 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -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());