diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-16 10:29:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-17 16:06:31 +0100 |
commit | c648d4287877f62554cb4f940d565833fb46a2b3 (patch) | |
tree | a80b0aecfa1b8485096a22f1c8b396af0c1adac3 /vcl | |
parent | XubString->OUString (diff) | |
download | core-c648d4287877f62554cb4f940d565833fb46a2b3.tar.gz core-c648d4287877f62554cb4f940d565833fb46a2b3.zip |
annoying border/child window confusion
Change-Id: I6ab919ff326a8525d1bed7db6474764de4e5bcf0
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/builder.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 5e66858a33d3..073be0d802c1 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1569,10 +1569,17 @@ OString VclBuilder::get_by_window(const Window *pWindow) const sal_Int32 VclBuilder::get_window_packing_position(const Window *pWindow) const { + //We've stored the return of new Control, some of these get + //border windows placed around them which are what you get + //from GetChild, so scoot up a level if necessary to get the + //window whose position value we have + const Window *pPropHolder = pWindow->mpWindowImpl->mpClientWindow ? + pWindow->mpWindowImpl->mpClientWindow : pWindow; + for (std::vector<WinAndId>::const_iterator aI = m_aChildren.begin(), aEnd = m_aChildren.end(); aI != aEnd; ++aI) { - if (aI->m_pWindow == pWindow) + if (aI->m_pWindow == pPropHolder) return aI->m_nPosition; } |