Author: Carlos Lopez <[email protected]>
Date:   Mon Jan 16 21:49:04 2012 +0100

Don't add a new ValueNode each time because it marks the layer as dirty and the 
update cycle runs indefinitely.

---

 synfig-core/src/modules/mod_geometry/outline.cpp |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/synfig-core/src/modules/mod_geometry/outline.cpp 
b/synfig-core/src/modules/mod_geometry/outline.cpp
index 9503383..9aadcfe 100644
--- a/synfig-core/src/modules/mod_geometry/outline.cpp
+++ b/synfig-core/src/modules/mod_geometry/outline.cpp
@@ -602,7 +602,18 @@ Outline::set_param(const String & param, const ValueBase 
&value)
        IMPORT(homogeneous_width);
        if(param=="width_grow" && value.get_type() == ValueBase::TYPE_REAL)
        {
-               connect_dynamic_param("width_grow", 
ValueNode_Const::create(value));
+               Layer::DynamicParamList dynparam(dynamic_param_list());
+               ValueNode::Handle previous(dynparam["width_grow"]);
+               if(!previous)
+                       connect_dynamic_param("width_grow", 
ValueNode_Const::create(value));
+               else
+                       {
+                               ValueNode_Const::Handle 
value_node(ValueNode_Const::Handle::cast_dynamic(previous));
+                               if(value_node)
+                                       value_node->set_value(value);
+                               else
+                                       connect_dynamic_param("width_grow", 
ValueNode_Const::create(value));
+                       }
                width_grow=value;
                return true;
        }


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to