summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-09-25 17:50:43 +0200
committerkobewi <kobewi4e@gmail.com>2022-09-25 20:22:44 +0200
commitbb458d82ea43e12ce695aaa147f3d27abbdc5c9b (patch)
tree6af044b8b2ed87d2d51e64df716c2872a0a5db88
parentef266183598401d89482c5d2035d7e4cd3f64cb9 (diff)
downloadredot-engine-bb458d82ea43e12ce695aaa147f3d27abbdc5c9b.tar.gz
Remember advanced state of connection dialog
-rw-r--r--editor/connections_dialog.cpp6
-rw-r--r--editor/connections_dialog.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 236f3d7b08..ddeb8643b8 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -367,6 +367,10 @@ void ConnectDialog::popup_dialog(const String &p_for_signal) {
error_label->set_visible(!_find_first_script(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root()));
}
+ if (first_popup) {
+ first_popup = false;
+ _advanced_pressed();
+ }
popup_centered();
}
@@ -389,6 +393,7 @@ void ConnectDialog::_advanced_pressed() {
}
_update_ok_enabled();
+ EditorSettings::get_singleton()->set_project_metadata("editor_metadata", "use_advanced_connections", advanced->is_pressed());
popup_centered();
}
@@ -480,6 +485,7 @@ ConnectDialog::ConnectDialog() {
vbc_left->add_child(advanced);
advanced->set_text(TTR("Advanced"));
advanced->set_h_size_flags(Control::SIZE_SHRINK_BEGIN | Control::SIZE_EXPAND);
+ advanced->set_pressed(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "use_advanced_connections", false));
advanced->connect("pressed", callable_mp(this, &ConnectDialog::_advanced_pressed));
HBoxContainer *hbox = memnew(HBoxContainer);
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index e37246e7a0..db2f855617 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -112,6 +112,7 @@ private:
LineEdit *dst_method = nullptr;
ConnectDialogBinds *cdbinds = nullptr;
bool edit_mode = false;
+ bool first_popup = true;
NodePath dst_path;
VBoxContainer *vbc_right = nullptr;