You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Merge pull request #71874 from KoBeWi/relesetc
Reselect signal after tree update
This commit is contained in:
@@ -1170,6 +1170,10 @@ void ConnectionsDock::set_node(Node *p_node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionsDock::update_tree() {
|
void ConnectionsDock::update_tree() {
|
||||||
|
String prev_selected;
|
||||||
|
if (tree->is_anything_selected()) {
|
||||||
|
prev_selected = tree->get_selected()->get_text(0);
|
||||||
|
}
|
||||||
tree->clear();
|
tree->clear();
|
||||||
|
|
||||||
if (!selected_node) {
|
if (!selected_node) {
|
||||||
@@ -1261,7 +1265,14 @@ void ConnectionsDock::update_tree() {
|
|||||||
|
|
||||||
// Create the children of the subsection - the actual list of signals.
|
// Create the children of the subsection - the actual list of signals.
|
||||||
TreeItem *signal_item = tree->create_item(section_item);
|
TreeItem *signal_item = tree->create_item(section_item);
|
||||||
signal_item->set_text(0, String(signal_name) + signaldesc);
|
String signame = String(signal_name) + signaldesc;
|
||||||
|
signal_item->set_text(0, signame);
|
||||||
|
|
||||||
|
if (signame == prev_selected) {
|
||||||
|
signal_item->select(0);
|
||||||
|
prev_selected = "";
|
||||||
|
}
|
||||||
|
|
||||||
Dictionary sinfo;
|
Dictionary sinfo;
|
||||||
sinfo["name"] = signal_name;
|
sinfo["name"] = signal_name;
|
||||||
sinfo["args"] = argnames;
|
sinfo["args"] = argnames;
|
||||||
|
|||||||
Reference in New Issue
Block a user