diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-14 09:19:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-15 14:29:50 +0100 |
commit | 2cf23c31dd0cc9a9311770c00cf8525240d98fe7 (patch) | |
tree | 03efce3e7f273c02e49d3b0aa931dcd8a0ffad67 /vcl | |
parent | c4dd14c2b4e8a4960c86e6640bf2b568f8e583f5 (diff) |
Resolves: tdf#121229 ignore internal children of VclScrolledWindow
Reviewed-on: https://gerrit.libreoffice.org/63357
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 20b2903354138f8ab19261fab74658fcf6af70e3)
Change-Id: Iecc474db8093520ba2d90aedfc5da66507f3033b
Reviewed-on: https://gerrit.libreoffice.org/63359
Tested-by: Jenkins
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dialog.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 2d34490b523b..b20ac608762a 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -132,7 +132,9 @@ vcl::Window * nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi { vcl::Window *pLastChild = pChild; - if (isContainerWindow(*pChild)) + if (pChild->GetType() == WindowType::SCROLLWINDOW) + pChild = static_cast<VclScrolledWindow*>(pChild)->get_child(); + else if (isContainerWindow(*pChild)) pChild = pChild->GetWindow(GetWindowType::FirstChild); else pChild = pChild->GetWindow(GetWindowType::Next); @@ -158,7 +160,9 @@ vcl::Window * prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi { vcl::Window *pLastChild = pChild; - if (isContainerWindow(*pChild)) + if (pChild->GetType() == WindowType::SCROLLWINDOW) + pChild = static_cast<VclScrolledWindow*>(pChild)->get_child(); + else if (isContainerWindow(*pChild)) pChild = pChild->GetWindow(GetWindowType::LastChild); else pChild = pChild->GetWindow(GetWindowType::Prev); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 6b7e13b63e00..5b29ff125307 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1578,9 +1578,9 @@ vcl::Window *VclFrame::get_label_widget() const vcl::Window *VclFrame::get_child() const { - assert(GetChildCount() == 2); //The child widget is the normally the last (of two) children const WindowImpl* pWindowImpl = ImplGetWindowImpl(); + assert(GetChildCount() == 2 || pWindowImpl->mbInDispose); if (!m_pLabel) return pWindowImpl->mpLastChild; if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //only label exists @@ -1858,8 +1858,8 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl, ScrollBar*, void) const vcl::Window *VclScrolledWindow::get_child() const { - assert(GetChildCount() == 4); const WindowImpl* pWindowImpl = ImplGetWindowImpl(); + assert(GetChildCount() == 4 || pWindowImpl->mbInDispose); return pWindowImpl->mpLastChild; } |