Fix #6252: selecting an object gives new art its fill, stroke and weight

With New Art Has Basic Appearance on (the default), the selection never
reached the fill and stroke proxies, so new art kept the colours set last.
A select.* command or layer.target that changes the selection now loads
the proxies and the weight from what the selection shows in them.

A paint or weight the selected objects don't share stays as it was, and
art without paint (a placed image) changes nothing. The template is left
alone, and only a changed selection loads, so a sampled paint stays.
This commit is contained in:
Sven Lafebre
2026-11-09 01:26:47 +01:00
parent 49c8b86461
commit de6cc6a9c3
5 changed files with 184 additions and 5 deletions
+4 -2
View File
@@ -4126,8 +4126,10 @@ New objects take the fill and stroke proxies (`paint.setFill` / `paint.setStroke
selected) on top of a template. With nothing selected, `stroke.set` / `stroke.setAdvanced` (cap, join, dashes,
arrowheads, profile…) and `graphicStyle.apply` (every fill, stroke and effect, opacity, blend mode and the link to the
style; `add: true` stacks it) set that template instead of editing art. With the Appearance panel's New Art Has Basic
Appearance off (`appearance.setNewArtBasic {on: false}`, the preference `newArtBasic`) new art takes the whole
appearance of the last selected object. `appearance.newArt` reports what the next object gets; `paint.default`
Appearance on (the default), a `select.*` command or `layer.target` that changes the selection loads the proxies and
the weight from it: only a paint or weight the selected objects share, and art without paint (a placed image) changes
nothing. With the option off (`appearance.setNewArtBasic {on: false}`, the preference `newArtBasic`) new art takes the
whole appearance of the last selected object. `appearance.newArt` reports what the next object gets; `paint.default`
resets it.
`appearance.setNewArtBasic` rejects an `on` value that is not a boolean. Omitting `on` toggles the current preference.