Gui: Add easing to navigation animations

This commit is contained in:
Rexbas
2024-01-30 20:04:59 +01:00
committed by Chris Hennes
parent d512d68ec4
commit 7cfb4b10e5
3 changed files with 8 additions and 3 deletions

View File

@@ -3409,8 +3409,12 @@ void View3DInventorViewer::startAnimation(const SbRotation& orientation,
->GetInt("AnimationDuration", 500);
}
QEasingCurve::Type easingCurve = static_cast<QEasingCurve::Type>(App::GetApplication()
.GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")
->GetInt("NavigationAnimationEasingCurve", QEasingCurve::Type::InOutCubic));
auto animation = std::make_shared<FixedTimeAnimation>(
navigation, orientation, rotationCenter, translation, duration);
navigation, orientation, rotationCenter, translation, duration, easingCurve);
navigation->startAnimating(animation, wait);
}