From 8f0d7ebed210c215ec63202b619a9a86b3913c13 Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 7 Jan 2008 16:46:36 +0000 Subject: [PATCH] Don't allow Duplicate ValueNodes in the Children dialog to be disconnected. git-svn-id: http://svn.voria.com/code@1280 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp b/synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp index c387f1b..091ab9a 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp @@ -36,6 +36,7 @@ #include "valuedescdisconnect.h" #include #include +#include #include @@ -102,6 +103,12 @@ Action::ValueDescDisconnect::is_candidate(const ParamList &x) return false; if(value_desc.is_value_node() && ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node())) return false; + // don't allow Duplicate ValueNodes in the Children dialog to be disconnected + if(value_desc.is_value_node() && + ValueNode_Duplicate::Handle::cast_dynamic(value_desc.get_value_node()) && + !value_desc.parent_is_layer_param() && + !value_desc.parent_is_value_node()) + return false; return true; } return false; -- 2.7.4