Set default extension in Windows file dialog
On Windows when you open the save dialog and switch the filter, the extension is supposed to change accordingly. It didn't happen with the existing code, since the existing code didn't set the default extension (should be set to the first filter). This resolves #2915.
This commit is contained in:
parent
fd9eadd1fa
commit
6dcc752f67
1 changed files with 3 additions and 0 deletions
|
@ -79,6 +79,9 @@ class FileDialog {
|
|||
if (!title.empty())
|
||||
GetPtr()->SetTitle(base::UTF8ToUTF16(title).c_str());
|
||||
|
||||
if (!filterspec.empty())
|
||||
GetPtr()->SetDefaultExtension(filterspec.front().pszSpec);
|
||||
|
||||
SetDefaultFolder(default_path);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue