Commit Graph

12 Commits

Author SHA1 Message Date
Tomasz Wlostowski 0d720fdeff eeschema-gal: factor out EDA_DRAW_PANEL from BITMAP_BASE, remove some unnecessary includes of class_drawpanel.h 2018-10-09 11:08:52 +01:00
Seth Hillbrand 539ca5aa3b Adjust RTree default floating point to use double
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.
2018-08-06 16:55:00 -07:00
Seth Hillbrand a1ef441dd9 origin viewitem needs to account for size zoom
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
2018-06-20 12:08:57 -07:00
Seth Hillbrand 7d62f14dd0 Set ViewBBox to viewitem size
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
2018-06-05 15:35:58 -07:00
jean-pierre charras ce02798533 Fix a minor compil warning. 2018-01-28 14:13:16 +01:00
Jeff Young 7a28f3d4cf Implement undo/redo for origins in legacy
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
2018-01-27 19:51:44 -05:00
Jeff Young 4784ee7fe4 Implement undo/redo for drill and grid origins.
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
2018-01-27 19:40:51 -05:00
Maciej Suminski e8345dce51 Display GRID_HELPER auxiliary axes and snap points 2017-08-07 08:59:32 +02:00
Tomasz Włostowski daf103d7e4 GAL: fix grid origin and grid rendering in flipped view mode 2016-12-12 16:45:52 +01:00
Tomasz Włostowski 1c1f4e9a50 Refactoring of VIEW/VIEW_ITEM classes:
- Remove dependency of EDA_ITEM on VIEW
- VIEW_ITEM is now a pure virtual interface
2016-12-12 16:45:52 +01:00
Brian Sidebotham 34aab6f687 Add axis origin to the Footprint Editor to align with the Legacy canvas 2015-09-05 20:47:35 +01:00
Maciej Suminski 28a270a328 Refactored grid origin point drawing (GAL). 2015-06-18 17:51:53 +02:00