فهرست منبع

Fixed error messages when setting all_tab_in_front of TabContainer

Some signal handlers weren't unregistered when removing the wrapped
child TabBar, which resulted in errors printed when the TabBar was
removed and added again when the flag was updated
Tefatika 2 سال پیش
والد
کامیت
abd894daf7
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      scene/gui/tab_container.cpp

+ 4 - 4
scene/gui/tab_container.cpp

@@ -564,12 +564,12 @@ void TabContainer::add_child_notify(Node *p_child) {
 }
 }
 
 
 void TabContainer::move_child_notify(Node *p_child) {
 void TabContainer::move_child_notify(Node *p_child) {
+	Container::move_child_notify(p_child);
+
 	if (p_child == tab_bar) {
 	if (p_child == tab_bar) {
 		return;
 		return;
 	}
 	}
 
 
-	Container::move_child_notify(p_child);
-
 	Control *c = Object::cast_to<Control>(p_child);
 	Control *c = Object::cast_to<Control>(p_child);
 	if (c && !c->is_set_as_top_level()) {
 	if (c && !c->is_set_as_top_level()) {
 		int old_idx = -1;
 		int old_idx = -1;
@@ -588,12 +588,12 @@ void TabContainer::move_child_notify(Node *p_child) {
 }
 }
 
 
 void TabContainer::remove_child_notify(Node *p_child) {
 void TabContainer::remove_child_notify(Node *p_child) {
+	Container::remove_child_notify(p_child);
+
 	if (p_child == tab_bar) {
 	if (p_child == tab_bar) {
 		return;
 		return;
 	}
 	}
 
 
-	Container::remove_child_notify(p_child);
-
 	Control *c = Object::cast_to<Control>(p_child);
 	Control *c = Object::cast_to<Control>(p_child);
 	if (!c || c->is_set_as_top_level()) {
 	if (!c || c->is_set_as_top_level()) {
 		return;
 		return;