Fluid: Window was not updated when widget was deleted.

For parents with a box type based on FRAME.
This commit is contained in:
Matthias Melcher
2022-01-11 21:41:58 +01:00
parent d699b617ac
commit 59384b359c
+6 -2
View File
@@ -214,8 +214,12 @@ Fl_Widget_Type::Fl_Widget_Type() {
Fl_Widget_Type::~Fl_Widget_Type() { Fl_Widget_Type::~Fl_Widget_Type() {
if (o) { if (o) {
o->hide(); o->hide();
if (o->parent()) ((Fl_Group*)o->parent())->remove(*o); Fl_Window *win = o->window();
delete o; if (win)
win->redraw();
if (o->parent())
((Fl_Group*)o->parent())->remove(*o);
Fl::delete_widget(o);
} }
if (subclass_) free((void*)subclass_); if (subclass_) free((void*)subclass_);
if (tooltip_) free((void*)tooltip_); if (tooltip_) free((void*)tooltip_);