summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-06 21:04:31 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-07 09:45:09 +0100
commit35fa267341be9d5d22a41e2aad1f1da462543783 (patch)
tree97545683c3576cabefd3c0972d6e646a84a1874c
parent207b0799d9b5b7029ccde23787f55e6efc2df2aa (diff)
tdf#90956 - ComboBox: handle re-size calculation during dispose.
Change-Id: I3d6e421a10b0d6b0edb85c0a6454315198bfd22f
-rw-r--r--vcl/source/control/combobox.cxx29
1 files changed, 16 insertions, 13 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 7c12bbc45554..b55f1cb734df 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -559,20 +559,23 @@ void ComboBox::Resize()
{
Control::Resize();
- Size aOutSz = GetOutputSizePixel();
- if( IsDropDownBox() )
+ if (mpSubEdit)
{
- ComboBoxBounds aBounds(calcComboBoxDropDownComponentBounds(aOutSz,
- GetWindow(WINDOW_BORDER)->GetOutputSizePixel()));
- mpSubEdit->SetPosSizePixel(aBounds.aSubEditPos, aBounds.aSubEditSize);
- mpBtn->SetPosSizePixel(aBounds.aButtonPos, aBounds.aButtonSize);
- }
- else
- {
- mpSubEdit->SetSizePixel( Size( aOutSz.Width(), mnDDHeight ) );
- mpImplLB->setPosSizePixel( 0, mnDDHeight, aOutSz.Width(), aOutSz.Height() - mnDDHeight );
- if ( !GetText().isEmpty() )
- ImplUpdateFloatSelection();
+ Size aOutSz = GetOutputSizePixel();
+ if( IsDropDownBox() )
+ {
+ ComboBoxBounds aBounds(calcComboBoxDropDownComponentBounds(aOutSz,
+ GetWindow(WINDOW_BORDER)->GetOutputSizePixel()));
+ mpSubEdit->SetPosSizePixel(aBounds.aSubEditPos, aBounds.aSubEditSize);
+ mpBtn->SetPosSizePixel(aBounds.aButtonPos, aBounds.aButtonSize);
+ }
+ else
+ {
+ mpSubEdit->SetSizePixel( Size( aOutSz.Width(), mnDDHeight ) );
+ mpImplLB->setPosSizePixel( 0, mnDDHeight, aOutSz.Width(), aOutSz.Height() - mnDDHeight );
+ if ( !GetText().isEmpty() )
+ ImplUpdateFloatSelection();
+ }
}
// adjust the size of the FloatingWindow even when invisible