Don't remove a control from its parent immediately when destroying it, so that GTK+ components behave like the QT ones.

[GB.GTK]
* NEW: Don't remove a control from its parent immediately when destroying it, so that GTK+ components behave like the QT ones.

[GB.GTK3]
* NEW: Don't remove a control from its parent immediately when destroying it, so that GTK+ components behave like the QT ones.
This commit is contained in:
gambas 2018-06-16 15:36:34 +02:00
parent 91c3e24f95
commit 6fdd423409

View File

@ -258,6 +258,8 @@ void gControl::cleanRemovedControls()
if (!iter)
break;
control = (gControl *)iter->data;
if (control->parent())
control->parent()->remove(control);
//controls_destroyed = g_list_remove(controls_destroyed, (gpointer)control);
gtk_widget_destroy(control->border);
}
@ -414,9 +416,6 @@ void gControl::destroy()
//fprintf(stderr, "added to destroy list: %p\n", this);
controls_destroyed = g_list_prepend(controls_destroyed,(gpointer)this);
_destroyed = true;
if (pr)
pr->remove(this);
}