Menu methods take item id not position
Problem can be seen when experimental features turned off and Groupedbar Compact is active, but its menu item isn't checked. Change-Id: I0386fccd0f64cde678c78d9f15dd853a6247e3ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100446 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
This commit is contained in:
@@ -327,7 +327,10 @@ void SAL_CALL ToolbarModeMenuController::itemActivated( const css::awt::MenuEven
|
||||
OUString aMode = comphelper::getString( aModesNode.getNodeValue( "Active" ) );
|
||||
|
||||
for ( int i = 0; i < m_xPopupMenu->getItemCount(); ++i )
|
||||
m_xPopupMenu->checkItem( i+1, aMode == m_xPopupMenu->getCommand( i+1 ) );
|
||||
{
|
||||
sal_Int16 nItemId(m_xPopupMenu->getItemId(i));
|
||||
m_xPopupMenu->checkItem(nItemId, aMode == m_xPopupMenu->getCommand(nItemId));
|
||||
}
|
||||
}
|
||||
|
||||
// XPopupMenuController
|
||||
|
Reference in New Issue
Block a user