mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 07:46:07 +00:00
With the selection as its scope, a fix that removes or unwraps objects (Needless Groups, Stray Points, Empty Text and the others) kept the list of selected objects current by searching it and splicing it once for each object it changed. Removing many selected objects above a long run of others took time that grew with the square of their number. The list is now rebuilt in one walk after each pass: each changed object gives way to what replaces it, in its place, and the others keep their order. The objects found, the counts, the document and the undo step are the same as before. Empty Artboards deleted each empty artboard with its own Vec::remove and walked every ruler guide again for each one. It now drops the empty artboards in one walk and deletes their guides in one more. The same artboards and guides are deleted as before. Tests cover the order after unwrapping nested and empty groups, Fix All reaching an unwrapped member on a later round, the rebuild itself, the number of objects looked at for 150 and 300 removals, and the number of walks over the artboards and guides when 40 empty artboards are deleted.