Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
6 changes: 6 additions & 0 deletions src/gui/editors/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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");
Expand Down