Commit Graph

4745 Commits

Author SHA1 Message Date
Seth Hillbrand 49e3542662 Remove unused common defines 2020-01-06 05:55:06 -08:00
Seth Hillbrand 850ca98e7b Remove outdated RoundTo0
With internal units in 100nm, there are no rounding errors when
representing mm coordinates in eeschema.
2020-01-06 05:15:14 -08:00
Jon Evans 21d577e638 Implement Gerber job file writing using nlohmann/json 2020-01-04 10:46:50 -05: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 20e7fc8a0e Properly escape spaces when opening PDFs on windows
Fixes https://gitlab.com/kicad/code/kicad/issues/2625
2020-01-03 19:06:49 +00:00
Ian McInerney 2f75dfb09c Fix symbol editor column widths
102b5301 introduced an issue on GTK where the column width was
incorrect when read, then was set incorrectly (a known problem
on GTK tree views). We should only apply that fix on OSX.

Fixes https://gitlab.com/kicad/code/kicad/issues/3720
2020-01-03 17:04:18 +00:00
Ian McInerney 5d46e721e5 pcbnew: Cleanup includes of pcbnew_id.h
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Mark Roszko 49db816c82 Pcbnew: improve add existing footprint library browser and button
CHANGED: Modify Add Existing Footprint Library button to us OS file/directory browsers
2020-01-03 15:09:26 +00:00
jean-pierre charras baa1db031e Fix incorrect arc bounding box calculation.
add comments to SHAPE_ARC ctor.
2020-01-03 14:27:00 +01:00
jean-pierre charras 3543de039b More about code cleaning.
Remove useless includes and dead code
2019-12-31 13:08:50 +01:00
jean-pierre charras 2999bcb721 Try to fix SEG::PointCloserThan(), not working for quasi H or V segments.
Quasi H or V segments are segments having the same x value or y value
(with a + or -1 max diff) for end points coordinates.
The change is a workaround, not really a fix.

Fixes #3711
https://gitlab.com/kicad/code/kicad/issues/3711
2019-12-29 18:24:17 +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
Ian McInerney 6faa2188ed Silence warnings on MacOS about OpenGL deprecation
Apple has apparently deprecated OpenGL and replaced it with
their Metal API. It still works for now though.
2019-12-28 16:05:03 +00:00
jean-pierre charras d5b8e4928c Gerber P&P files: escape the double quote char inside user strings.
This is a reserved char, used to quote user strings
2019-12-28 13:27:31 +01:00
jean-pierre charras 7241247fbc Pcbnew: add missing storage of dimension units and dimension precision in pcb files.
https://gitlab.com/kicad/code/kicad/issues/3712
2019-12-28 13:27:31 +01:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Mark Roszko d4dee3c5a0 Inner loop iterator should be size_t as well 2019-12-26 13:10:18 +00:00
Mark Roszko a418242ca7 Prevent oob on LSET::FmtHex call when BITSET size is not a multiple of 4 (which it isn't usually) 2019-12-26 13:10:18 +00:00
Jon Evans 2ea565473f LSET: Prevent assertion in MSW when size is not a multiple of 4 2019-12-25 11:34:12 -05:00
jean-pierre charras 60dd1cd5c7 Gerber files: update unicode coding to the 2019 06 Gerber specifications.
In gbr files, not allowed chars are coded using a 16 bit (4 hexa digits) unicode sequence.
Previously, it was \XXXX and now is \uXXXX escape sequence.
2019-12-21 11:15:57 +01:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Ian McInerney b9d8849b28 Unify unsaved changes detection logic in all frames
Create an IsContentModified() function in each frame
that provides if the content has been modified, and
use that instead of always copying the checks.
2019-12-19 15:34:01 +00:00
Mark Roszko 686b768a3d Add shutdown blocking on Windows for pcbnew, eeschema and pleditor
ADDED: Block shutdown/logoff on Windows when contents have been modified
2019-12-19 14:11:11 +00:00
Jonatan Liljedahl 1e42d6abeb symbol-editor: Fix MacOS segfault in lib_tree_model_adapter
In LIB_TREE_MODEL_ADAPTER::UpdateSearchString(), don't call
AttachTo() on MacOS.

Fixes https://gitlab.com/kicad/code/kicad/issues/3653 and
https://gitlab.com/kicad/code/kicad/issues/3666
2019-12-19 14:01:35 +00:00
Ian McInerney 3370e89967 Update Linux appdata file and CMake version strings
CHANGED: Update the Linux appdata file to include new tags

* Include version tags (and others) in the appdata file
* Refactor the version string generation to clean it up
2019-12-18 17:24:07 +00:00
jean-pierre charras 24cd80ef3e Gerber plotter: modify G02 and G03 commands.
They are now in a specific block and no longer combined with an other command.
(combining these commands with an other command (D01 or D02) is deprecated)

Fixes #3677 | https://gitlab.com/kicad/code/kicad/issues/3677
2019-12-18 11:35:28 +01:00
Ian McInerney c31c99abd1 Update about dialog link to GitLab
Fixes #3687
2019-12-17 20:17:03 +00:00
Ian McInerney 0259e0ba07 Cleanup struct initialization and formatting 2019-12-17 16:09:32 +00:00
Ian McInerney 18dbe51d66 Remove WINCE check
We don't actually support Win CE
2019-12-17 15:38:38 +00:00
Mark Roszko bf32122134 common: Remove out of bounds and erroenous array access 2019-12-17 14:10:52 +00:00
Jeff Young 1f07505b27 Fix long-standing issue with arrow keys moving in both axes. 2019-12-15 14:29:47 +00:00
Wayne Stambaugh 1abb198fb4 Minor UI improvement.
Use wxMessageDialog instead of wxRichMessageDialog in DisplayErrorMessage
so the platform specific message dialog is used.  wxRichMessageDialog
looks different than the stock message dialog on every platform so only
use it when a checkbox is required.
2019-12-14 12:29:38 -05:00
Mark Roszko ae785194ce Silence/fix double to float conversion warnings 2019-12-12 21:51:21 +00:00
Seth Hillbrand eb3d32f967 SHAPE_LINE_CHAIN: Unify constructors
Keeps the multi element SHAPE_LINE_CHAIN constructors in a single
routine using std::vector and implicit construction.
2019-12-12 13:54:48 +00:00
Seth Hillbrand c4d853c1e8 SHAPE_LINE_CHAIN: Remove element access
This is the first step to allowing non-segments in the line chain.
External routines cannot be allowed to change the line chain without
going through the internal routines.  To accomplish this, we remove the
Vertex() and Point() access routines and only leave the const versions.
Transformations are given for both points as well as the chain itself.
2019-12-12 13:54:48 +00:00
Seth Hillbrand 7d6665c313 Simplify to merge sequential, parallel segments
The Simplify() routine can take multiple segments that are in a single
line and merge them into a single segment, reducing the line complexity.
2019-12-12 13:54:48 +00:00
Ian McInerney 179f31d377 Add a minimum size to the part column in the lib trees
When the column has 0 width, it becomes hidden and users don't
know where it went or how to get it back.

Fixes https://gitlab.com/kicad/code/kicad/issues/3656
2019-12-10 23:26:07 +00:00
Seth Hillbrand fa133f3f5c Plot SVG embedded
ADDED: embedded image support for SVG files

Fixes #3643 | https://gitlab.com/kicad/code/kicad/issues/3643
2019-12-08 08:57:33 -08: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 4f4bb96f2b Suppress false warning of uninit var 2019-12-06 06:27:47 -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
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 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
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