From 9d590eaa6fed7bb06e5ed87e93a6189dac1ea2f7 Mon Sep 17 00:00:00 2001 From: ispyisail Date: Sun, 23 Aug 2026 21:26:00 +1200 Subject: [PATCH] Register jump-to-element (Ctrl+G) with ShortcutManager m_jump_to_element was the only action in the tree that set its QKeySequence directly instead of going through ShortcutManager::registerAction() -- of 98 actions carrying a runtime shortcut, 95 matched a registerAction() call, 2 were Qt built-ins, and this was the sole exception (verified by dumping every QAction from a running instance and cross-checking against a static scan of the source; the only other setShortcut() call in the tree clears a shortcut rather than setting one). Bypassing the registry meant the binding didn't appear on the Shortcuts preferences page (so it couldn't be discovered or rebound), and checkConflicts() couldn't see it either, so assigning Ctrl+G to another action there would silently collide at runtime instead of being flagged. Fixes #758. --- sources/qetdiagrameditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index e9e0838ee..831386110 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -778,7 +778,7 @@ void QETDiagramEditor::setUpActions() }); m_jump_to_element = new QAction(tr("Atteindre un élément"), this); - m_jump_to_element->setShortcut(Qt::CTRL | Qt::Key_G); + ShortcutManager::instance().registerAction(m_jump_to_element, "diagrameditor.jump_to_element", tr("Éditeur de schémas"), Qt::CTRL | Qt::Key_G); m_jump_to_element->setStatusTip(tr("Recherche et sélectionne rapidement un élément du folio", "status bar tip")); connect(m_jump_to_element, &QAction::triggered, [this]() {