save last visited directory in MainWindow instead of App.

This commit is contained in:
morkt 2014-07-30 01:09:28 +04:00
parent 6005016a07
commit 474548bae5
2 changed files with 10 additions and 1 deletions

View File

@ -74,7 +74,6 @@ namespace GARbro.GUI
void ApplicationExit (object sender, ExitEventArgs e) void ApplicationExit (object sender, ExitEventArgs e)
{ {
Settings.Default.appLastDirectory = Directory.GetCurrentDirectory();
Settings.Default.Save(); Settings.Default.Save();
} }

View File

@ -105,6 +105,16 @@ namespace GARbro.GUI
} }
else else
Settings.Default.lvSortColumn = ""; Settings.Default.lvSortColumn = "";
string cwd = CurrentPath;
if (!string.IsNullOrEmpty (cwd))
{
if (ViewModel.IsArchive)
cwd = Path.GetDirectoryName (cwd);
}
else
cwd = Directory.GetCurrentDirectory();
Settings.Default.appLastDirectory = cwd;
} }
/// <summary> /// <summary>