This inserts a translation map in the layer names so that the old stable
files with Italian/French layer names get updated to the standard
English layer names (instead of not opening).
Fixes: lp:1370575
* https://bugs.launchpad.net/kicad/+bug/1370575
(cherry picked from commit 6f4d1345f3)
This is only for the current GerbView session. When GerbView is closed,
the last open gerber file dialog wildcard setting is lost.
(cherry picked from commit f20a1314ff)
They don't really help any, and they confuse some users into
thinking they need angle brackets around real values.
Fixes: lp:1821601
* https://bugs.launchpad.net/kicad/+bug/1821601
Save/restore default netclass.
Read layers back in with correct syntax ('.' between keyword and layer name).
Write layers to project file.
Read/write layer enablement bits.
Don't set solder paste margin min to 0 (most of them are negative).
Fixes: lp:1811990
* https://bugs.launchpad.net/kicad/+bug/1811990
The keeps all the formatting config together in the Git ecosystem
and keeps the config on a per-repo basis, unless the user explicitly
sets it --global.
Keep the old env var behaviour for now for backwards compatibility.
(cherry picked from commit a7270f8c1c)
Add a .gitattributes files to provide a place to store file
attributes. Add a custom attribute for files that should be under
KiCad style guidelines.
Exclude generated files from the style enforcement. So far:
* bitmap .cpp files
* wxFormBuilder base classes
* Lemon grammars
It's now trivial to add the 'generated' attribute to any such
file.
Putting this into .gitattributes also means it can be retreived
programmatically, by other scripts, git alaises or on the command
line.
Use the attributes to provide a utility script to show or apply
formatting to controlled files (plain git clang-format won't
pick up our custom git attributes). Add details for the script in
the dev docs.
Also modiify the check-format hook to follow the .gitattributes
and only apply to cached (staged for commit) changes. Then you
won't be stopped committing because of bad formatting in unstaged
changed, or uncontrolled files.
Concept and some aspects of the implementation inspired by
CMake commit d5f39a56 [1].
[1]: d5f39a56a4
tool
(cherry picked from commit a69cdf1793)
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