mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Fix #3705: pastes go inside the object in Draw Inside, and Shift+D no longer stops at Draw Behind
The drawing-modes help page (https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/learn-drawing-basics/drawing-modes-overview.html) has you draw or paste into the selected object in Draw Inside. It also says the modes apply to Paste in Place and Paste on All Artboards but not to Paste in Front or Paste in Back. Cause: only new art (create::insert_look) read the drawing mode. The paste commands (edit::paste_clip) always used the insertion parent, so a paste in Draw Inside landed on the layer above the object, outside the clip. Double-clicking the object first only isolated the bare path, which didn't change where the paste went. Separately, view.drawMode {} went from Draw Behind to Draw Inside whenever one object was selected, then refused it unless the object was a path, compound path or type. So with one group selected (such as the clip group Draw Inside makes), Shift+D and the toolbar button failed every time and stayed in Draw Behind. Change: the clip-group wrapping moves into create::draw_inside_group, which new art and pastes now share. In Draw Inside, Paste, Paste in Place and Paste on All Artboards insert the copies at the top of that group, in the paste's one undo step, ignoring Paste Remembers Layers. In Draw Behind, Paste in Place and Paste on All Artboards go just below the selection, as Paste in Back does. Paste in Front, Paste in Back and pasted artboards keep their placement. Shift+D goes on to Draw Inside only when it can draw into the selection, and otherwise back to Draw Normal. Verification: pasting_in_draw_inside_puts_the_copies_inside_the_object, paste_in_place_in_draw_behind_goes_behind_the_selection and shift_d_goes_past_draw_behind_whatever_is_selected all fail without the change ("Layer" != "Clip Group"; index 3 != 0; the Draw Inside error on a selected group). cargo xtask ci: all 10 steps passed.
This commit is contained in:
committed by
bflatastic
parent
a537a1b5bd
commit
eb4635fd4b
+3
-1
File diff suppressed because one or more lines are too long
+5
-1
@@ -2961,7 +2961,11 @@ Placement: `edit.paste {center}` centres the objects on a point (the app passes
|
||||
by `dx`/`dy` (the Paste Offset preference). With nothing selected, `edit.pasteInFront` / `edit.pasteInBack` put them
|
||||
on top / at the bottom of the current layer. `edit.pasteOnAllArtboards` keeps their offset to the artboard they were
|
||||
copied from. `layer.pasteRemembersLayers {on?}` (a document option, `document.inspect` → `pasteRemembersLayers`)
|
||||
pastes objects back into the layers they came from, by name, making missing ones.
|
||||
pastes objects back into the layers they came from, by name, making missing ones. Drawing modes (`view.drawMode`) apply
|
||||
too: in Draw Inside, `edit.paste`, `edit.pasteInPlace` and `edit.pasteOnAllArtboards` put the objects inside the
|
||||
object drawn into (its clip group, made on the first paste), whatever Paste Remembers Layers says; in Draw Behind,
|
||||
`edit.pasteInPlace` and `edit.pasteOnAllArtboards` put them just below the selection. `edit.pasteInFront` and
|
||||
`edit.pasteInBack` ignore the drawing mode.
|
||||
|
||||
Artboards copy with their art. `artboard.copy {index? | indices?, art?}` puts artboards on the clipboard together
|
||||
with the art fully inside each (`index` and `indices` default to the artboards the Artboard tool has selected; `art`
|
||||
|
||||
File diff suppressed because one or more lines are too long
+4
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user