FLTK logo

[master] 59384b3 - Fluid: Window was not updated when widget was deleted.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 59384b3 - Fluid: Window was not updated when widget was deleted. "Matthias Melcher" Jan 11, 2022  
 
commit 59384b359cf1d4572c20216e4700e26e77d36733
Author:     Matthias Melcher <github@matthiasm.com>
AuthorDate: Tue Jan 11 21:41:58 2022 +0100
Commit:     Matthias Melcher <github@matthiasm.com>
CommitDate: Tue Jan 11 21:42:03 2022 +0100

    Fluid: Window was not updated when widget was deleted.
    
    For parents with a box type based on FRAME.

 fluid/Fl_Widget_Type.cxx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git fluid/Fl_Widget_Type.cxx fluid/Fl_Widget_Type.cxx
index 68fb64b..e0f9d31 100644
--- fluid/Fl_Widget_Type.cxx
+++ fluid/Fl_Widget_Type.cxx
@@ -214,8 +214,12 @@ Fl_Widget_Type::Fl_Widget_Type() {
 Fl_Widget_Type::~Fl_Widget_Type() {
   if (o) {
     o->hide();
-    if (o->parent()) ((Fl_Group*)o->parent())->remove(*o);
-    delete o;
+    Fl_Window *win = o->window();
+    if (win)
+      win->redraw();
+    if (o->parent())
+      ((Fl_Group*)o->parent())->remove(*o);
+    Fl::delete_widget(o);
   }
   if (subclass_) free((void*)subclass_);
   if (tooltip_) free((void*)tooltip_);
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.