Commit Graph

5255 Commits

Author SHA1 Message Date
Jeff Young 2ea5528cd0 Start compiling identifiers.
We'll need this if we support the "L == foobar" syntax, and besides
it should really be up to the parser client whether or not they use
identifiers with no function call or property reference.

It also allows us to generate error messages for unknown identifers.
2020-07-27 19:53:42 +01:00
Jeff Young 8a010bc23e Null safety for expression variables. 2020-07-27 19:53:42 +01:00
jean-pierre charras 0103164571 Simulator: optimize a plot function, to support large amount of points.
Redundant points are not plotted.

Fixes #4737
https://gitlab.com/kicad/code/kicad/issues/4737
2020-07-27 10:47:52 +02:00
Mark Roszko 8324cb30b7 Save the wxDisplay index to set the position of windows correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4338
2020-07-27 02:53:56 +00:00
Mark Roszko 7bdb98f961 libedit: Make context menu follow context 2020-07-26 20:16:38 +00:00
jean-pierre charras ed79ef8feb PDF plotter: better handling of non ASCII7 (unicode 16) chars.
Note also the PS plotter handle poorly these non ASCII chars.

Fixes #4957
https://gitlab.com/kicad/code/kicad/issues/4957
2020-07-26 17:59:02 +02:00
Seth Hillbrand 6900f04ee0 Change Zone extra clearance magic number to AC
Rather than keeping a magic number in the code, we set the default in
the advanced config setting and allow users/developers to modify it.
2020-07-26 07:20:24 -07:00
Jeff Young 552dde8976 Fix return value going out of scope.
(From Coverity report.)
2020-07-26 13:41:43 +01:00
Simon Richter 95c2b261e8 Don't mandate ownership semantics in API
This API doesn't transfer ownership, so no smart pointers are required --
this just needlessly tightens requirements on the user of the interface.

(Fixes five instances of MSVC C26410 warning)
2020-07-26 02:45:27 +00:00
Jeff Young bf445c1a95 Performance enhancements.
1) cache pad polygon outlines
   huge improvement in connectivity performance and a decent
   improvement in DRC performance
2) don't pre-allocate CONTEXT stack
   significant improvement in DRC rule performance
2) don't keep re-encoding strings
   decent improvement in DRC rule performance
2020-07-25 13:03:33 +01:00
Jeff Young f97c50bfde Give excluded DRC items their own layer.
(And fix a bug with the new mulit-layer zones and rule-based keepouts
at the same time which prevented me from testing it.)

Fixes https://gitlab.com/kicad/code/kicad/issues/4954
2020-07-24 01:28:25 +01:00
Jeff Young 6529e339a9 Don't store context in the uCode. (It's not thread-safe.)
Although it does give some pretty funny results when filling zones.
2020-07-23 22:21:13 +01:00
Jeff Young f2812773d4 Better handling of undefined values in Rule expressions.
This is particularly important to keep the user from having to
enter overly verbose statements such as:
A.Type == 'via' && A.Via_Type == 'buried'
when:
A.Via_Type == 'buried'
is perfectly clear.
2020-07-23 16:41:58 +01:00
Jeff Young 84085df82a Fix tokenizer to allow '_' in tokens. 2020-07-23 16:41:58 +01:00
jean-pierre charras c254b331f3 Pcbnew: Activate pad fabrication property in pad properties dialog.
It was previously an option of advanced config since 6 months.
It is now not optional.
2020-07-23 14:33:24 +02:00
Jeff Young 86c9adbcba Add auto-completion for DRC rule function calls. 2020-07-22 21:28:02 +01:00
Jeff Young 637571e0be Assume mm if units not given in DRC rules.
This keeps us from internalizing them as nm which appear to have
no effect (at least visually).
2020-07-22 15:11:23 +01:00
Jeff Young 150c781f27 Fixup formatting and coding style. 2020-07-22 14:33:32 +01:00
Jeff Young a6b6084a60 Add preflighting for DRC rule function calls. 2020-07-22 14:33:32 +01:00
Ian McInerney 21e199f675 Allow all common settings panels to be reset 2020-07-22 00:18:30 +01:00
Ian McInerney 9997c46ee4 Make Coverity use the main KiCad version string
Also create a kicad_build_version.txt file in the build directory
that only contains the version string.
2020-07-22 00:18:29 +01:00
Fabien Corona a1437f4a95 Eeschema : Add A5 sheet size 2020-07-21 00:00:36 +00:00
Jon Evans a107f7ce5b Fix a few issues with legacy project loading
- Prevent crash on project tree for "Empty project" item
- Correctly handle loading of legacy projects in tree view
- Fix an issue where legacy projects would not get saved

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4944
2020-07-20 19:39:59 -04:00
Jeff Young 095937563b Hook libeval compiler up to rule parser
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
  board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
  don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
jean-pierre charras 6d8fb94d86 Fix a few Coverity warnings. 2020-07-20 16:19:19 +02:00
Mark Roszko 3b727b5d16 Make preference groups not selectable 2020-07-20 13:45:46 +00:00
Seth Hillbrand aa788b452e Adding Fabmaster extensions 2020-07-19 20:46:14 -07:00
Ian McInerney 50b2271f84 Fix missing variable initialization 2020-07-18 23:56:39 +01:00
Seth Hillbrand a253c53fe7 Fix buffer overflow in dumpNode
The formatted string buffer doesn't need to be used, so we bypass it
with string concat
2020-07-18 13:33:23 -07: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
Jeff Young bcb29b6bf8 Fix security issue (buffer overrun). 2020-07-18 11:44:12 +01:00
Jeff Young 49d242944d Don't treat new netclass as changing a netclass name.
In particular, since it goes from empty string to non-empty, the
oldName comparison will cause it to pick up all unassigned nets.

Fixes https://gitlab.com/kicad/code/kicad/issues/4922
2020-07-18 11:44:12 +01:00
Ian McInerney cc688a3e1d Initialize variables properly
Fixes https://gitlab.com/kicad/code/kicad/issues/4919
2020-07-18 00:36:47 +01:00
Urja Rannikko aa7ab46a06 GAL: Round the incoming mode parameter in fragment shader
This fixes some letters being randomly boxes and some circles
being randomly triangles on the Mali T760.
2020-07-17 20:24:18 +00:00
Urja Rannikko 65ceeebc71 GAL: Remove dead code regarding SHADER_LINE_B in the fragment shader
The only test for it was only called from a function
that's called if the mode is SHADER_LINE_A, not B.
2020-07-17 20:24:18 +00:00
Jeff Young 3fd0a3f842 Update text variables even when they're changed from other binary.
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
Jeff Young 33480ecad1 Show all symbol libraries by default.
Also fixes an issue where the plugin wasn't getting reset if the
library type was changed.
2020-07-17 18:33:14 +01:00
Jon Evans 5401f06fce Don't nag when we can't save project settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4164
2020-07-16 22:56:02 -04:00
Jeff Young 20ca836ab3 Use consistent naming for project manager. 2020-07-16 01:39:29 +01:00
Ian McInerney af729d578f Unify settings reset buttons into one location 2020-07-16 00:08:16 +01:00
Ian McInerney 4ee8ea1318 Initialize variable in hash computation 2020-07-15 22:58:05 +01:00
jean-pierre charras 9f20c61fa7 Remove creation on the fly of a wxPaintEvent instance (fix previous commit). 2020-07-15 14:56:35 +02:00
Jeff Young 7d07e6719f Make sure eeschema default grid is 50mils.
Fixes https://gitlab.com/kicad/code/kicad/issues/4835
2020-07-15 13:51:12 +01:00
jean-pierre charras 6366aa3ede Remove creation on the fly of a wxPaintEvent instance (final step).
This is not allowed in 3.1.4 wxWidgets.
2020-07-15 12:58:43 +02:00
Jeff Young e9da02e2d5 Only reserve hotkeys for focused textCtrls that are editabled.
Otherwise just send Ctrl-C to the disabled control, and everything
else to the tool framework.

Fixes https://gitlab.com/kicad/code/kicad/issues/4801
2020-07-14 13:30:43 +01:00
Jon Evans 97c360aa9b Fix saving of default netclass
This was broken as a side-effect of 3939b31
Default netclass doesn't get the "nets" member
but still needs to be added to the array of classes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4860
2020-07-13 19:53:03 -04:00
Jeff Young 940570e9ec Catch exception so that we at least throw up an error message.
Fixes https://gitlab.com/kicad/code/kicad/issues/4677
2020-07-13 22:41:56 +01:00
jean-pierre charras d34f8fd4b5 Prepare removing creation of a wxPaintEvent instance, not allowed in 3.1.4 wxWidgets 2020-07-13 19:53:07 +02:00
Jeff Young 1cd2a51db2 Make undo/redo lists protected. 2020-07-13 15:53:36 +01:00
Jeff Young 7340c97ef9 Undo for schematic-wide operations.
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.

Fixes https://gitlab.com/kicad/code/kicad/issues/2122

Fixes https://gitlab.com/kicad/code/kicad/issues/4869

Fixes https://gitlab.com/kicad/code/kicad/issues/3933

Fixes https://gitlab.com/kicad/code/kicad/issues/4871

Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00