mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-01 02:35:37 +01:00
Merge pull request #10255 from storytold/fix/transform-dialog-canvas
Keep artwork visible in Reflect and other transform previews
This commit is contained in:
1 file changed
+5
@@ -150,11 +150,16 @@ pub(crate) fn open(app: &mut VectorcraftApp, kind: Kind, tool: &Value) {
|
||||
let document = app.session.active().map(|doc| (doc.uid, doc.reverts));
|
||||
let rows = rows(app, kind, &opening);
|
||||
let fields = fields_of(&rows, &opening);
|
||||
let canvas = crate::doc_windows::current(app).map(crate::canvas::canvas_id);
|
||||
let dialog = HostedParamDialog::new(&ctx, kind.command(), fields, move |f| {
|
||||
if kind == Kind::Move {
|
||||
link_distance_and_angle(f);
|
||||
}
|
||||
let dialog = ParamDialog::new(kind.command(), kind.title(), rows.clone()).previews(true).values(Bind::bound(f));
|
||||
let dialog = match canvas {
|
||||
Some(canvas) => dialog.canvas(canvas),
|
||||
None => dialog,
|
||||
};
|
||||
if kind == Kind::Move { dialog.remember(MOVE_KEY) } else { dialog }
|
||||
});
|
||||
// A dialog this one replaces leaves its preview behind otherwise.
|
||||
|
||||
Reference in new issue
Block a user