vcl/source/window/layout.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit edb2b9f93be0c9af8c3fb612cb82936bb0540494 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Jun 9 09:11:09 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Mar 20 13:58:49 2024 +0100 a Frame has max two children during creation it might not have all its children created yet if a11y querys it during its setup. Change-Id: Ifbbec7eeb80409dc5e871c2022d1ee1e36c6e74f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit b1d57168b8cecc1713e729c22260feaf33fab29f) diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index a2274c457ae0..4adb37e4a1c4 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1424,7 +1424,7 @@ const vcl::Window *VclFrame::get_label_widget() const { if (m_pLabel) return m_pLabel; - assert(GetChildCount() == 2); + assert(GetChildCount() <= 2); //The label widget is normally the first (of two) children const WindowImpl* pWindowImpl = ImplGetWindowImpl(); if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //no label exists commit bbced22f20de83f245d84b8e2285208fa951fdcd Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Dec 22 20:46:29 2020 +0000 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Mar 20 13:58:45 2024 +0100 if the label is explicitly set there is no ambiguity as to the label a child-count of 3 can arise for a temporary period during loading of widgets inside GtkScrolledWindow where the child widget supports its own scrolling and is parented as a sibling of the GtkScrolledWindow during load until the node is complete and then the redundant GtkScrolledWindow is removed after mirroring its properties to the scrolled-child Change-Id: I1a7dbf9ec2415beb0f7e920fec5c05e87ddaaeee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108221 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit c9f8e68ce3d56b0e52915a07d0bce661882039ee) diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index a9f23d661caa..a2274c457ae0 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1422,9 +1422,9 @@ void VclFrame::designate_label(vcl::Window *pWindow) const vcl::Window *VclFrame::get_label_widget() const { - assert(GetChildCount() == 2); if (m_pLabel) return m_pLabel; + assert(GetChildCount() == 2); //The label widget is normally the first (of two) children const WindowImpl* pWindowImpl = ImplGetWindowImpl(); if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //no label exists