diff --git a/include/AutomatableModelView.h b/include/AutomatableModelView.h index b7c3579e7..6c59d8f61 100644 --- a/include/AutomatableModelView.h +++ b/include/AutomatableModelView.h @@ -1,7 +1,7 @@ /* * AutomatableModelView.h - class AutomatableModelView * - * Copyright (c) 2008-2009 Tobias Doerffel + * Copyright (c) 2008-2013 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -101,6 +101,7 @@ public slots: void execConnectionDialog(); void removeConnection(); void editSongGlobalAutomation(); + void removeSongGlobalAutomation(); protected: diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index 744ba26f5..3d1995636 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -1,7 +1,7 @@ /* * AutomatableModelView.cpp - implementation of AutomatableModelView * - * Copyright (c) 2011 Tobias Doerffel + * Copyright (c) 2011-2013 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -88,6 +88,12 @@ void AutomatableModelView::addDefaultActions( QMenu * _menu ) AutomatableModel::tr( "Edit song-global automation" ), amvSlots, SLOT( editSongGlobalAutomation() ) ); + + _menu->addAction( QPixmap(), + AutomatableModel::tr( "Remove song-global automation" ), + amvSlots, + SLOT( removeSongGlobalAutomation() ) ); + _menu->addSeparator(); QString controllerTxt; @@ -241,4 +247,11 @@ void AutomatableModelViewSlots::editSongGlobalAutomation() +void AutomatableModelViewSlots::removeSongGlobalAutomation() +{ + delete AutomationPattern::globalAutomationPattern( amv->modelUntyped() ); +} + + + #include "moc_AutomatableModelView.cxx"