Skip to content
Prev Previous commit
Resolve knife conflict
  • Loading branch information
allejok96 committed Feb 28, 2021
commit d5dcac2c0f4932fc60bcfc0465e6af8bc3f025c0
6 changes: 6 additions & 0 deletions src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4692,6 +4692,11 @@ PianoRollWindow::PianoRollWindow() :
connect(glueAction, SIGNAL(triggered()), m_editor, SLOT(glueNotes()));
glueAction->setShortcut( Qt::SHIFT | Qt::Key_G );

QAction * knifeAction = new QAction(embed::getIconPixmap("edit_knife"),
tr("Knife"), noteToolsButton);
connect(knifeAction, &QAction::triggered, m_editor, &PianoRoll::setKnifeAction);
knifeAction->setShortcut( Qt::SHIFT | Qt::Key_K );

QAction* fillAction = new QAction(embed::getIconPixmap("fill"), tr("Fill"), noteToolsButton);
connect(fillAction, &QAction::triggered, [this](){ m_editor->fitNoteLengths(true); });
fillAction->setShortcut(Qt::SHIFT | Qt::Key_F);
Expand All @@ -4707,6 +4712,7 @@ PianoRollWindow::PianoRollWindow() :
connect(maxLengthAction, &QAction::triggered, [this](){ m_editor->constrainNoteLengths(true); });

noteToolsButton->addAction(glueAction);
noteToolsButton->addAction(knifeAction);
noteToolsButton->addAction(fillAction);
noteToolsButton->addAction(cutOverlapsAction);
noteToolsButton->addAction(minLengthAction);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.