From: dooglus Date: Tue, 5 Feb 2008 11:40:45 +0000 (+0000) Subject: Don't fail if we can't find the row in the param panel for the waypoint - it probably... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=77228087441110c6454b2f0e05ad43d20f59d6c1;p=synfig.git Don't fail if we can't find the row in the param panel for the waypoint - it probably just means the valuenode isn't in this param panel because it's in a different canvas. git-svn-id: http://svn.voria.com/code@1593 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/dock_timetrack.cpp b/synfig-studio/trunk/src/gtkmm/dock_timetrack.cpp index b3dc0bf..ee68669 100644 --- a/synfig-studio/trunk/src/gtkmm/dock_timetrack.cpp +++ b/synfig-studio/trunk/src/gtkmm/dock_timetrack.cpp @@ -373,36 +373,22 @@ public: synfig::Waypoint::Side side) { std::set > waypoint_set; - int n=synfig::waypoint_collect(waypoint_set,time,node); + synfig::waypoint_collect(waypoint_set,time,node); synfigapp::ValueDesc value_desc; - bool first = true; - if(!waypoint_set.empty()) - { - for (std::set >::iterator iter = waypoint_set.begin(); iter != waypoint_set.end(); iter++) - { - ValueNode::Handle value_node(iter->get_parent_value_node()); - assert(value_node); - - Gtk::TreeRow row; - if(!param_tree_store_->find_first_value_node(value_node, row)) - { - synfig::error(__FILE__":%d: Unable to find the valuenode",__LINE__); - return; - } - if(!row) - return; + if (waypoint_set.size() == 1) + { + ValueNode::Handle value_node(waypoint_set.begin()->get_parent_value_node()); + assert(value_node); - if (first) - { - value_desc = static_cast(row[model.value_desc]); - first = false; - } - } + Gtk::TreeRow row; + if (param_tree_store_->find_first_value_node(value_node, row) && row) + value_desc = static_cast(row[model.value_desc]); + } + if (!waypoint_set.empty()) signal_waypoint_clicked_timetrackview(value_desc,waypoint_set,button,side); - } } };