framework/source/uielement/toolbarmodemenucontroller.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit c2b655bb60e23f3849b8b653e74aa1b00269e113 Author: Maxim Monastirsky <momonas...@gmail.com> AuthorDate: Mon Aug 10 21:33:22 2020 +0300 Commit: Maxim Monastirsky <momonas...@gmail.com> CommitDate: Tue Aug 11 09:15:27 2020 +0200 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 <momonas...@gmail.com> diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx index 738ae72cab06..c2f48162145d 100644 --- a/framework/source/uielement/toolbarmodemenucontroller.cxx +++ b/framework/source/uielement/toolbarmodemenucontroller.cxx @@ -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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits