Before Boost 1.64, there was no test logging function
for std::nullptr_t.
Add a logging struct to Boost to deal with this, and some
macros to assist in similar cases. These macros are bit
untidy-looking, but due to GCC bug #56480, we can't use
namespace aliasing to solve this. From Boost 1.64 onwards,
these namespaces are not needed at all.
Remove some code added to work around lack of nullptr printing
in the past.
These macros, and the nullptr printer, can be removed when
the Boost min version is 1.64 or greater.
(cherry picked from commit ad76ebd82a)
The extra field metadata is not really needed nor helpful as various
other additional licenses are used within the KiCad project.
All used licenses are documented with the file LICENSE.README within top
root folder of the source.
(cherry picked from commit e5de787f88)
Enforce the following format:
template<>
void function<TYPE>()
Rather than:
template<> void function<TYPE>()
This is the more common format in KiCad (about 8:1) and agrees
with the uncrustify.cfg rules.
(cherry picked from commit 3536840f52)
Tab through the grid vertically, then horizontally, as the fields
are laid out with "related" fields (like the co-ords) vertically.
Also neaten headers.
Fixes: lp:1821887
* https://bugs.launchpad.net/kicad/+bug/1821887
(cherry picked from commit d6b8e9e037)
Make a few things const (specficially the reference into
m_fieldStore - we should commit to not modifying that in this
function.
Also avoid a couple of needless string copies.
Also explicitly dereference the into a (non-const) reference at the outset.
For the whole if this function, comp is the same object and may not
be null (as it is used unchecked).
(cherry picked from commit edd94ce2d6)
For now fields created in Fields Editor are placed at
position (0, 0).
Every new field must be placed at the origin of
the parent component.
(cherry picked from commit 11f03c8551)
Introduced by 416e64a334. The code
appears to have been stepped on purpose but this would be incorrect for
most applications. There remains a good deal of cleanup in mathplot
available for the motivated dev.
Fixes: lp:1810311
* https://bugs.launchpad.net/kicad/+bug/1810311
(cherry picked from commit c1c4a0925d)
wxPlatformInfo::Get() causes a linker error on Msys2.
Fix this by making common link wx explicitly, rather
than implicity via it's dependencies, which cause
wrong-order linker command lines on windows.
(cherry picked from commit aef369f4af)
First, add automatic detection of toolkit DPI scaling options. For now, this
is, in order,
* Check the GDK_SCALE option under GTK+ (users can set this to force the scaling)
* Check the value from WX's GetContentScalingFactor(). This will start to work
correctly from WX 3.1 and GTK+ 3.10.
Then, add a user-settable override in the main prefs panel, next to the icon
scaling. This is independent of the icon scaling options.
DPI handling is performed in a standalone class, so they can be shared between
the prefs UI and the OpenGL backend easily. Also means Cairo could use the same
interface in future.
Also adjust the OpenGL grid drawing code to use the computed scale factor,
which avoids over-thick grids in scaled environments (the user can manually
thicken the grid if wanted).
Fixes: lp:1797308
* https://bugs.launchpad.net/kicad/+bug/1797308
Cherry-pick of: 567bdd9b9 (master)
Commit 6006703798 fixed a crash but broke the filled zones changes detection.
Filled zones were always seen as not up to date due to the fact the filled areas were cleared too early.
The up to date detection is also optimized: the old filled polygons are no longer stored.
Instead of, the MD5_HASH is calculated and stored before clearing the filled polygons.
Make the "Define as power symbol" checkbox tooltip more descriptive so
the user has a better understanding of enabling this option.
Fixes lp:1804932
https://bugs.launchpad.net/kicad/+bug/1804932
(cherry picked from commit a7c8df5666)
Autosave was not working correctly, partly due to different
implementations in eeschema and pcbnew and partly due to a mistaken
refactor at some point during v5 development. This unifies the expected
autosave prefix to _autosave- for both pcbnew and eeschema. It also
unifies the expected suffix for the backup files to -bak.
Fixes: lp:1820433
* https://bugs.launchpad.net/kicad/+bug/1820433
(cherry picked from commit 078320e2fb)
Call base object TransferDataFromWindow() to prevent Validate() from
being called twice. Validation is handled completely under the hood
so there is no need to call Validate() directly.
Fixes lp:1820301
https://bugs.launchpad.net/kicad/+bug/1820301
The bounding box calculation needs to be fast and is threaded in many
places in pcbnew. We cannot invalidate items (the function is const but
this wasn't caught at compile-time for some reason) when getting the
bbox. This shouldn't be an issue as the m_BezierPoints is rebuilt each
time the curve is updated, so rebuilding during the bbox seems extra.
Fixes: lp:1819984
* https://bugs.launchpad.net/kicad/+bug/1819984
(cherry picked from commit ec24981cc8)
Previously, refilling a zone after edition was made silently,
thus creating not understandable but very noticeable freeze time for complex zones.
(cherry picked from commit 3692c511d0)
Removing existing fills will prevent re-drawing invalid polygons before
they are ready. This seems to happen on Macs more easily due to redraw
timing.
Fixes: lp:1819553
* https://bugs.launchpad.net/kicad/+bug/1819553
(cherry picked from commit 6006703798)
We add LIB_ALIAS to the VIEW rtree when choosing a new symbol or
browsing. The actual display element may change based on the unit or
demorgan representation but there will only ever be a single one drawn.
This will set the view bbox to maximum to ensure it is always checked
for drawing.
Related to lp:1796960
https://bugs.launchpad.net/kicad/+bug/1796960
(cherry picked from commit d25d62295a)
This was due to the stub removal tests if a stub end is outside a solid area to remove it.
There is a corner case: is the stub end is exactly on a solid area outline extra segment
created by Fracture() used in calculations.
The stub removal tests are now made before fracturing.
Fixes: lp:1819317
https://bugs.launchpad.net/kicad/+bug/1819317
(cherry picked from commit b9944e2c06)