Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Fix zoom shortcuts #1182

Merged
merged 3 commits into from
Aug 26, 2024
Merged

bug: Fix zoom shortcuts #1182

merged 3 commits into from
Aug 26, 2024

Conversation

DSCaskey
Copy link
Contributor

This PR removes the keyboard shortcuts for zoom in and zoom out from the mainwindow.ui form. This should allow the code below to properly handle the key seq's for each OS.

QList<QKeySequence> zoomInShortcuts;
zoomInShortcuts.append(QKeySequence(QKeySequence::ZoomIn));
zoomInShortcuts.append(QKeySequence(Qt::ControlModifier + Qt::Key_Plus + Qt::KeypadModifier));
ui->zoomIn_Action->setShortcuts(zoomInShortcuts);
connect(ui->zoomIn_Action, &QAction::triggered, ui->view, &VMainGraphicsView::zoomIn);

QList<QKeySequence> zoomOutShortcuts;
zoomOutShortcuts.append(QKeySequence(QKeySequence::ZoomOut));
zoomOutShortcuts.append(QKeySequence(Qt::ControlModifier + Qt::Key_Minus + Qt::KeypadModifier));
ui->zoomOut_Action->setShortcuts(zoomOutShortcuts);
connect(ui->zoomOut_Action, &QAction::triggered, ui->view, &VMainGraphicsView::zoomOut);

Closes issue #1176

@DSCaskey DSCaskey requested a review from csett86 August 20, 2024 14:23
@DSCaskey DSCaskey self-assigned this Aug 20, 2024
@DSCaskey DSCaskey linked an issue Aug 20, 2024 that may be closed by this pull request
@slspencer slspencer self-requested a review August 26, 2024 16:08
@slspencer slspencer merged commit d8fec84 into develop Aug 26, 2024
10 checks passed
@slspencer slspencer deleted the fix-zoom-shortcuts branch August 26, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Shortcuts in UI form are overriding for zoom shortcuts.
2 participants