AutomatableModelView: added context menu action for removing song-global automation
Up to now there was no possibility to remove song-global automation from a control once created. Overcome this issue by adding an according action in the context menu of all AutomatableModelView instances.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* AutomatableModelView.h - class AutomatableModelView
|
||||
*
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* 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:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* AutomatableModelView.cpp - implementation of AutomatableModelView
|
||||
*
|
||||
* Copyright (c) 2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2011-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* 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"
|
||||
|
||||
Reference in New Issue
Block a user