Set the default extension for file node wrappers.
This commit is contained in:
parent
b16d03857f
commit
07b53963ac
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user