Commit Graph

17316 Commits

Author SHA1 Message Date
Seth Hillbrand b6b805548d PNS: Allow snap to temp hidden
The IFACE for kicad refers to the board hidden state, not the
temporarily hidden state used by the router.  We allow snapping to items
that have been removed by the temporary router state to provide snapping
to original track location.

Fixes #1827 | https://gitlab.com/kicad/code/kicad/issues/1827

(cherry picked from commit 1e64524afb)
2019-12-07 09:51:02 -08:00
Jonatan Liljedahl 034bfb0919 eeschema: More work on selection highlight thickness
Bring back old zoom-level factor scaling constant and
change selection width to absolute unit instead of
floating point multiplier.
2019-12-07 09:33:32 +00:00
Jonatan Liljedahl 681f6bc707 Eeschema: Add option for selection highlight thickness
ADDED new option to set selection highlight thickness.
Also change selection shadow width constants to
make the selection thickness change less drastically
with the zoom level.
2019-12-07 09:33:32 +00:00
Jean-Pierre Charras 97b0b20a65 Fix properties dialog bug in symbol library editor.
Remove unused panel rather than calling Hide() method which draws the
hidden page as a background of the shown page.
2019-12-06 11:33:52 -05:00
Wayne Stambaugh 9fe2c4b21f Fix a few more symbol library inheritance bugs.
Replace some C casts with C++ dynamic_cast.

Fix iterator bug when deleting inherited symbols from legacy file format
symbol library cache.

Remove unnecessary const when return wxString object instead of reference.
2019-12-06 11:33:52 -05:00
Wayne Stambaugh 8e150521a2 Fix a few minor symbol library inheritance bugs.
Don't clobber value file when load aliases in legacy symbol library cache
parser.

Use actual symbol library LIB_PART pointer rather than a flattened copy
of the symbol.  This fixed a bug when displaying the parent field in the
message panel for derived symbols.

Simplify the flatten code by copying the parent and updating the lesser
information from the inherited symbol.
2019-12-06 11:33:52 -05:00
Wayne Stambaugh 54f066fed7 Implement simple inheritance for library symbols.
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support.  Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added.  The LIB_ALIAS information saved
in the document files was move into the LIB_PART object.  This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.

REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.

NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
2019-12-06 11:33:52 -05:00
Seth Hillbrand 9f896312ee Add missing include 2019-12-06 06:47:03 -08:00
Seth Hillbrand 4f4bb96f2b Suppress false warning of uninit var 2019-12-06 06:27:47 -08:00
Seth Hillbrand 4aa9552f1f Adding missing include 2019-12-06 06:26:59 -08:00
Seth Hillbrand df75167e14 Fix ordering warning and init error for clang
The glyphs and bb pointers were reversed.
2019-12-06 04:33:50 -08:00
Fabien Corona 36fba5bd7f PCBnew: placing a blind/buried via sometimes incorrectly place a through via.
Fixes #1819
https://gitlab.com/kicad/code/kicad/issues/1819
2019-12-06 13:11:33 +01:00
jean-pierre charras ad32c0e5e4 Kicad, tree project: refinement in multiple selection.
When editing files, the editor is called once to open multiple files.
2019-12-06 10:16:08 +01:00
Mikolaj Wielgus 350a991f26 Allow multiple selections in Kicad project manager (starting point) 2019-12-06 09:10:20 +01:00
jean-pierre charras 52db6acb86 Fix a compil issue on Windows.
A wxString was defined as const, but on Windows it is modified.
2019-12-06 08:40:58 +01:00
Seth Hillbrand ac92afcf13 Clean up compile warnings
Ratsnest did not need a reserve and then iterative emplace.  Instead, we
use resize().  Stroke font gets private vars initialized and kiway
variables that are only used in debug builds are properly scoped for
releases as well
2019-12-05 20:05:21 -08:00
Seth Hillbrand f5793c5984 Adding default clang-tidy parameters 2019-12-05 19:48:50 -08:00
Seth Hillbrand 6983c56cf8 Use const references where possible
This avoids copy cost on local vars where we only read.
2019-12-05 14:40:22 -08:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08: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 6f8b399c5f Replace unused resize() call
Calling resize(size()) will only zero out elements that exist above the
vector size().  The memory is not freed in this case.  shrink_to_fit()
will accomplish this action (at the discretion of the library)
2019-12-05 13:21:48 -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
Seth Hillbrand a2edf9c442 Unified update to C++14 std::make_unique
This update replaces the existing uses of unique pointer creation with
the C++14 std::make_unique call that provides proper memory release in
event of an exception.
2019-12-05 10:43:55 -08:00
John Beard 4dc82ff76f Technical TODO: make_unique is no longer polyfilled
Since we use C++14, std::make_unique required no "polyfill".

The KiCad polyfill was removed in
5151cd0bfe,
so remove the TODO item.
2019-12-05 18:25:15 +01: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
Eeli Kaikkonen f1ef036400 Removed old and outdated TODO.txt. 2019-12-05 10:00:13 +00:00
Seth Hillbrand 65ef8c1894 StrokeFont: Reserve rather than resize
Minor speedup by not double-initializing the stroke font vector.
2019-12-04 16:36:06 -08:00
Ian McInerney 4ebb591a5c Allow the formatting test to fail
By allowing to to fail, we won't block the rest
of the CI tests, and also won't block the merge.
2019-12-04 20:10:23 +00:00
jean-pierre charras 4a75cc586c Zone filler: do not create stubs in thermal reliefs when not possible.
pad size is sometimes smaller than the zone minimal width.
So, to avoid strange and incorrect results, do not create the stubs in
thermal relief when the pad size is smaller than the zone minimal width.
2019-12-04 13:23:09 +01:00
Ian McInerney f0c386f5dd Update GitLab CI script
Changes SHA detection to find the start of the MR and makes check_coding return non-zero when formatting changes needed
2019-12-03 18:51:59 +00:00
Jeff Young 581dc81358 Performance optimizations for the stroke font. 2019-12-03 17:45:26 +00:00
Ian McInerney edf23dc5a9 Fix GitLab CI format hook
The variable CI_COMMIT_BEFORE_SHA is not available in
normal merge requests
2019-12-03 15:28:30 +00:00
Ian McInerney 7433d252bb Merge branch 'eelik-master-patch-06344' into 'master'
Changed .wings to .step (the former isn't supported anymore, STEP is the official format)

See merge request kicad/code/kicad!2
2019-12-03 12:07:07 +00:00
Eeli Kaikkonen 4739f33ca2 Changed .wings to .step (the former isn't supported anymore, STEP is the official format) 2019-12-03 12:07:07 +00:00
Jeff Young 089ce90de3 Fix some issues with the previous commit. 2019-12-02 23:35:19 +00:00
Jeff Young 9b36489270 Make sure that libraries are always sorted consistently.
Fixes #1847481 | https://gitlab.com/kicad/code/kicad/issues/1847481
2019-12-02 21:52:50 +00:00
Jeff Young d4816d843d Check /all/ libraries when toggling the Save All toolbar button. 2019-12-02 20:48:22 +00:00
Wayne Stambaugh ea62b19b58 Merge branch 'update-compiling-md' into 'master'
Update compiling.md for GitLab

See merge request kicad/code/kicad!1
2019-12-02 20:20:05 +00:00
Jon Evans 95f703aac0 Update compiling.md for GitLab 2019-12-02 20:20:05 +00:00
Jeff Young a9da0c6ecf Update local coords when editing EDGE_MODULEs.
Fixes: lp:1853726
* https://bugs.launchpad.net/kicad/+bug/1853726
2019-12-02 20:01:44 +00:00
Jeff Young 3af3bf894c Make sure the IS_MOVED flag gets set when breaking out of a bus.
This (among other things) causes an update-preview event to be sent
when modifying it (such as rotating).

Fixes: lp:1854456
* https://bugs.launchpad.net/kicad/+bug/1854456
2019-12-02 20:01:44 +00:00
jean-pierre charras 5cd7f3fdee DIALOG_DRC_CONTROL: fix a crash on wxWidgets 3.1.3, Windows,
Happens when right clicking on an item in displayed lists.
The crash was due to a bug in wxWidgets, and the fix is only a workaround

Also remove duplicate code.
2019-12-02 11:27:40 +01:00
Maciej Suminski 2a3d4ffe88 Update 'git fixes' alias and the documentation to point to Gitlab 2019-12-01 11:01:56 +01:00
Ian McInerney 07c6cfdc38 Add Ian to AUTHORS.txt 2019-11-30 19:52:32 +00:00
jean-pierre charras 4bf7ca49b8 Commit test 2019-11-30 20:21:17 +01:00
Jon Evans 0857a1f5dc Update contributors link to GitLab 2019-11-30 09:59:09 -05:00
Seth Hillbrand d20d310fcc Fix compile error on Linux
The wxArrayString doesn't have a standard assignment operator to
std::vector<wxString> so we iterate over the members.

Fixes: lp:1854562
* https://bugs.launchpad.net/kicad/+bug/1854562
2019-11-30 05:24:35 -08:00
Seth Hillbrand 2ce7d9a708 Adding merge CI
Adds GitLab merge CI for code formatting.
2019-11-29 21:55:36 -08:00
Jon Evans d5140d87cd Fix indentation in previous commit 2019-11-29 21:22:56 -05:00
Jon Evans 8b87dc7e0f A slightly better ERC check for hierarchical labels
Fixes: lp:1839822
* https://bugs.launchpad.net/kicad/+bug/1839822
2019-11-29 21:11:44 -05:00