Don't allow the Index parameter of the Duplicate layer to be disconnected.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 7 Jan 2008 13:53:33 +0000 (13:53 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 7 Jan 2008 13:53:33 +0000 (13:53 +0000)
git-svn-id: http://svn.voria.com/code@1278 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp

index bb94e8f..c387f1b 100644 (file)
@@ -92,6 +92,10 @@ Action::ValueDescDisconnect::is_candidate(const ParamList &x)
        if(candidate_check(get_param_vocab(),x))
        {
                ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
+
+               // don't allow the Index parameter of the Duplicate layer to be disconnected
+               if(value_desc.parent_is_layer_param() && value_desc.get_layer()->get_name() == "duplicate" && value_desc.get_param_name() == "index")
+                       return false;
                if(!value_desc.parent_is_canvas() && value_desc.is_value_node() && value_desc.get_value_node()->rcount()>1)
                        return true;
                if(value_desc.is_const())