fix: View > Go to Time accepts the dialog's float frame [skip ci]
The Go to Time dialog's Frame field sends a float (5.0); time.set read `frame` with as_i64, got None and failed with "need time, frame or timecode". Read it as any JSON number and round. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
67434e9038
commit
c8968cee1f
@@ -883,3 +883,14 @@ fn property_edits_apply_to_every_selected_layer() {
|
||||
s.execute("prop.set", json!({"layer": a, "path": "transform/rotation", "value": 30})).unwrap();
|
||||
assert_eq!(prop(&s, b, "transform/rotation").value.as_f64(), 0.0);
|
||||
}
|
||||
|
||||
/// View > Go to Time's dialog sends its Frame field as a float; `time.set` used to reject it
|
||||
/// with "need `time`, `frame` or `timecode`".
|
||||
#[test]
|
||||
fn go_to_time_accepts_a_float_frame_from_the_dialog() {
|
||||
let (mut s, _) = setup();
|
||||
let r = s.execute("time.set", json!({"frame": 12.0})).unwrap();
|
||||
assert_eq!(r["frame"], json!(12));
|
||||
let r = s.execute("time.set", json!({"frame": 7})).unwrap();
|
||||
assert_eq!(r["frame"], json!(7));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user