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:
parent
91c3e24f95
commit
6fdd423409
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user