diff options
-rw-r--r-- | muse/muse/app.cpp | 5 | ||||
-rw-r--r-- | muse/muse/shortcuts.cpp | 1 | ||||
-rw-r--r-- | muse/muse/shortcuts.h | 1 | ||||
-rw-r--r-- | muse/muse/song.cpp | 11 | ||||
-rw-r--r-- | muse/muse/song.h | 1 |
5 files changed, 17 insertions, 2 deletions
diff --git a/muse/muse/app.cpp b/muse/muse/app.cpp index 38b1b120..17084227 100644 --- a/muse/muse/app.cpp +++ b/muse/muse/app.cpp @@ -2943,6 +2943,11 @@ void MusE::kbAccel(int key) song->setRecord(!song->record()); } } + else if (key == shortcuts[SHRT_REC_CLEAR].key) { + if (!audio->isPlaying()) { + song->clearTrackRec(); + } + } else if (key == shortcuts[SHRT_OPEN_TRANSPORT].key) { toggleTransport(); } diff --git a/muse/muse/shortcuts.cpp b/muse/muse/shortcuts.cpp index 13bb1f10..8ebb5fd2 100644 --- a/muse/muse/shortcuts.cpp +++ b/muse/muse/shortcuts.cpp @@ -35,6 +35,7 @@ void initShortCuts() defShrt(SHRT_GOTO_RIGHT, Qt::Key_PageDown, "Transport: Goto right marker" , GLOBAL_SHRT, "goto_right"); defShrt(SHRT_TOGGLE_LOOP, Qt::Key_Slash, "Transport: Toggle Loop section", GLOBAL_SHRT, "toggle_loop"); defShrt(SHRT_START_REC, Qt::Key_Asterisk, "Transport: Toggle Record", GLOBAL_SHRT, "toggle_rec"); + defShrt(SHRT_REC_CLEAR, Qt::SHIFT + Qt::Key_Asterisk, "Transport: Clear all rec enabled tracks", GLOBAL_SHRT, "rec_clear"); defShrt(SHRT_COPY, Qt::CTRL + Qt::Key_C, "Edit: Copy", INVIS_SHRT, "copy"); defShrt(SHRT_UNDO, Qt::CTRL + Qt::Key_Z, "Edit: Undo", INVIS_SHRT, "undo"); defShrt(SHRT_REDO, Qt::CTRL + Qt::Key_Y, "Edit: Redo", INVIS_SHRT, "redo"); diff --git a/muse/muse/shortcuts.h b/muse/muse/shortcuts.h index 6e7e661a..b1d92463 100644 --- a/muse/muse/shortcuts.h +++ b/muse/muse/shortcuts.h @@ -62,6 +62,7 @@ enum { SHRT_TOGGLE_LOOP, // Slash SHRT_TOGGLE_METRO, // C SHRT_START_REC, // *(keypad) + SHRT_REC_CLEAR, // *(keypad) //Main + Drumeditor SHRT_NEW, //Ctrl+N diff --git a/muse/muse/song.cpp b/muse/muse/song.cpp index 1b216e75..80099774 100644 --- a/muse/muse/song.cpp +++ b/muse/muse/song.cpp @@ -1001,10 +1001,17 @@ void Song::setLoop(bool f) } //--------------------------------------------------------- -// setRecord -// set transport loop flag +// clearTrackRec //--------------------------------------------------------- +void Song::clearTrackRec() +{ + for (iTrack it = tracks()->begin(); it != tracks()->end(); ++it) + setRecordFlag(*it,false); +} +//--------------------------------------------------------- +// setRecord +//--------------------------------------------------------- void Song::setRecord(bool f, bool autoRecEnable) { if (recordFlag != f) { diff --git a/muse/muse/song.h b/muse/muse/song.h index 3a1d10cf..8c6114f2 100644 --- a/muse/muse/song.h +++ b/muse/muse/song.h @@ -372,6 +372,7 @@ class Song : public QObject { bool getLoop() { return loopFlag; } void setLoop(bool f); void setRecord(bool f, bool autoRecEnable = true); + void clearTrackRec(); void setPlay(bool f); void setStop(bool); void forward(); |