Remove some debugging printf() calls I left in accidentally in r1282.
[synfig.git] / synfig-studio / trunk / src / synfigapp / actions / valuedescconnect.cpp
index fe4714b..2979ed8 100644 (file)
@@ -95,6 +95,17 @@ Action::ValueDescConnect::is_candidate(const ParamList &x)
 {
        if(candidate_check(get_param_vocab(),x))
        {
+               // don't show the option of connecting to an existing Index parameter of the Duplicate layer
+               if(x.count("dest"))
+               {
+                       ValueDesc value_desc=x.find("dest")->second.get_value_desc();
+
+                       if (value_desc.parent_is_layer_param() &&
+                               value_desc.get_layer()->get_name() == "duplicate" &&
+                               value_desc.get_param_name() == "index")
+                               return false;
+               }
+
                if(x.count("src"))
                {
                        ValueDesc value_desc=x.find("dest")->second.get_value_desc();