mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 00:40:57 -06:00
Swatches: linked paints find their swatch in one name map
Add Used Colors, New Color Group from artwork and Select All Unused looked up each linked paint's swatch by searching every swatch. They now build one map of swatch names first, with the built-in Registration swatch, and the first swatch of each name as before. New tests and test cases: New Color Group from artwork with repeated, near-equal and -0.0 colors, a Registration link and names that need numbering, and New Swatch and Edit Color Group with near-equal and -0.0 colors; each checks the names, their order and one undo step.
This commit is contained in:
@@ -238,7 +238,7 @@ impl FreeSwatchNames {
|
||||
self.taken.insert(name.clone());
|
||||
name
|
||||
}
|
||||
/// Count `name` as taken (a swatch or colour group added another way).
|
||||
/// Count `name` as taken (a swatch or color group added another way).
|
||||
pub fn insert(&mut self, name: &str) {
|
||||
self.taken.insert(name.to_string());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user