Fixes add group in Group Editor dialog

Before this fix, new group can't be created if any existing group starts
with the new name.
This commit is contained in:
Haoyu Qiu
2020-02-02 11:07:01 +08:00
parent 0edcb8ed58
commit 421ea09195
3 changed files with 15 additions and 1 deletions

View File

@ -197,7 +197,7 @@ void GroupDialog::_add_group(String p_name) {
}
String name = p_name.strip_edges();
if (name == "" || groups->search_item_text(name)) {
if (name.empty() || groups->get_item_with_text(name)) {
return;
}