mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-01 13:47:21 -06:00
Fix #4382: the Eyedropper's Alt-click puts what it picked up on the object clicked when nothing is selected
With nothing selected, a click with the Eyedropper picks up an object's attributes and an Alt/Option-click on another object applies them, as the reference app's Eyedropper does. Alt-click only copied from a selected object, and with nothing selected it failed. The session now keeps a copy of what appearance.copyFrom picked up last, and a reversed copy with nothing selected applies it.
This commit is contained in:
@@ -90,6 +90,9 @@ pub struct Session {
|
||||
/// The Appearance panel's active fill/stroke row (`appearance.setActiveItem`); not saved. Read
|
||||
/// it through [`Session::appearance_item`], which drops it once the selection changes.
|
||||
pub(crate) active_appearance_item: Option<cmd::appearance::ActiveItem>,
|
||||
/// What the Eyedropper picked up last (`appearance.copyFrom`): an Alt-click with nothing
|
||||
/// selected puts it on the object clicked (#4382). Not saved.
|
||||
pub(crate) eyedropper_sample: Option<Arc<vectorcraft_doc::Node>>,
|
||||
/// The last solid colour applied (the toolbar's Color button; `,` applies it again).
|
||||
pub last_solid: Color,
|
||||
/// The last gradient applied (the toolbar's Gradient button; `.` applies it again).
|
||||
|
||||
Reference in New Issue
Block a user