mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 12:17:14 -06:00
G12: General › Corner Radius is the Rounded Rectangle tool's radius (#394)
Squashed from #4074 onto main.
This commit is contained in:
committed by
bflatastic
parent
f6a20c9f56
commit
ea36291f30
@@ -541,7 +541,18 @@ impl Session {
|
||||
let tile_edge_changed = p.pattern_tile_edge_color != self.prefs.pattern_tile_edge_color;
|
||||
let fonts_folder_changed = p.fonts_folder != self.prefs.fonts_folder;
|
||||
let hyphen_exceptions_changed = p.hyphenation_exceptions != self.prefs.hyphenation_exceptions;
|
||||
let corner_radius_changed = p.corner_radius != self.prefs.corner_radius;
|
||||
self.prefs = p;
|
||||
if corner_radius_changed {
|
||||
// General › Corner Radius is the Rounded Rectangle tool's radius (#394): a tool already
|
||||
// made (active, or lent a selection tool for a drag) takes the new value.
|
||||
let r = serde_json::Value::from(self.prefs.corner_radius);
|
||||
for t in std::iter::once(&mut self.tool).chain(self.lender.as_mut()) {
|
||||
if t.id() == "roundedRectangle" {
|
||||
t.set_option("cornerRadius", &r);
|
||||
}
|
||||
}
|
||||
}
|
||||
if fonts_folder_changed {
|
||||
let folder = self.prefs.fonts_folder.trim();
|
||||
// A folder an automation caller chose is read without following its links out of it.
|
||||
|
||||
Reference in New Issue
Block a user