From 44c9136b94ad618037353484723856238127a6ec Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 24 Oct 2007 16:46:42 +0000 Subject: [PATCH] When right-clicking on a simple waypoint in a PasteCanvas' 'canvas' parameter, pop up a menu allowing 'jump to' and 'change interp' at least. git-svn-id: http://svn.voria.com/code@961 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp | 10 ++++++---- synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp b/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp index 4d3ff7c..1a91215 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp @@ -762,7 +762,7 @@ CellRenderer_TimeTrack::activate_vfunc( if(clickfound && node) { - show_timepoint_menu(node, stime, actual_time+time_offset > waypoints, W } void -CellRenderer_TimeTrack::show_timepoint_menu(const etl::handle& node, const synfig::Time& time, Side side) +CellRenderer_TimeTrack::show_timepoint_menu(const etl::handle& node, const synfig::Time& time, const synfig::Time& time_offset, Side side) { std::set > waypoint_set; int n; @@ -1013,13 +1013,15 @@ CellRenderer_TimeTrack::show_timepoint_menu(const etl::handle& nod *canvas_interface(), &synfigapp::CanvasInterface::set_time ), - time + time - time_offset ) )); if(!waypoint_set.empty()) { - if(waypoint_set.size()==1) + // attempting to locate the valuenode for the clicked waypoint doesn't work if this is a Canvas parameter, + // so act as if there were multiple waypoints in that case as a workaround + if(waypoint_set.size()==1 && !Canvas::Handle::cast_dynamic(node)) { delete menu; menu=0; diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.h b/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.h index a598d9b..98af667 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.h +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.h @@ -173,7 +173,7 @@ public: CellRenderer_TimeTrack(); ~CellRenderer_TimeTrack(); - void show_timepoint_menu(const etl::handle& node, const synfig::Time& time, Side side=SIDE_RIGHT); + void show_timepoint_menu(const etl::handle& node, const synfig::Time& time, const synfig::Time& time_offset, Side side=SIDE_RIGHT); void set_adjustment(Gtk::Adjustment &x); Gtk::Adjustment *get_adjustment(); -- 2.7.4