diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-09 00:52:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-09 00:52:29 +0100 |
commit | 5a61822d7ccab39b00ddd5c9bcc01fb04112b976 (patch) | |
tree | 54c57c13dfc8806c8446a36167f1ea765645465e /scene/gui | |
parent | d332412dc61f1bb7e3dd957ac3609a74dfdfcd0c (diff) | |
parent | b403954e41f2e47d77a8ee67798cefaeeb6f6588 (diff) |
Merge pull request #56626 from KoBeWi/FilterDialog
Improve FileDialog filters
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/file_dialog.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 389c368409..f9b6b1274d 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -649,6 +649,7 @@ void FileDialog::clear_filters() { } void FileDialog::add_filter(const String &p_filter) { + ERR_FAIL_COND_MSG(p_filter.begins_with("."), "Filter must be \"filename.extension\", can't start with dot."); filters.push_back(p_filter); update_filters(); invalidate(); |