summaryrefslogtreecommitdiff
path: root/editor/project_settings_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/project_settings_editor.cpp')
-rw-r--r--editor/project_settings_editor.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 704ec40e4c..9625bc19c0 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -750,7 +750,16 @@ void ProjectSettingsEditor::_item_add() {
String catname = category->get_text().strip_edges();
String propname = property->get_text().strip_edges();
- String name = catname != "" ? catname + "/" + propname : propname;
+
+ if (propname.empty()) {
+ return;
+ }
+
+ if (catname.empty()) {
+ catname = "global";
+ }
+
+ String name = catname + "/" + propname;
undo_redo->create_action(TTR("Add Global Property"));
@@ -1586,7 +1595,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
props_base->add_child(hbc);
- search_button = memnew(ToolButton);
+ search_button = memnew(Button);
search_button->set_toggle_mode(true);
search_button->set_pressed(false);
search_button->set_text(TTR("Search"));