This reverts the previous work-around 7d62f14dd for the RTree splitting
degeneracy that was placed prior to v5. It appears not to have worked
for all systems. In its place, we use doubles instead of floats to
calculate the bounding box when filling the RTree. This keeps maximum
volume items from overlapping with the system boundary in test cases.
(cherry-picked from 539ca5aa3)
The origin item doesn't have a fixed size. It is constant on the screen but
changes the effective BBox size based on the zoom level.
But we can't simply set it to the maximum size as this causes a splitting degeneracy
when compiling for Debian i386. By modestly adjusting the bbox, we avoid the degeneracy
while keeping the origin visible at all zoom levels
Fixes: lp:1777379
* https://bugs.launchpad.net/kicad/+bug/1777379
Limit the bbox size of origin view item to item size. This prevents
excessive redraw.
This also side-steps a degeneracy in the RTree calculation under certain
conditions in i386 where multiple, maximum-sized items are degenerate.
Fixes: lp:1774316
* https://bugs.launchpad.net/kicad/+bug/1774316
PICKED_ITEMS_LIST knows the architecture of the undo commands so
that it can delete those ITEMs which it owns. This represents poor
encapsulation so instead of adding yet another case, I added a
UR_TRANSIENT item flag which is set by callers whenever they create
new objects to “give to” the undo/redo stack. This allowed some
cleanup of other code, but cleaning up UR_DELETE and UR_WIRE_IMAGE
will be a bigger task and have to wait for another day.
Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
The undo/redo operations are essentially the same as for
UR_CHANGED: we store both the origin marker item and a copy
of it and flip back and forth between the two. This also
required the implementation of clone() for the markers.
The ORIGIN_VIEWMARKER is moved from being a subclass of
EDA_ITEM to BOARD_ITEM to facilitate the use of a UR_CHANGE-
like implementation without having to know the internals
of the ORIGIN_VIEWMARKER.
In the command processors, the setting of the origins is
broken into two parts: one for UI-level access which includes
setting up undo, and one for low-level access which does not.
The undo/redo code itself of course uses the lower level.
Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018