fix when someone clicks save without a filename.
Also set initial file name
MODIFY
WalletWasabi.Gui/ManagedDialogs/ManagedFileChooserViewModel.cs
WalletWasabi.Gui/ManagedDialogs/ManagedFileChooserViewModel.cs
@@ -142,6 +142,7 @@ namespace WalletWasabi.Gui.ManagedDialogs
{
_savingFile = true;
_defaultExtension = sfd.DefaultExtension;
+ FileName = sfd.InitialFileName;
}
Navigate(directory, (dialog as FileDialog)?.InitialFileName);
@@ -309,6 +310,8 @@ namespace WalletWasabi.Gui.ManagedDialogs
CompleteRequested?.Invoke(new[] { Location });
}
else if(_savingFile)
+ {
+ if (!string.IsNullOrWhiteSpace(FileName))
{
if (!Path.HasExtension(FileName) && !string.IsNullOrWhiteSpace(_defaultExtension))
{
@@ -317,6 +320,7 @@ namespace WalletWasabi.Gui.ManagedDialogs
CompleteRequested?.Invoke(new[] { Path.Combine(Location, FileName) });
}
+ }
else
{
CompleteRequested?.Invoke(SelectedItems.Select(i => i.Path).ToArray());

fix when someone clicks save without a filename.

Also set initial file name