diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-26 00:11:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:52 +0100 |
commit | 595feb2f04993ec85315af2862bc764a5fef9163 (patch) | |
tree | 8f3301755ff9139b7ce8d3fc082f78c0bc25c4dc /vcl | |
parent | we need to have the outermost TabDialog as the recipient of tab keystrokes (diff) | |
download | core-595feb2f04993ec85315af2862bc764a5fef9163.tar.gz core-595feb2f04993ec85315af2862bc764a5fef9163.zip |
fix getNonLayout[Real]Parent helpers
Change-Id: Idae11802aaeb3d9192cdf7fe8fae61788bbb9b5b
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/layout.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 8666ef5874b7..2fa259ba9003 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1074,15 +1074,23 @@ Size getLegacyBestSizeForChildren(const Window &rWindow) Window* getNonLayoutParent(Window *pWindow) { - while (pWindow && pWindow->GetType() == WINDOW_CONTAINER) + while (pWindow) + { pWindow = pWindow->GetParent(); + if (!pWindow || pWindow->GetType() != WINDOW_CONTAINER) + break; + } return pWindow; } Window* getNonLayoutRealParent(Window *pWindow) { - while (pWindow && pWindow->GetType() == WINDOW_CONTAINER) + while (pWindow) + { pWindow = pWindow->ImplGetParent(); + if (!pWindow || pWindow->GetType() != WINDOW_CONTAINER) + break; + } return pWindow; } |