summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-01-08 16:27:15 +0100
committerkobewi <kobewi4e@gmail.com>2022-01-08 16:27:15 +0100
commitb403954e41f2e47d77a8ee67798cefaeeb6f6588 (patch)
tree8c802c63223f3c940c3489e752c32e030205f6e5 /scene/gui
parent13d25f99805c7c970708277ceae6ae3b84893642 (diff)
Improve FileDialog filters
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/file_dialog.cpp1
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();