From: Till Theato Date: Wed, 2 Jun 2010 20:43:20 +0000 (+0000) Subject: Do not show split audio command in undo history if there is nothing to split X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9ed65c39988b2b1632fe7ae37dc3e99ec36a272b;p=kdenlive Do not show split audio command in undo history if there is nothing to split svn path=/trunk/kdenlive/; revision=4495 --- diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index 31b9cbc7..d3c3b8b8 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -5510,7 +5510,8 @@ void CustomTrackView::splitAudio() } } } - m_commandStack->push(splitCommand); + if (splitCommand->childCount() > 0) + m_commandStack->push(splitCommand); } void CustomTrackView::doSplitAudio(const GenTime &pos, int track, bool split) diff --git a/src/customtrackview.h b/src/customtrackview.h index 91543cb8..504a8874 100644 --- a/src/customtrackview.h +++ b/src/customtrackview.h @@ -130,7 +130,14 @@ public: void groupClips(bool group = true); void doGroupClips(QList clipInfos, QList transitionInfos, bool group); void loadGroups(const QDomNodeList groups); + + /** @brief Creates SplitAudioCommands for selected clips. */ void splitAudio(); + + /** @brief Seperates the audio of a clip to a audio track. + * @param pos Position of the clip to split + * @param track Track of the clip + * @param split Split or unsplit */ void doSplitAudio(const GenTime &pos, int track, bool split); void setVideoOnly(); void setAudioOnly();