1
0
mirror of synced 2025-02-20 20:51:35 +01:00

Set the default extension for file node wrappers.

This commit is contained in:
KillzXGaming 2020-09-10 18:12:14 -04:00
parent b16d03857f
commit 07b53963ac

View File

@ -170,6 +170,12 @@ namespace Toolbox.Library.NodeWrappers
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = ExportFilter;
sfd.FileName = Text;
if (this is IFileFormat) {
string extension = System.IO.Path.GetExtension(((IFileFormat)this).FilePath);
if (extension != string.Empty) {
sfd.DefaultExt = extension;
}
}
if (sfd.ShowDialog() == DialogResult.OK)
{