We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6b4538 commit 67e392dCopy full SHA for 67e392d
druid-shell/src/backend/gtk/dialog.rs
@@ -59,13 +59,12 @@ pub(crate) fn get_file_dialog_path(
59
if let Some(file_types) = &options.allowed_types {
60
for f in file_types {
61
let filter = file_filter(f);
62
+ // We need to clone filter, because we may need it again for the default filter.
63
+ // It has to be the same FileFilter instance and can't be a new file_filter() call.
64
dialog.add_filter(filter.clone());
65
66
if let Some(default) = &options.default_type {
67
if default == f {
- // Note that we're providing the same FileFilter object to
- // add_filter and set_filter, because gtk checks them for
68
- // identity, not structural equality.
69
dialog.set_filter(&filter);
70
found_default_filter = true;
71
}
0 commit comments