diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 2d1e733b9ac8..2c222941f25f 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2482,6 +2482,7 @@ SvxColorExtToolBoxControl::SvxColorExtToolBoxControl( mLastColor( COL_AUTO ) { rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); + bChoiceFromPalette = false; // The following commands are available at the various modules switch( nSlotId ) @@ -2558,6 +2559,7 @@ SfxPopupWindow* SvxColorExtToolBoxControl::CreatePopupWindow() FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF|FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE ); pColorWin->StartSelection(); SetPopupWindow( pColorWin ); + bChoiceFromPalette = true; return pColorWin; } @@ -2575,10 +2577,13 @@ void SvxColorExtToolBoxControl::StateChanged( rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? TRISTATE_INDET : TRISTATE_FALSE ); - if ( SFX_ITEM_DEFAULT == eState ) + if (bChoiceFromPalette) { + bChoiceFromPalette = false; + const SvxColorItem* pItem = 0; - pItem = PTR_CAST( SvxColorItem, pState ); + if ( SFX_ITEM_DONTCARE != eState ) + pItem = PTR_CAST( SvxColorItem, pState ); if ( pItem ) { |