if(clickfound && node)
{
- show_timepoint_menu(node, stime, actual_time+time_offset<stime?SIDE_LEFT:SIDE_RIGHT);
+ show_timepoint_menu(node, stime, time_offset, actual_time+time_offset<stime?SIDE_LEFT:SIDE_RIGHT);
}
}
}
void
-CellRenderer_TimeTrack::show_timepoint_menu(const etl::handle<synfig::Node>& node, const synfig::Time& time, Side side)
+CellRenderer_TimeTrack::show_timepoint_menu(const etl::handle<synfig::Node>& node, const synfig::Time& time, const synfig::Time& time_offset, Side side)
{
std::set<synfig::Waypoint, std::less<UniqueID> > waypoint_set;
int n;
*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;
CellRenderer_TimeTrack();
~CellRenderer_TimeTrack();
- void show_timepoint_menu(const etl::handle<synfig::Node>& node, const synfig::Time& time, Side side=SIDE_RIGHT);
+ void show_timepoint_menu(const etl::handle<synfig::Node>& node, const synfig::Time& time, const synfig::Time& time_offset, Side side=SIDE_RIGHT);
void set_adjustment(Gtk::Adjustment &x);
Gtk::Adjustment *get_adjustment();