mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-03 06:30:00 -06:00
#1002: new art is refused when no layer is shown and unlocked
With every layer hidden or locked, the insertion layer fell back to the top layer anyway, so drawing a shape, typing, pasting, making a graph, a flare, a grid, trim marks or a symbol put the art on a hidden or locked layer: invisible, or unselectable by Select All. Illustrator refuses to draw on a locked or hidden target layer (public forum answers, e.g. https://community.adobe.com/t5/illustrator/can-t-draw-a-new-object-in-my-document/m-p/11107182). DocState::target_parent is insertion_parent for new art, failing with "the target layer is locked or hidden" when it would be a layer that isn't editable; those creation paths use it. Another layer that is shown and unlocked still takes the art, as before. The message is in the de, es, fr, it, ja, ru and uk catalogs. File > Place is left as it is (another branch reworks it). The test hides, then locks, the only layer: an ellipse, a polar grid, text and a paste each fail with the message and leave the document unchanged; a new layer then takes a rectangle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # ROADMAP.md
This commit is contained in:
@@ -346,7 +346,7 @@ fn paste_clip(s: &mut Session, p: &Value, mode: PasteMode, clip: &Clipboard, cho
|
||||
let off = s.prefs.paste_offset;
|
||||
let st = s.doc()?;
|
||||
let same_doc = clip.source_doc == Some(st.uid);
|
||||
let parent = st.insertion_parent();
|
||||
let parent = st.target_parent()?;
|
||||
// A copied artboard comes back with its art: right of the last artboard, or where it was
|
||||
// (Paste in Place, in Front, in Back). Paste on All Artboards pastes only the art.
|
||||
let board = clip
|
||||
|
||||
Reference in New Issue
Block a user