tdf#92843: fix disappearing zoom slider

Change-Id: I2b45b7cf96af7950cf097c2b6a880e9eda021184
This commit is contained in:
László Németh
2015-09-04 16:30:56 +02:00
parent 75f890a785
commit 072c771be4

View File

@@ -44,7 +44,6 @@ struct SvxZoomSliderControl::SvxZoomSliderControl_Impl
Image maIncreaseButton; Image maIncreaseButton;
Image maDecreaseButton; Image maDecreaseButton;
bool mbValuesSet; bool mbValuesSet;
bool mbOmitPaint;
bool mbDraggingStarted; bool mbDraggingStarted;
SvxZoomSliderControl_Impl() : SvxZoomSliderControl_Impl() :
@@ -58,7 +57,6 @@ struct SvxZoomSliderControl::SvxZoomSliderControl_Impl
maIncreaseButton(), maIncreaseButton(),
maDecreaseButton(), maDecreaseButton(),
mbValuesSet( false ), mbValuesSet( false ),
mbOmitPaint( false ),
mbDraggingStarted( false ) {} mbDraggingStarted( false ) {}
}; };
@@ -242,13 +240,12 @@ void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eStat
} }
} }
if (!mxImpl->mbOmitPaint) forceRepaint();
forceRepaint();
} }
void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt )
{ {
if ( !mxImpl->mbValuesSet || mxImpl->mbOmitPaint ) if ( !mxImpl->mbValuesSet )
return; return;
const Rectangle aControlRect = getControlRect(); const Rectangle aControlRect = getControlRect();
@@ -408,9 +405,6 @@ void SvxZoomSliderControl::repaintAndExecute()
{ {
forceRepaint(); forceRepaint();
mxImpl->mbOmitPaint = true; // optimization: paint before executing command,
// then omit painting which is triggered by the execute function
// commit state change // commit state change
SvxZoomSliderItem aZoomSliderItem(mxImpl->mnCurrentZoom); SvxZoomSliderItem aZoomSliderItem(mxImpl->mnCurrentZoom);
@@ -422,8 +416,6 @@ void SvxZoomSliderControl::repaintAndExecute()
aArgs[0].Value = any; aArgs[0].Value = any;
execute(aArgs); execute(aArgs);
mxImpl->mbOmitPaint = false;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */