For some reason, older WXs on Linux (e.g. Ubuntu 16.04) would
segfault on loading the 4-tile test image. Change one tile to
a circle to fix this (presumably an old and fixed image library
function).
The bitmap pointer is not checked at copy construct. This is
an instant segfault if you copy an empty bitmap.
Fix the constructor and remove the expected test failure, from the
previous commit.
By making the caller use the "namespace" keyword, the formatter
is given the right indentation hints.
Also makes it clearer synatactically. One day, this will be a
namespace alias (needs GCC 7).
This only applies to the root symbol when the datasheet field is not
empty and the datasheet for root symbol alias in the document file is
empty. Use the root symbol datasheet field value when adding a new
symbol that meets this criteria.
The root symbol datasheet field gets copied to the root symbol alias
datasheet member variable so if the symbol is modified and saved, the
datasheet information is saved in the .dcm file.
https://bugs.launchpad.net/kicad/+bug/1830078
Fixes lp:1830078
Use std::unique_ptr to guard against leaking the new'd pointers
in SEXPR lists if there is an exception during parse.
This was noticable during the Sexpr/ParseExceptions unit test.
Fixes: lp:1830209
* https://bugs.launchpad.net/kicad/+bug/1830209
This only applies to the root symbol when the datasheet field is not
empty and the datasheet for root symbol alias in the document file is
empty. Use the root symbol datasheet field value when adding a new
symbol that meets this criteria.
https://bugs.launchpad.net/kicad/+bug/1830083
Fixes lp:1830083
This adds a few tests on:
* LIB_PART
* SCH_PIN
* SCH_SHEET
* SCH_SHEET_PATH
These tests exercise some of the basic code paths in these classes
and show some of the expected behaviours.
None of these tests are particularly ground-breaking, but they
provide a starting point to build out further tests, and to ensure
the already-covered behaviour is stable.
It does expose some places where SCH_SHEET could probably use const.
This is done to allow access to the eeschema library
internals for purposes of test and script access, as the
DLL library has highly restrictive -fvisibility settings
that otherwise prevent the tests being able to access 99.9%
of the eeschema library functions (only a single function
is APIEXPORT'ed, therefore that's the only test we can do).
Using object libraries is a bit of a hack, and makes for
a slower link when done for multiple targets, but with the currently
supported CMake versions, it's about as good as we can get.
A better solution in the longer term may be to break eeschema_kiface(_objects)
into many smaller libraries, each of which has a much more defined scope,
rather than one big interlinked amorphous lump. This has the advantage that
each module is testable in isolation, and we get better organisation of
inter-dependencies in the codebase.
Then, the kiface DLL will gather these sub-libs and present what
is needed on the visible DLL API. Thus, we get both a testable
suite of library functions, and a restricted kiface DLL interface.
If you construct wxTimer statically, it will be constructed
before WX init, which means you might get assertions about
missing m_impl's within the timer class.
The solution is to construct the wxTimer at run time. In this
case, static within the function will be constructed only after
the function is called (and actually the scope only needed to be
this function anyway).
This corrects an issue with fill segments-per-circle and moves the error
to segmetns calculation down in a number of functions to expose the
single value for approximation
After importing Eagle files, we need to make sure that the connectivity
network is updated before the system requests a new netlist. Otherwise,
we end up with different results from the first to second updates.
The no-connect net (0) should never drive the net of a cluster.
Otherwise, tracks connecting between unconnected pads and connected pads
can acquire net 0 incorrectly.