summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_help_search.cpp18
-rw-r--r--editor/editor_help_search.h1
-rw-r--r--editor/editor_settings.cpp2
-rw-r--r--editor/scene_tree_editor.cpp43
-rw-r--r--editor/scene_tree_editor.h2
-rw-r--r--editor/script_editor_debugger.cpp12
6 files changed, 18 insertions, 60 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 21cddc8ca4..616a52e25b 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -45,21 +45,6 @@ void EditorHelpSearch::_update_icons() {
_update_results();
}
-void EditorHelpSearch::_load_settings() {
-
- bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
-
- if (enable_rl) {
- results_tree->add_constant_override("draw_relationship_lines", 1);
- results_tree->add_color_override("relationship_line_color", rl_color);
- results_tree->add_constant_override("draw_guides", 0);
- } else {
- results_tree->add_constant_override("draw_relationship_lines", 0);
- results_tree->add_constant_override("draw_guides", 1);
- }
-}
-
void EditorHelpSearch::_update_results() {
String term = search_box->get_text();
@@ -120,7 +105,6 @@ void EditorHelpSearch::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- _load_settings();
_update_icons();
} break;
case NOTIFICATION_ENTER_TREE: {
@@ -264,8 +248,6 @@ EditorHelpSearch::EditorHelpSearch() {
results_tree->connect("item_activated", this, "_confirmed");
results_tree->connect("item_selected", get_ok(), "set_disabled", varray(false));
vbox->add_child(results_tree, true);
-
- _load_settings();
}
bool EditorHelpSearch::Runner::_slice() {
diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h
index e74bfdc5b6..93cf66a0dd 100644
--- a/editor/editor_help_search.h
+++ b/editor/editor_help_search.h
@@ -64,7 +64,6 @@ class EditorHelpSearch : public ConfirmationDialog {
Ref<Runner> search;
void _update_icons();
- void _load_settings();
void _update_results();
void _search_box_gui_input(const Ref<InputEvent> &p_event);
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index aa2b52617d..8d590e5268 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -392,8 +392,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// SceneTree
_initial_set("docks/scene_tree/start_create_dialog_fully_expanded", false);
- _initial_set("docks/scene_tree/draw_relationship_lines", true);
- _initial_set("docks/scene_tree/relationship_line_color", Color::html("464646"));
// FileSystem
_initial_set("docks/filesystem/thumbnail_size", 64);
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 4c23ae437b..8cfc6d4e8e 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -549,32 +549,28 @@ void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_
void SceneTreeEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_TREE) {
-
- get_tree()->connect("tree_changed", this, "_tree_changed");
- get_tree()->connect("node_removed", this, "_node_removed");
- get_tree()->connect("node_configuration_warning_changed", this, "_warning_changed");
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
- tree->connect("item_collapsed", this, "_cell_collapsed");
+ get_tree()->connect("tree_changed", this, "_tree_changed");
+ get_tree()->connect("node_removed", this, "_node_removed");
+ get_tree()->connect("node_configuration_warning_changed", this, "_warning_changed");
- EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
- _editor_settings_changed();
+ tree->connect("item_collapsed", this, "_cell_collapsed");
- //get_scene()->connect("tree_changed",this,"_tree_changed",Vector<Variant>(),CONNECT_DEFERRED);
- //get_scene()->connect("node_removed",this,"_node_removed",Vector<Variant>(),CONNECT_DEFERRED);
- _update_tree();
- }
- if (p_what == NOTIFICATION_EXIT_TREE) {
+ _update_tree();
+ } break;
+ case NOTIFICATION_EXIT_TREE: {
- get_tree()->disconnect("tree_changed", this, "_tree_changed");
- get_tree()->disconnect("node_removed", this, "_node_removed");
- tree->disconnect("item_collapsed", this, "_cell_collapsed");
- get_tree()->disconnect("node_configuration_warning_changed", this, "_warning_changed");
- EditorSettings::get_singleton()->disconnect("settings_changed", this, "_editor_settings_changed");
- }
- if (p_what == NOTIFICATION_THEME_CHANGED) {
+ get_tree()->disconnect("tree_changed", this, "_tree_changed");
+ get_tree()->disconnect("node_removed", this, "_node_removed");
+ tree->disconnect("item_collapsed", this, "_cell_collapsed");
+ get_tree()->disconnect("node_configuration_warning_changed", this, "_warning_changed");
+ } break;
+ case NOTIFICATION_THEME_CHANGED: {
- _update_tree();
+ _update_tree();
+ } break;
}
}
@@ -978,9 +974,6 @@ void SceneTreeEditor::_warning_changed(Node *p_for_node) {
update_timer->start();
}
-void SceneTreeEditor::_editor_settings_changed() {
-}
-
void SceneTreeEditor::_bind_methods() {
ClassDB::bind_method("_tree_changed", &SceneTreeEditor::_tree_changed);
@@ -1001,8 +994,6 @@ void SceneTreeEditor::_bind_methods() {
ClassDB::bind_method("_node_script_changed", &SceneTreeEditor::_node_script_changed);
ClassDB::bind_method("_node_visibility_changed", &SceneTreeEditor::_node_visibility_changed);
- ClassDB::bind_method("_editor_settings_changed", &SceneTreeEditor::_editor_settings_changed);
-
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw);
ClassDB::bind_method(D_METHOD("drop_data_fw"), &SceneTreeEditor::drop_data_fw);
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 9b87c0981d..aa4d4dd58a 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -124,8 +124,6 @@ class SceneTreeEditor : public Control {
void _warning_changed(Node *p_for_node);
- void _editor_settings_changed();
-
Timer *update_timer;
List<StringName> *script_types;
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index ddb7f065aa..dda46d2414 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -1215,24 +1215,15 @@ void ScriptEditorDebugger::_notification(int p_what) {
if (OS::get_singleton()->get_ticks_msec() > until)
break;
}
-
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+
tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles"));
tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles"));
tabs->set_margin(MARGIN_LEFT, -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT));
tabs->set_margin(MARGIN_RIGHT, EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT));
- bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
-
- if (enable_rl) {
- inspect_scene_tree->add_constant_override("draw_relationship_lines", 1);
- inspect_scene_tree->add_color_override("relationship_line_color", rl_color);
- } else
- inspect_scene_tree->add_constant_override("draw_relationship_lines", 0);
-
copy->set_icon(get_icon("ActionCopy", "EditorIcons"));
step->set_icon(get_icon("DebugStep", "EditorIcons"));
next->set_icon(get_icon("DebugNext", "EditorIcons"));
@@ -1241,7 +1232,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
dobreak->set_icon(get_icon("Pause", "EditorIcons"));
docontinue->set_icon(get_icon("DebugContinue", "EditorIcons"));
vmem_refresh->set_icon(get_icon("Reload", "EditorIcons"));
-
} break;
}
}