Make Pause hotkey Shift+Space (#5554)
This commit is contained in:
@@ -58,6 +58,9 @@ protected slots:
|
||||
private slots:
|
||||
/// Called by pressing the space key. Plays or stops.
|
||||
void togglePlayStop();
|
||||
|
||||
/// Called by pressing shift+space. Toggles pause state.
|
||||
void togglePause();
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
@@ -74,6 +74,11 @@ void Editor::togglePlayStop()
|
||||
play();
|
||||
}
|
||||
|
||||
void Editor::togglePause()
|
||||
{
|
||||
Engine::getSong()->togglePause();
|
||||
}
|
||||
|
||||
Editor::Editor(bool record, bool stepRecord) :
|
||||
m_toolBar(new DropToolBar(this)),
|
||||
m_playAction(nullptr),
|
||||
@@ -104,6 +109,7 @@ Editor::Editor(bool record, bool stepRecord) :
|
||||
connect(m_toggleStepRecordingAction, SIGNAL(triggered()), this, SLOT(toggleStepRecording()));
|
||||
connect(m_stopAction, SIGNAL(triggered()), this, SLOT(stop()));
|
||||
new QShortcut(Qt::Key_Space, this, SLOT(togglePlayStop()));
|
||||
new QShortcut(QKeySequence(Qt::SHIFT + Qt::Key_Space), this, SLOT(togglePause()));
|
||||
|
||||
// Add actions to toolbar
|
||||
addButton(m_playAction, "playButton");
|
||||
|
||||
Reference in New Issue
Block a user