jsdialogs: fix nested containters lookup
Do not break the loop early if not found a widget. We need to go up sometimes. Fixes regression from commit 13af671fda1317175a93fd747e5455ce897ed167 jsdialog: share code for widget registry Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I5516c0708452e95b2b6067e3a1fb99582b47dcf7 (cherry picked from commit 90f836f5ef250c586fe9d58637ae15dee305edb7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182537 Tested-by: Jenkins
This commit is contained in:
@@ -519,11 +519,9 @@ std::unique_ptr<weld::Container> JSInstanceBuilder::weld_container(const OUStrin
|
||||
// use parent builder to send update - avoid multiple calls from many builders
|
||||
vcl::Window* pParent = pContainer->GetParent();
|
||||
OUString sId = OUString::number(m_nWindowId);
|
||||
while (pParent)
|
||||
auto aWidgetMap = Widgets().Find(sId);
|
||||
while (pParent && aWidgetMap && !aWidgetMap->Find(pParent->get_id()))
|
||||
{
|
||||
auto aWidgetMap = Widgets().Find(sId);
|
||||
if (!aWidgetMap || !aWidgetMap->Find(pParent->get_id()))
|
||||
break;
|
||||
pParent = pParent->GetParent();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user