AutomatableModelView/ContextMenu: option for unlinking all controls

Integrated patch by Rodrigo Rodrigues da Silva which adds an option
to all AutomatableModelView's context menu allowing to unlink all
linked controls.
This commit is contained in:
Tobias Doerffel committed 2010-07-28 21:25:30 +02:00
1 parent 9e42d4388e
commit 68abd34908
4 files changed
+47 -11

No files matched your search

+16 -2
View File
@@ -1,7 +1,7 @@
/*
* AutomatableModel.cpp - some implementations of AutomatableModel-class
*
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -248,7 +248,7 @@ void AutomatableModel::setAutomatedValue( const float _value )
void AutomatableModel::setRange( const float _min, const float _max,
const float _step )
{
if( ( m_maxValue != _max ) || ( m_minValue != _min ) )
if( ( m_maxValue != _max ) || ( m_minValue != _min ) )
{
m_minValue = _min;
m_maxValue = _max;
@@ -423,6 +423,20 @@ void AutomatableModel::unlinkModels( AutomatableModel * _model1,
void AutomatableModel::unlinkAllModels()
{
AutomatableModel * _model;
foreach( _model, m_linkedModels )
{
unlinkModels( this, _model );
}
m_hasLinkedModels = false;
}
void AutomatableModel::setControllerConnection( ControllerConnection * _c )
{
m_controllerConnection = _c;