summaryrefslogtreecommitdiff
path: root/tools/editor/project_settings.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2015-12-15 08:45:34 +0100
committerRémi Verschelde <rverschelde@gmail.com>2015-12-15 08:45:34 +0100
commit87a415f2757c6f3b92b72bc1796a44ab89f83aad (patch)
tree66ef668e25b2d91d0e21c88b7a9eac38f21e843e /tools/editor/project_settings.cpp
parent69c79c0d4a6107313c24fa1202d9709551d95c03 (diff)
Prevent deleting input presets as it does not work
Follow-up of #3076. Now the only thing possible to do with input presets is to add/remove key bindings. It was already the case previously but it's now clearer in the UI.
Diffstat (limited to 'tools/editor/project_settings.cpp')
-rw-r--r--tools/editor/project_settings.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp
index 2ca15449aa..b9a28312e2 100644
--- a/tools/editor/project_settings.cpp
+++ b/tools/editor/project_settings.cpp
@@ -427,9 +427,10 @@ void ProjectSettings::_update_actions() {
item->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
item->set_text(0,name);
item->add_button(0,get_icon("Add","EditorIcons"),1);
- if (!Globals::get_singleton()->get_input_presets().find(pi.name))
+ if (!Globals::get_singleton()->get_input_presets().find(pi.name)) {
item->add_button(0,get_icon("Rename","EditorIcons"),2);
- item->add_button(0,get_icon("Remove","EditorIcons"),3);
+ item->add_button(0,get_icon("Remove","EditorIcons"),3);
+ }
item->set_custom_bg_color(0,get_color("prop_subsection","Editor"));
item->set_editable(0,true);
item->set_checked(0,pi.usage&PROPERTY_USAGE_CHECKED);