mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 02:07:10 +01:00
The check that decided between taking removed objects out of the selection's paints and reading the selection again counted each id once. Removing a group of 10,000 squares while two squares stayed selected took all 10,000 fills, strokes and weights out instead of reading the two squares again. SelectionPaints::reads_no_more_than now counts the objects that reading each side meets: each id, the contents of groups, layers, Live Paint groups and containers inside groups, as the paints read them, and ruler guides. The two counts go up one object at a time in turn and stop when either side runs out, so the check itself meets at most twice as many objects as the smaller side holds. Two tests in large_edits.rs count the fills read or taken out. Removing a large group beside two squares fails with the old id count (10,000 fills). Removing a small group beside a large one fails when only the removed side's contents are counted (10,000 fills).