Skip to content

Commit

Permalink
Add keyboard shortcut for rotating by 90 degree, horizontal flip and …
Browse files Browse the repository at this point in the history
…search
  • Loading branch information
KjellMorgenstern committed Sep 22, 2021
1 parent 3ce7549 commit e9bd16d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mainwindow/mainwindow_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,7 @@ void MainWindow::createPartMenuActions() {

m_rotate90cwAct = new QAction(tr("Rotate 90° Clockwise"), this);
m_rotate90cwAct->setStatusTip(tr("Rotate the selected parts by 90 degrees clockwise"));
m_rotate90cwAct->setShortcut(QKeySequence("]"));
connect(m_rotate90cwAct, SIGNAL(triggered()), this, SLOT(rotate90cw()));

m_rotate180Act = new QAction(tr("Rotate 180°"), this);
Expand All @@ -962,6 +963,7 @@ void MainWindow::createPartMenuActions() {

m_rotate90ccwAct = new QAction(tr("Rotate 90° Counter Clockwise"), this);
m_rotate90ccwAct->setStatusTip(tr("Rotate current selection 90 degrees counter clockwise"));
m_rotate90ccwAct->setShortcut(QKeySequence("["));
connect(m_rotate90ccwAct, SIGNAL(triggered()), this, SLOT(rotate90ccw()));

m_rotate45ccwAct = new QAction(tr("Rotate 45° Counter Clockwise"), this);
Expand All @@ -970,6 +972,7 @@ void MainWindow::createPartMenuActions() {

m_flipHorizontalAct = new QAction(tr("&Flip Horizontal"), this);
m_flipHorizontalAct->setStatusTip(tr("Flip current selection horizontally"));
m_flipHorizontalAct->setShortcut(QKeySequence("|"));
connect(m_flipHorizontalAct, SIGNAL(triggered()), this, SLOT(flipHorizontal()));

m_flipVerticalAct = new QAction(tr("&Flip Vertical"), this);
Expand Down Expand Up @@ -1076,6 +1079,7 @@ void MainWindow::createPartMenuActions() {

m_findPartInSketchAct = new QAction(tr("Find part in sketch..."), this);
m_findPartInSketchAct->setStatusTip(tr("Search for parts in a sketch by matching text"));
m_findPartInSketchAct->setShortcut(QKeySequence::Find);
connect(m_findPartInSketchAct, SIGNAL(triggered()), this, SLOT(findPartInSketch()));

m_hidePartSilkscreenAct = new QAction(tr("Hide part silkscreen"), this);
Expand Down

0 comments on commit e9bd16d

Please sign in to comment.