Remember folder for MCDF Import and Export (#48)

* remember last MCDF directory

* name mcdf export from description
This commit is contained in:
Cara
2023-03-18 20:56:14 +10:30
committed by GitHub
parent fe61b5044b
commit 26db03f215
3 changed files with 15 additions and 4 deletions

View File

@@ -43,12 +43,16 @@ public class GposeUi : WindowMediatorSubscriberBase
{
if (UiSharedService.IconTextButton(FontAwesomeIcon.FolderOpen, "Load MCDF"))
{
_fileDialogManager.OpenFileDialog("Pick MCDF file", ".mcdf", (success, path) =>
_fileDialogManager.OpenFileDialog("Pick MCDF file", ".mcdf", (success, paths) =>
{
if (!success) return;
if (paths.FirstOrDefault() is not { } path) return;
_configService.Current.ExportFolder = Path.GetDirectoryName(path) ?? string.Empty;
_configService.Save();
Task.Run(() => _mareCharaFileManager.LoadMareCharaFile(path));
});
}, 1, Directory.Exists(_configService.Current.ExportFolder) ? _configService.Current.ExportFolder : null);
}
UiSharedService.AttachToolTip("Applies it to the currently selected GPose actor");
if (_mareCharaFileManager.LoadedCharaFile != null)