Commit Graph

115 Commits

Author SHA1 Message Date
Jeff Young 13473420e5 Remove duplicated routine and fix bug in UTIL version. 2021-04-17 15:10:59 +01:00
Thomas Pointhuber d9229697d8 altium: special string override map should be case-insensitive
This only fixes overrides where we explicitly map an override. Wrongly written variables pointing to fields are not corrected by this.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6256
2021-03-20 20:42:25 +01:00
Thomas Pointhuber cd26db24f9 altium: allow text in special strings
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6256#note_529783269
2021-03-20 19:25:57 +01:00
Thomas Pointhuber 4482b3baba altium: Handle special strings and convert them into KiCad variables. Use Comment for VALUE.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6256
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7736
2021-03-14 16:40:36 +01:00
Thomas Pointhuber 7ef9082c86 altium: add unit-tests for ReadProperties() and fix some issues found while doing so 2021-03-08 23:03:00 +01:00
Marek Roszko 872184fe8b Revert "Bump minimum required CMake version to 3.10"
This reverts commit a475f45753.
2021-02-09 18:46:13 -05:00
Simon Richter a475f45753 Bump minimum required CMake version to 3.10
This allows us to remove even more workarounds
2021-02-08 12:23:08 +00:00
Thomas Pointhuber e5ea94c90b altium: add testcase for PropertiesReadKiCadUnitFrac 2021-02-04 20:16:34 +01:00
Thomas Pointhuber db3b79a046 altium: Fix #6462 improve parsing of metric units
Because Altium uses imperial units for storage, this leads to rounding errors.
This code tries to correct those rounding errors for the user.
2021-01-31 16:18:57 +01:00
Thomas Pointhuber 9ddfd82b91 altium: Fix #6242 by increasing clamp limit for unit conversation. Furthermore fix error which happens when parsing negative units. 2021-01-31 13:59:51 +01:00
Jeff Young 8633410bec Fix some missed renaming in qa suite. 2020-11-28 12:30:26 +00:00
Marek Roszko 1167862c86 Split wx_filename out of common 2020-10-25 20:01:13 -04:00
Mikolaj Wielgus d9fd6e549b Remove "useMils" variable from numeric evaluator 2020-10-03 20:06:56 +00:00
Ian McInerney 268dec5c19 Cleanup some build and Coverity warnings 2020-07-31 02:46:05 +01:00
Ian McInerney 7b705af038 Refactor common QA components to create a single common library
This moves the program-specific code (e.g. BIU files) into
the program tests.

Also, create title_block.cpp to break a dependency that pulled
in eda_text.cpp when using the TITLE_BLOCK object.
2020-07-18 16:21:15 +01:00
Ian McInerney 019313711a Move geometry tests into the kimath qa test 2020-07-18 16:19:01 +01:00
Jeff Young d1da053d2e Update test to prettier file extension wildcard syntax. 2020-07-17 21:22:28 +01:00
Tomasz Wlostowski bff209b07c qa: disable single test in PROPERTY test suite due to boost incompatibility 2020-07-05 22:44:38 +02:00
Maciej Suminski f084a86601 Properties replacement method
Adds a possibility to replace properties inherited from base types with
a more specific ones. For example, such properties may have:

- different meaning which should be reflected in property name
  (e.g. TRACK::{G,S}etWidth() sets actual track width, but
  VIA::{G,S}etWidth() modifies the diameter)

- different set of possible values (e.g. BOARD_CONNECTED_ITEM::SetLayer()
  should accept any copper layer, but MODULE::SetLayer() works only with
  F.Cu and B.Cu)
2020-07-05 22:44:38 +02:00
Maciej Suminski cbd5004fd4 Properties (introspection)
Introduces classes:
- INSPECTED: base class for types taking advantage of
  generic properties system.
- PROPERTY*: meta-data storing information about properties
- PROPERTY_MANAGER: singleton class to get properties data
2020-07-05 22:44:38 +02:00
Jeff Young eb1ff80d57 SHAPE collision fixes.
1) An actual distance of 0 is still a collision, even if the allowed
distance is 0.
2) Be consitent about edges and interiors.  Everyone expect the edge
of a RECT to be part of the RECT; same with a CIRCLE.  SHAPE_POLY_SET
shouldn't be any different.  (And SHAPE_LINE_CHAIN was a split-
personality with the edge considered part of it for Collide() but not
for PointInside()).
2020-07-02 21:38:37 +01:00
Jon Evans e91b9f6dfb Rip out the unused leftovers of the old color system 2020-06-18 22:32:14 -04:00
Seth Hillbrand a8ab668122 Move SHAPE_ARC to start->mid->end format
The arc shapes need to connect with their adjacent points.  By storing
the relevant points, we allow exact point matching on both ends of the
arc as well as localize point storage.
2020-06-13 11:23:14 -07:00
Jon Evans a52435bbb0 ADDED: New mouse settings panel, expanded mouse settings
You can now choose the behavior of dragging with the
middle and right mouse buttons.

You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.

You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.

You can also now zoom by dragging with the right or
middle button if desired.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
2020-05-24 14:38:28 -04:00
Jeff Young d17664c519 Fix bug in testcase. 2020-05-01 18:49:42 +01:00
Jeff Young dfe4a00d43 Add distance reporting for copper item DRC tests.
Also adds some performance improvements.
2020-05-01 18:49:42 +01:00
Wayne Stambaugh abb8088695 Fix QA test failure due to changes to FormatInternalUnits() function. 2020-03-03 08:06:23 -05:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Ian McInerney 06c979dfaa Convert all CMake paths to absolute instead of relative
It is cleaner and safer to handle the include and source paths
as absolute from the source directory instead of relative to every
path.
2020-01-22 23:27:20 +00:00
Seth Hillbrand ce5c63b368 Fix bitmap unit test
This was testing for bitmap dots per IU.  But IU changed, so we needed
to adjust how the bitmaps were scaled.  This brings the QA up to date.
2020-01-11 07:30:17 -08:00
jean-pierre charras 5707e6eac8 Fix QA arc test according to the new arc bounding box calculation.
Previously, the arc center was included in the bounding box,
but this is incorrect.
In many cases it is not in the bbox, and can be very far away.
2020-01-04 10:16:30 +01:00
Ian McInerney 5c0656d97f Move potrace and libcontext into thirdparty directory
Part of the cleanup in #3637
2019-12-28 18:17:55 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
John Beard 1b124832fe QA: Remove deprecated boost headers
The test_case_template.hpp header is deprecated in Boost, and the
latest Boost version is now throwing warnings during the build.

In Boost 1.59 (at least), this header is included transitively by the main
Boost test header, so this header is not needed by any supported Boost
version.
2019-12-05 18:19:40 +01:00
Ian McInerney b33c3a5ad8 pcbnew: Clean up extension handling in graphics plugins
* Fix wildcard display in the file selector dialog (on GTK
  it would show the regex to the user)
* Move the file extension comparison into a common function
2019-10-04 15:43:29 -04:00
Jeff Young a6b7d4f7f6 Support 9 comments in the page setting GUI.
Fixes: lp:1793148
* https://bugs.launchpad.net/kicad/+bug/1793148
2019-08-21 20:34:01 +01:00
Seth Hillbrand 5151cd0bfe C++14: Remove unused make_unique.h
Also removes header references now that we are in C++14, this is
built-in to the std
2019-08-07 09:27:31 -07:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
John Beard 7ebda0247f Common: Remove legacy_gal library, fold into common
Return the EDA_DRAW_FRAME class back to common, whence it came (before it was
duplicated into legacy_wx and legacy_gal). Now there is only one
implementation (the GAL one), it doesn't need to be in a separate library.

This simplifies the dependencies for common lib users.
2019-06-10 18:56:57 +01:00
John Beard 2ec4ceffbd Reinstate "QA: Tweak boost print helper macro""
This reverts commit 3afea91088.

This was actually not the issue, even though it seemed to trigger the
issue.
2019-05-24 13:23:51 +01:00
John Beard a88ac393bb QA: Remove helper function
The InOutString function is not really useful, in most cases it can
be done more simple with string operator+. This function is causing
issues on MSVC (perhaps the template param names) anyway.
2019-05-24 13:23:51 +01:00
John Beard 3afea91088 Revert "QA: Tweak boost print helper macro"
This reverts commit 593b7cd6a1.

This causes breakage on MSVC. I am not sure sure why, but
this is not that important, so just back it out.
2019-05-23 23:31:03 +01:00
John Beard 2c55091a74 QA: Adjust bitmap test bitmap
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).
2019-05-23 18:59:20 +01:00
John Beard 2dd5757eb5 Common: Fix copy-construction of empty BITMAP_BASE
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.
2019-05-23 16:58:08 +01:00
John Beard d642ac39ae Common: Bitmap base: catch copy segfault
Copying an empty image is not checked for nullity,
so it will segfault. Introduce a test for this case,
for fixing as a follow-up.
2019-05-23 16:58:08 +01:00
John Beard 94b46ce176 QA common: add some BITMAP_BASE tests
Also:

* Init wx image handlers for qa_common
* Break out COLOR4D test predicates
* Fix some bitmap_base.h headers/forwards
2019-05-23 15:19:51 +01:00
John Beard 593b7cd6a1 QA: Tweak boost print helper macro
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).
2019-05-23 14:37:35 +01:00
John Beard 0eb8f92c69 Pcbnew: add a step field to the array tool
This is useful, for example, when arraying only one side
of a connector.

Fixes: lp:1809580
* https://bugs.launchpad.net/kicad/+bug/1809580
2019-05-16 11:20:52 +01:00