summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/settings_config_dialog.cpp15
-rw-r--r--tools/editor/settings_config_dialog.h1
2 files changed, 14 insertions, 2 deletions
diff --git a/tools/editor/settings_config_dialog.cpp b/tools/editor/settings_config_dialog.cpp
index f436e369af..50989ea5cb 100644
--- a/tools/editor/settings_config_dialog.cpp
+++ b/tools/editor/settings_config_dialog.cpp
@@ -46,9 +46,18 @@ void EditorSettingsDialog::ok_pressed() {
void EditorSettingsDialog::_settings_changed() {
-
timer->start();
- property_editor->get_property_editor()->update_tree(); // else color's won't update when theme is selected.
+}
+
+void EditorSettingsDialog::_settings_property_edited(const String& p_name) {
+
+ String full_name = property_editor->get_full_item_path(p_name);
+
+ // Small usability workaround to update the text color settings when the
+ // color theme is changed
+ if (full_name == "text_editor/color_theme") {
+ property_editor->get_property_editor()->update_tree();
+ }
}
void EditorSettingsDialog::_settings_save() {
@@ -281,6 +290,7 @@ void EditorSettingsDialog::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_settings_save"),&EditorSettingsDialog::_settings_save);
ObjectTypeDB::bind_method(_MD("_settings_changed"),&EditorSettingsDialog::_settings_changed);
+ ObjectTypeDB::bind_method(_MD("_settings_property_edited"),&EditorSettingsDialog::_settings_property_edited);
ObjectTypeDB::bind_method(_MD("_clear_search_box"),&EditorSettingsDialog::_clear_search_box);
ObjectTypeDB::bind_method(_MD("_clear_shortcut_search_box"),&EditorSettingsDialog::_clear_shortcut_search_box);
ObjectTypeDB::bind_method(_MD("_shortcut_button_pressed"),&EditorSettingsDialog::_shortcut_button_pressed);
@@ -325,6 +335,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
property_editor->get_property_editor()->register_text_enter(search_box);
property_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
vbc->add_child(property_editor);
+ property_editor->get_property_editor()->connect("property_edited", this, "_settings_property_edited");
vbc = memnew( VBoxContainer );
tabs->add_child(vbc);
diff --git a/tools/editor/settings_config_dialog.h b/tools/editor/settings_config_dialog.h
index 68a2b008f0..3b91c7f019 100644
--- a/tools/editor/settings_config_dialog.h
+++ b/tools/editor/settings_config_dialog.h
@@ -64,6 +64,7 @@ class EditorSettingsDialog : public AcceptDialog {
virtual void ok_pressed();
void _settings_changed();
+ void _settings_property_edited(const String& p_name);
void _settings_save();
void _notification(int p_what);