mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-23 10:53:35 +01:00
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:
1 parent
4e742dff33
commit
f4fb0d187c
1 file changed
+7
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user