Transform: the corner command stops when the pending edit fails to settle

set_rectangle_corners reported an error from finish_tool_edit and still ran
object.setLiveShape on the selection. It now returns after reporting the error.
This commit is contained in:
dotCooCoo committed 2026-11-19 11:39:56 -08:00
1 parent 4e742dff33
commit f4fb0d187c
1 file changed
+7 -2
+7 -2
View File
@@ -146,8 +146,13 @@ fn set_rectangle_corners(app: &mut VectorcraftApp, mut p: Value, corner: Option<
p["corners"] = corner.map_or(json!([0, 1, 2, 3]), |k| json!([k]));
// The edit the tool computes on another thread comes first: the rectangles are the ones
// selected after it.
let r = app.session.finish_tool_edit();
crate::canvas::apply_requests(app, r);
match app.session.finish_tool_edit() {
Ok(reqs) => crate::canvas::apply_requests(app, Ok(reqs)),
Err(e) => {
app.status(e.to_string());
return;
}
}
if app.session.active().is_none() {
return;
}