mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 04:07:12 -06:00
M3: preserve highlighted Eyedropper ranges and reject incompatible transparency
This commit is contained in:
@@ -491,7 +491,7 @@ fn swatch_name_clash(d: &Document, old: &str, new: &str) -> bool {
|
||||
let own = |w: &vectorcraft_color::Swatch| pattern_name(&w.paint).is_some_and(|p| p == old);
|
||||
let mut holders = d.swatches_iter().filter(|w| w.name == new).peekable();
|
||||
let only_own = holders.peek().is_some() && holders.all(own);
|
||||
d.swatch_name_taken(new) && !(only_own && !d.swatches_iter().any(|w| w.name == old && own(w)))
|
||||
d.swatch_name_taken(new) && (!only_own || d.swatches_iter().any(|w| w.name == old && own(w)))
|
||||
}
|
||||
|
||||
/// Rename a pattern in swatches, paints and the edit record. Of the swatches named `old`, only the
|
||||
|
||||
Reference in New Issue
Block a user