From: dooglus Date: Mon, 7 Jan 2008 17:18:30 +0000 (+0000) Subject: Don't show the 'Convert' sub-menu for Duplicate ValueNodes in the Children dialog. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=18cb5645587e00da244d98aca07fe809fd9ed13e;p=synfig.git Don't show the 'Convert' sub-menu for Duplicate ValueNodes in the Children dialog. git-svn-id: http://svn.voria.com/code@1281 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/instance.cpp b/synfig-studio/trunk/src/gtkmm/instance.cpp index 470e067..8a1addf 100644 --- a/synfig-studio/trunk/src/gtkmm/instance.cpp +++ b/synfig-studio/trunk/src/gtkmm/instance.cpp @@ -48,6 +48,7 @@ #include //#include #include +#include #include "widget_waypointmodel.h" #include #include "iconcontroller.h" @@ -1006,8 +1007,18 @@ Instance::make_param_menu(Gtk::Menu *menu,synfig::Canvas::Handle canvas, synfiga // Populate the convert menu by looping through // the ValueNode book and find the ones that are // relevant. - // don't allow the Index parameter of the Duplicate layer to be converted - if (!value_desc.parent_is_layer_param() || value_desc.get_layer()->get_name() != "duplicate" || value_desc.get_param_name() != "index") + + // show the 'Convert' sub-menu if this valuedesc is anything other than either: + // the 'Index' parameter of a Duplicate layer + // or + // a Duplicate ValueNode whose parent is not a (layer or ValueNode) + if (!((value_desc.parent_is_layer_param() && + value_desc.get_layer()->get_name() == "duplicate" && + value_desc.get_param_name() == "index") || + (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())))) { Gtk::Menu *convert_menu=manage(new Gtk::Menu()); LinkableValueNode::Book::const_iterator iter;