summaryrefslogtreecommitdiff
path: root/src/gui/widgets/basiccontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/basiccontainer.cpp')
-rw-r--r--src/gui/widgets/basiccontainer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp
index 4803373f2..a66a244a0 100644
--- a/src/gui/widgets/basiccontainer.cpp
+++ b/src/gui/widgets/basiccontainer.cpp
@@ -372,3 +372,13 @@ void BasicContainer::setInternalFocusHandler(FocusHandler* focusHandler)
(*iter)->setFocusHandler(mInternalFocusHandler);
}
}
+
+Widget *BasicContainer::findFirstWidget(const std::set<Widget*> &list)
+{
+ FOR_EACHR (WidgetListReverseIterator, iter, mWidgets)
+ {
+ if (list.find(*iter) != list.end())
+ return *iter;
+ }
+ return nullptr;
+}