Hi,
The problem comes from AutomatableModel::m_initValue wich is not fitted
either in constructor or in setter. Idem for m_value in constructor, imo
this is not enough consistent.
I propose to:
- call fittedValue() in init value setter.
- always call setter to initialize current & init values.
See attached patch !
regards,
On Mon, Feb 6, 2012 at 8:36 PM, Tobias Doerffel
<[email protected]>wrote:
> Hi!
>
> 2012/1/25 S . <[email protected]>:
> > Here are 3 small patches that I propose to you, based on stable-0.4
> > (cacc0d6).
> >
> > These patches are only ergonomics enhancements: magnetic knob
>
> The magnetic knob feature breaks various knobs completely. Good
> example: controls of the Plate reverb effect and other LADSPA effects.
> Can you please have a look at this? If you can't come up with a
> solution for that, I'd have to revert the commit as it really breaks
> important functionality.
>
> Thanks and best regards
> Toby
>
From 26f1050a05f17758ad28fd12e72c0c9dc875f01a Mon Sep 17 00:00:00 2001
From: NoiseByNorthwest <[email protected]>
Date: Sun, 12 Feb 2012 13:59:25 +0100
Subject: [PATCH] knob: fit init & current value upon initialization
---
src/core/AutomatableModel.cpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/core/AutomatableModel.cpp b/src/core/AutomatableModel.cpp
index 607385c..2207c3a 100644
--- a/src/core/AutomatableModel.cpp
+++ b/src/core/AutomatableModel.cpp
@@ -44,8 +44,6 @@ AutomatableModel::AutomatableModel( DataType _type,
bool _default_constructed ) :
Model( _parent, _display_name, _default_constructed ),
m_dataType( _type ),
- m_value( _val ),
- m_initValue( _val ),
m_minValue( _min ),
m_maxValue( _max ),
m_step( _step ),
@@ -55,6 +53,7 @@ AutomatableModel::AutomatableModel( DataType _type,
m_hasLinkedModels( false ),
m_controllerConnection( NULL )
{
+ setInitValue( _val );
}
@@ -473,7 +472,7 @@ void AutomatableModel::unlinkControllerConnection()
void AutomatableModel::setInitValue( const float _value )
{
- m_initValue = _value;
+ m_initValue = fittedValue( _value );
bool journalling = testAndSetJournalling( false );
setValue( _value );
setJournalling( journalling );
--
1.7.5.4
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
LMMS-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmms-devel