Remove redundant Fl_Group::clear() from ~Fl_Scroll()
Fl_Group::clear() is called in Fl_Group's d'tor anyway. Technically we don't need to remove hscrollbar and scrollbar because they are destroyed (and thus removed from Fl_Group) before Fl_Group's d'tor is executed but this is left for clarity and to guarantee the order (see comment).
This commit is contained in:
parent
c340c4a2bd
commit
fb48bc22cc
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Fl_Scroll widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2022 by Bill Spitzak and others.
|
||||
// Copyright 1998-2025 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@ -41,7 +41,6 @@ void Fl_Scroll::clear() {
|
||||
Fl_Scroll::~Fl_Scroll() {
|
||||
remove(hscrollbar); // remove last child first
|
||||
remove(scrollbar);
|
||||
Fl_Group::clear();
|
||||
}
|
||||
|
||||
/** Ensure the scrollbars are the last children.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user