parent
db76de5de8
commit
fcc8518bce
2 changed files with 7 additions and 1 deletions
|
|
@ -7079,7 +7079,10 @@ void AnimationTrackEditor::_update_snap_unit() {
|
|||
if (timeline->is_using_fps()) {
|
||||
snap_unit = 1.0 / step->get_value();
|
||||
} else {
|
||||
snap_unit = 1.0 / Math::round(1.0 / step->get_value()); // Follow the snap behavior of the timeline editor.
|
||||
double integer;
|
||||
double fraction = Math::modf(step->get_value(), &integer);
|
||||
fraction = 1.0 / Math::round(1.0 / fraction);
|
||||
snap_unit = integer + fraction;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue