forked from qt-creator/qt-creator
Editor: Fix find usage position in context menu
Do not add the find usage action to an editor context menu if it is already there. Change-Id: I0a98d81ae0e08be69ca2579af5701b5fbc8ccbda Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -8022,8 +8022,11 @@ void TextEditorWidget::setupFallBackEditor(Id id)
|
|||||||
|
|
||||||
void TextEditorWidget::appendStandardContextMenuActions(QMenu *menu)
|
void TextEditorWidget::appendStandardContextMenuActions(QMenu *menu)
|
||||||
{
|
{
|
||||||
if (optionalActions() & TextEditorActionHandler::FindUsage)
|
if (optionalActions() & TextEditorActionHandler::FindUsage) {
|
||||||
menu->addAction(ActionManager::command(Constants::FIND_USAGES)->action());
|
const auto findUsage = ActionManager::command(Constants::FIND_USAGES)->action();
|
||||||
|
if (!menu->actions().contains(findUsage))
|
||||||
|
menu->addAction(findUsage);
|
||||||
|
}
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
appendMenuActionsFromContext(menu, Constants::M_STANDARDCONTEXTMENU);
|
appendMenuActionsFromContext(menu, Constants::M_STANDARDCONTEXTMENU);
|
||||||
|
Reference in New Issue
Block a user