When switching schematics that causes an error message (for example if
the schematic needs repair), wx can refresh in between view updates,
leading to a null preview.
Testing reveals 25000 is absolute overkill. A 4mil trace at 2000 is already an entire GAL canvas on 1080p.
Eeschema already uses its own setting of 1000 max.
This uncovered a memory corruption bug in MODULE's move operator,
several bugs in MODULE's move and copy constructors, and a bug in
BOARD's GetItem() call.
It also bumps the file format for saving/restoring groups inside
footprints.
CHANGED: GetDocumentExtents() in 'eda_draw_frame.h' now has a bool
parameter "aIncludeAllVisible" with a default value "true" which makes
it behave as it did before adding parameter. If "aIncludeAllVisible"
is false, the returned bbox ignores some items depending on which
program it is running in.
CHANGED: Made "Zoom to Objects" use only PCB edge in Pcbnew. This
allows text, notes, etc outside the PCB edge to be excluded in the
zoom calculation.
CHANGED: Added "Zoom to Objects" to Pcbnew main menu, and to RMB context
menus for Eeschema and Pcbnew.
Fixes https://gitlab.com/kicad/code/kicad/issues/5787
CHANGED: The margin used in 'Zoom to Fit' is now 2% instead of 10%.
ADDED: Added 'Zoom to Objects' to Eeschema which does not include
the page and border in the bbox calculations.
CHANGED: Removed pre-existing code that tweaked the center to account
for the scrollbars. It actually made the view off center. Removing it
results in perfectly centered zooms.
Fixes https://gitlab.com/kicad/code/kicad/issues/5145
When at small zoom levels, the integer bbox can overflow, preventing
redraw. We fix this by redrawing the full tree when this happens
Fixes: lp:1733067
* https://bugs.launchpad.net/kicad/+bug/1733067
This parameter defines the working area (full page) size.
The fix is not perfect, because it does not take in account the page size.
However it is similar to the "old" initialization, before Eeschema GAL.
In Eeschema, a reasonable boundary size is used.
Display GALs had an incorrect world unit value set. Now the world unit
value says how many internal units are in an inch, in accord with the comments
in the GAL header. Bitmap drawing code relied on the information about DPI,
so scaling worked differently for display and print GALs.
Fixes a crash when typing fast in the place footprint filter box.
Also adds a bunch more checking to GAL locking, including making
sure the same person unlocks as locked, and preventing piece-meal
calls (the RAII objects must be used).
When querying the view, we do not want to including items that are not
on layers that are currently visible. This routine is currently only
used by the selection tool (pcbnew and gerbview) and the grid helper.
Both expected this logic but were indifferent to the additional items.
Fixes: lp:1796403
* https://bugs.launchpad.net/kicad/+bug/1796403
This fixes some warnings on GCC 8.1:
warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
catch( std::out_of_range )
^~~~~~~~~~~~
This fix is along the same lines as:
* ff1802d7a "Fix Coverity "Big parameter passed by value" warnings"
We limit the minimum zoom to Z=0.3. Minimum preset zoom level is 0.31,
so 0.3 is only reachable using the mouse wheel. Smaller than 0.18, GAL
does not display properly.
Fixes: lp:1773215
* https://bugs.launchpad.net/kicad/+bug/1773215
Since we are going to inspect every item for these calls, we don't
need to use the RTREE search, which is expensive with high item count.
This results in ~50% improvement in layer switching time in GerbView
when working with a set of large Gerber files.
Call UseDrawPriority( true ) after creating GAL to enable.
VIEW::Add() gets a new optional argument to specify the draw order
when adding an item. If the new argument is left default, the draw
order will increment with each call of VIEW::Add().
Fix std::bind calls after change to VIEW::Add
The problem with simple deleting VIEW_ITEM_DATA upon VIEW_ITEM removal was
caused by the default copy constructors that copied pointers.
Once a copy of an item was destroyed, the VIEW_ITEM_DATA has been
destroyed, effectively invalidating m_viewPrivData for the other item.
- Finalize transition to BOARD_COMMIT (removed all remaining uses of PICKED_ITEMS_LIST) and implicit view/ratsnest updates
- Simplified SELECTION class, it now can be directly added to a VIEW
- Removed unnecesary casts and templates
- Introduced C++11 features (range based for, lambdas) where they improve code readability
- Added non-undoable COMMITs, which can be used to propagate change notifications to interested listeners (e.g. ratsnest/view)
The standard library requires iterators passed to functions that modify the
container to be mutable iterators, but GCC's implementation accepts
const_iterator in some places where these are only used to mark a place,
but the actual modification happens through a different parameter.
As this breaks implementations that use the passed iterator to modify the
container (e.g. because they use a different data organization), this is
not portable; because we already have a non-const reference to the
container anyway, this is trivially fixed as well.
- resetting relative coordinates
- switching units
- not official: changing transparency for layers (works only for main layers, does not work on vias/pads/etc.)
TOOL_EVENT message is supposed to contain string as parameter.
Added missing header for class_drawsegment.h (KiROUND).
Renamed SELECTION_TOOL::containsSelected() to SELECTION_TOOL::selectionContains().
- VIEW_ITEM::ViewUpdate() does not update items immediately. Now it marks them to be updated and the real update occurs on the next rendering frame.
- VIEW::InvalidateItem() made private.
- VIEW_LAYER::enabled -> visible
- Some functions moved to header files.
Added REASON enum for Reset() function, so tools will know why a reset occured.
Fixed SELECTION_TOOL (it was bailing out, when a new board was loaded and some items were still selected).
Added removal of VIEW_ITEM groups after changing layers and removing items.