From 5a17ece8e598f5097199c747674643f825ef2a63 Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 7 Jan 2008 13:53:33 +0000 Subject: [PATCH] Don't allow the Index parameter of the Duplicate layer to be disconnected. git-svn-id: http://svn.voria.com/code@1278 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp b/synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp index bb94e8f..c387f1b 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp @@ -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()) -- 2.7.4