diff --git a/synfig-studio/src/gui/timeplotdata.cpp b/synfig-studio/src/gui/timeplotdata.cpp index 3e1ad08..87f8e7b 100644 --- a/synfig-studio/src/gui/timeplotdata.cpp +++ b/synfig-studio/src/gui/timeplotdata.cpp @@ -209,7 +209,7 @@ TimePlotData::get_double_pixel_t_coord(const synfig::Time& t) const int TimePlotData::get_pixel_y_coord(synfig::Real y) const { - return etl::round_to_int((y - range_lower) * range_k); + return etl::round_to_int((-y - range_lower) * range_k); } synfig::Time @@ -220,7 +220,7 @@ TimePlotData::get_t_from_pixel_coord(double pixel) const double TimePlotData::get_y_from_pixel_coord(double pixel) const { - return range_lower + pixel / range_k; + return -(range_lower + pixel / range_k); } } diff --git a/synfig-studio/src/gui/widgets/widget_curves.cpp b/synfig-studio/src/gui/widgets/widget_curves.cpp index 3a57640..52ff519 100644 --- a/synfig-studio/src/gui/widgets/widget_curves.cpp +++ b/synfig-studio/src/gui/widgets/widget_curves.cpp @@ -161,7 +161,7 @@ struct Widget_Curves::CurveStruct: sigc::trackable // we are looking for std::map::iterator i = channels[channel].values.lower_bound(time); if (i != channels[channel].values.end() && i->first - time <= tolerance) - return -i->second; + return i->second; // Since that didn't work, we now need // to go ahead and figure out what the @@ -217,7 +217,7 @@ struct Widget_Curves::CurveStruct: sigc::trackable return Real(0.0); } - return -channels[channel].values[time]; + return channels[channel].values[time]; } };