aboutsummaryrefslogtreecommitdiff
path: root/gui/object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/object.cpp')
-rw-r--r--gui/object.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/gui/object.cpp b/gui/object.cpp
index 2ec42df9d7..73c4f74d6c 100644
--- a/gui/object.cpp
+++ b/gui/object.cpp
@@ -59,4 +59,24 @@ void GuiObject::reflowLayout() {
}
}
+void GuiObject::removeWidget(Widget *del) {
+ if (del == _firstWidget) {
+ Widget *del_next = del->next();
+ del->setNext(0);
+ _firstWidget = del_next;
+ return;
+ }
+
+ Widget *w = _firstWidget;
+ while (w) {
+ if (w->next() == del) {
+ Widget *del_next = del->next();
+ del->setNext(0);
+ w->setNext(del_next);
+ return;
+ }
+ w = w->next();
+ }
+}
+
} // End of namespace GUI