GTK: Fix a warning for file->open dialogs.
SetCurrentName only applies to save dialogs, so call it conditionally.pull/899/head
parent
36719c6234
commit
d3951afb12
|
@ -1295,14 +1295,17 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
//TODO: This is not getting called when the extension selection is changed.
|
||||
void FilterChanged() {
|
||||
std::string extension = GetExtension();
|
||||
if(extension.empty())
|
||||
return;
|
||||
|
||||
Platform::Path path = GetFilename();
|
||||
if(gtkChooser->get_action() != GTK_FILE_CHOOSER_ACTION_OPEN) {
|
||||
SetCurrentName(path.WithExtension(extension).FileName());
|
||||
}
|
||||
}
|
||||
|
||||
void FreezeChoices(SettingsRef settings, const std::string &key) override {
|
||||
settings->FreezeString("Dialog_" + key + "_Folder",
|
||||
|
|
Loading…
Reference in New Issue