Kaydet (Commit) 970a270a authored tarafından Stephan Schäfer's avatar Stephan Schäfer

#98777# deactivate dlgcontrol if all items are disabled

üst 5507225b
......@@ -2,9 +2,9 @@
*
* $RCSfile: toolbox.cxx,v $
*
* $Revision: 1.35 $
* $Revision: 1.36 $
*
* last change: $Author: mba $ $Date: 2002-04-19 08:00:26 $
* last change: $Author: ssa $ $Date: 2002-04-22 14:26:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -3538,8 +3538,10 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
pItem = mpItemList->Next();
}
// Wurde ein neuer Eintrag selektiert
if ( nNewPos != mnCurPos )
// was a new entery selected ?
// don't change selection if keyboard selection is active and mouse leaves
// the tolbox
if ( nNewPos != mnCurPos && !( HasFocus() && nNewPos == TOOLBOX_ITEM_NOTFOUND ) )
{
if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND )
ImplDrawItem( mnCurPos );
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: toolbox2.cxx,v $
*
* $Revision: 1.6 $
* $Revision: 1.7 $
*
* last change: $Author: pl $ $Date: 2002-04-19 10:13:53 $
* last change: $Author: ssa $ $Date: 2002-04-22 14:26:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -216,6 +216,8 @@ const XubString& ToolBox::ImplConvertMenuString( const XubString& rStr )
void ToolBox::ImplInvalidate( BOOL bNewCalc, BOOL bFullPaint )
{
ImplUpdateInputEnable();
if ( bNewCalc )
mbCalc = TRUE;
......@@ -1372,6 +1374,8 @@ void ToolBox::EnableItem( USHORT nItemId, BOOL bEnable )
// Item updaten
ImplUpdateItem( nPos );
ImplUpdateInputEnable();
}
}
}
......@@ -1549,3 +1553,23 @@ void ToolBox::RecalcItems()
{
ImplInvalidate( TRUE );
}
// -----------------------------------------------------------------------
// disable key input if all items are disabled
void ToolBox::ImplUpdateInputEnable()
{
USHORT nCount = (USHORT)mpItemList->Count();
for( USHORT i = 0; i < nCount; i++ )
{
ImplToolItem* pItem = mpItemList->GetObject( i );
if( pItem->mbEnabled )
{
// at least one useful entry
mbInputDisabled = FALSE;
return;
}
}
mbInputDisabled = TRUE;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment