updated timeline tools to allow rounding as well as flooring to find the frame

at the mouse cursor point
This commit is contained in:
itsmattkc
2020-01-02 04:11:50 +11:00
parent e8fddc2d5b
commit ae71b206cd
11 changed files with 101 additions and 54 deletions
+2 -2
View File
@@ -158,8 +158,8 @@ void TimelineWidget::ImportTool::DragEnter(TimelineViewMouseEvent *event)
void TimelineWidget::ImportTool::DragMove(TimelineViewMouseEvent *event)
{
if (parent()->HasGhosts()) {
rational time_movement = event->GetCoordinates().GetFrame() - drag_start_.GetFrame();
int track_movement = event->GetCoordinates().GetTrack().index() - drag_start_.GetTrack().index();
rational time_movement = event->GetFrame() - drag_start_.GetFrame();
int track_movement = event->GetTrack().index() - drag_start_.GetTrack().index();
// If snapping is enabled, check for snap points
if (Core::instance()->snapping()) {