mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-29 05:44:14 +02:00
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.
This commit is contained in:
@@ -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]()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user