Compare commits

..

2 Commits

Author SHA1 Message Date
Serhii Snitsaruk 88583a8a2e
Merge pull request #136 from limbonaut/fix-unfolding
Fix folding/unfolding selected composite task is not working
2024-06-06 13:19:11 +02:00
Serhii Snitsaruk d6076d131f
Fix folding/unfolding selected composite task is not working 2024-06-06 12:58:18 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -384,7 +384,8 @@ void TaskTree::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
tree->connect("item_mouse_selected", callable_mp(this, &TaskTree::_on_item_mouse_selected)); tree->connect("item_mouse_selected", callable_mp(this, &TaskTree::_on_item_mouse_selected));
tree->connect("item_selected", callable_mp(this, &TaskTree::_on_item_selected)); // Note: CONNECT_DEFERRED is needed to avoid double updates with set_allow_reselect(true), which breaks folding/unfolding.
tree->connect("item_selected", callable_mp(this, &TaskTree::_on_item_selected), CONNECT_DEFERRED);
tree->connect("item_activated", callable_mp(this, &TaskTree::_on_item_activated)); tree->connect("item_activated", callable_mp(this, &TaskTree::_on_item_activated));
tree->connect("item_collapsed", callable_mp(this, &TaskTree::_on_item_collapsed)); tree->connect("item_collapsed", callable_mp(this, &TaskTree::_on_item_collapsed));
} break; } break;