Tomasz Wlostowski
64766d9754
common: build Lemon grammar for libeval_compiler only when Lemon is installed
2020-07-30 02:13:19 +02:00
Tomasz Wlostowski
fe4695719d
libeval_compiler: post-rebase fixes
2020-07-29 23:14:34 +02:00
Tomasz Wlostowski
3c80b98d1c
libeval_compiler: CONTEXT runs the UCODE now (thread-safe solution), fixed some memory leaks
2020-07-29 23:14:03 +02:00
Tomasz Wlostowski
7dbd8ef802
EDA_TEXT: implement GetEffectiveShape()
2020-07-29 23:14:03 +02:00
Tomasz Wlostowski
abe6ccf97e
common: re-enable libeval_compiler and DRC proto test (fixed missing file issues)
2020-07-29 23:14:03 +02:00
jean-pierre charras
98b1f55e29
Eeschema: minor fixes: fix incorrect label in DIALOG_LIB_EDIT_PIN, electrical pin list.
...
Gives also to functions GetText() and GetBitmap() a more significant name.
Fixes #5007
https://gitlab.com/kicad/code/kicad/issues/5007
2020-07-29 17:04:52 +02:00
Jeff Young
9f6098321f
Cleanup of extraneous calls for string conversion.
...
We're already in wx-land, so we don't need the GetData() calls.
2020-07-28 20:44:40 +01:00
PJM
a1b79298a4
GerbView #2124 : Alternative drill file extension .txt
...
'.txt' is a common file extension for drill files. This Merge
Request adds it to the list of extensions used in the File Open dialog
for Excellon Drill files.
Fixes issue https://gitlab.com/kicad/code/kicad/-/issues/2124
2020-07-28 04:59:50 +00:00
Jeff Young
b74e125264
Read/write schematic netclass properties.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4990
2020-07-27 23:10:46 +01:00
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
Seth Hillbrand
9f09c3872f
Ensure file reads always use the C-locale variant
...
Str2Double assumes current locale. We usually switch the locale when
reading files but we should be using the function that explicitly gets
the C-locale conversion.
2020-07-12 20:03:50 -07:00
Jon Evans
a94a81b9a8
GAL: Handle text opacity in OpenGL
...
Vertex alpha was being dropped in the font shader
2020-07-12 11:16:28 -04:00
Jon Evans
5d118b0700
More visibility settings infrastructure
...
ADDED: Three-state high contrast mode action
ADDED: Save contrast mode in local settings
Also some initial infrastructure for layer presets
2020-07-11 21:59:07 -04:00
Wayne Stambaugh
abcbfaa481
Fix ngspice version information issue.
...
The config.h header for ngspice is not packaged with all platforms so
use pkg-config to fetch the version information when available. When
pkg-config is not available, check if the ngspice/config.h file is
installed on the system before including it to build the ngspice version
string. If neither pkg-config or ngspice/config.h is available set the
version string to "unknown".
Fixes https://gitlab.com/kicad/code/kicad/issues/4851
2020-07-11 19:07:10 -04:00
Wayne Stambaugh
e254d8cd29
Fix about dialog padding on GTK builds.
...
As expected, the required padding difference between wxStaticText and
wxHyperlinkCtrl varies depending on the platform. Restore the original
padding which was correct for windows and add the extra padding required
for GTK builds. Someone with MacOS should verify if the padding looks
correct and change the padding for MacOS as required.
2020-07-11 22:42:46 +00:00
Jeff Young
e325d2e18f
Allow Net Inspector to create, rename and delete nets.
...
ADDED: create/edit/delete nets in PCBnew Net Inspector
ADDED: update from PCB now allows updating of changed nets
Fixes https://gitlab.com/kicad/code/kicad/issues/1996
2020-07-11 21:19:49 +01:00
Simon Richter
c407e96b14
std::min/std::max requires <algorithm>
2020-07-11 15:46:57 +02:00
Jon Evans
72b08f2b18
ADDED: Hide ratsnest for specific nets
...
List of hidden nets stored in project local settings
Hide/Show actions in context menu only for now, will
add them to some more GUI places soon.
Ref https://gitlab.com/kicad/code/kicad/-/issues/1951
2020-07-10 21:06:17 -04:00
Seth Hillbrand
7201e9d7eb
pcbnew: adjust component hash for GenCAD export
...
The previous hash was not unique for changes in integer/boolean values.
Generic hash_combine routines provide decent coverage for limited extra
cycles.
2020-07-09 17:40:30 -07:00
Ian McInerney
af24a5d5a7
Properly dismiss the grid combobox editor when it loses focus
...
The old way of checking for focus loss caused GTK to be unable to
even open the combobox. This way checks for the event sent when the
list closes and uses that to close the grid editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/4617
2020-07-09 20:37:08 +01:00
Jon Evans
b1b9cef5fb
Full-project automatic backup system
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4763
2020-07-09 13:55:19 +00:00
jean-pierre charras
5226d6b4df
libcommon build: add NGSPICE_INCLUDE_DIR in include list (similar to Eeschema build).
...
Useful when ngspice is build by the developer in a specific folder.
Fix also an other minor compil warning.
Fixes #4851
https://gitlab.com/kicad/code/kicad/issues/4851
2020-07-09 08:46:59 +02:00
Jon Evans
afd432e687
Infrastructure for net hiding
...
LoadProjectSettings changed to take place after the board
has been loaded so that board-specific project settings can
be applied (such as net visibility and color overrides)
2020-07-08 21:59:34 -04:00
Jeff Young
741481591e
NetClass settings for Eeschema.
...
ADDED Eeschema-specific netclass settings including wire and bus
thickness, color, and line style.
Netclasses override individual wire & bus colors and line styles.
If that proves an issue we might look at something more sophisticated
with inheritance.
Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-08 21:23:25 +01:00
Wayne Stambaugh
485518a5e2
Add ngspice build version to KiCad build information.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4833
2020-07-08 13:28:26 -04:00
Wayne Stambaugh
55dc0e8b2f
Fix about dialog control spacing.
...
There is a difference between how wxStaticText and wxHyperlinkCtrl
controls are rendered causing alignment issue between the two. The
cheap and dirty solution was to pad the wxStaticText but this may
yield inconsistent results depending on the platform.
Fixes https://gitlab.com/kicad/code/kicad/issues/4843
2020-07-08 12:56:29 -04:00
jean-pierre charras
8c15ecf8e4
Gerbview: fix issues when setting the grid color and the worksheet color.
...
The issue for the grid color was due to the fact there are 2 places to
store the color: the color settings and the m_gridColor GERBVIEW_FRAME member.
The worksheet color (color set to RED after a color change in layer render)
is a bit strange: looks like LAYER_GERBVIEW_WORKSHEET and LAYER_WORKSHEET
are both used to draw the worksheet.
2020-07-08 18:49:12 +02:00
Jon Evans
3dd2dc89ad
Fix default values for color theme editor
...
At the time of creating a copy, the defaultColors map
is not initialized, so needs to be initialized from the
copy constructor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4841
2020-07-08 12:19:10 -04:00
Ian McInerney
37ce9fb847
Tell wx that we really want a transparent background
...
Try more options for telling wxWidgets that we want the area
to have a transparent background. Also, fix some spacing issues.
Fixes https://gitlab.com/kicad/code/kicad/issues/4842
2020-07-08 16:29:04 +01:00
jean-pierre charras
55daf645b6
UNIT_BINDER::Validate(): fix incorrect display of val min and val max.
...
When Validate() find an out of limits user value, it displays the limits.
However, the displayed limit value was incorrectly converter to internal units,
and strange values were displayed.
2020-07-08 10:27:31 +02:00
Jon Evans
5d14dc9034
Fix assert that occasionally happened when loading file history
...
ClearFileHistory must be used to update the underlying data
2020-07-07 23:42:47 -04:00
Jon Evans
961fbadd23
Initial infrastructure for net/netclass colors in board
2020-07-07 22:21:45 -04:00
Ian McInerney
c6eb072726
eeschema: Fix cutoff text in pinmap
...
Ensure the proper bounding box is used when computing the amount
of space taken by angled text in the control.
Fixes https://gitlab.com/kicad/code/kicad/issues/4761
2020-07-07 23:12:17 +01:00
Ian McInerney
0f0e845d74
Add parsing for centimeters into the numeric evaluator
...
ADDED: Allow cm as a unit in text field expressions
Fixes https://gitlab.com/kicad/code/kicad/issues/4797
2020-07-07 23:12:17 +01:00
Ian McInerney
4cd0ec8808
Fix library tree column widths when tree is refreshed
...
GTK only calculates new widths once the tree is displayed,
so calling Refresh after updating the tree but before display
will return a column width of 0. Instead, use saved column
widths if an invalid width was returned.
Fixes https://gitlab.com/kicad/code/kicad/issues/4837
2020-07-07 23:12:17 +01:00
Ian McInerney
53bbf69466
Expand choicebox to ensure GTK can display the full strings
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4715
2020-07-07 23:12:17 +01:00
Jeff Young
77313e4398
OK, so maybe it's a WxWidgets version issue?
2020-07-07 15:28:22 +01:00
Jeff Young
3c791c1016
Fix Linux compile issue.
2020-07-07 15:16:19 +01:00
Jeff Young
e66523586b
Add Assign Netclass... to context menu.
...
ADDED Assign Netclass feature to EEschema.
Netclass assignments also now shown in status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-07 14:23:39 +01:00
Jon Evans
a3655225cd
Save selection filter state in project local settings
2020-07-06 21:53:12 -04:00
Jeff Young
3939b31027
Integration of netclasses into Eeschema.
...
This is mostly architecture, with the hookup of the Schematic Setup
dialog's Net Classes page. Things like assigning to a net on the
canvas to follow.
Fixes https://gitlab.com/kicad/code/kicad/issues/2132
Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-06 20:00:50 +01:00
Jeff Young
b0ca7d5140
Netclass setup for Eeschema.
...
ADDED netclass panel in Schematic Setup dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/2132
2020-07-06 20:00:50 +01:00
Jeff Young
2819570d1e
Push panel_setup_netclasses down into common.
2020-07-06 20:00:50 +01:00
jean-pierre charras
0d8c6d43a8
fix minor I18N issues.
2020-07-06 13:47:42 +02:00
Jon Evans
1845d3fe35
Disable broken cmake directives added in DRC merge
2020-07-05 18:16:38 -04:00
Tomasz Wlostowski
49c37014f7
Updated copyright headers in expression evaluator code
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
8ffa86a63f
get it to compile after rebase
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
9d0f5c7f94
PROGRESS_REPORTER: implement SetCurrentProgress() method
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
65a1ed96e0
libeval_compiler: silence temporary debug stuff
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
3268f98fd7
libeval_compiler: support for method calls (e.g. item.onlayer('layer') )
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
3005aab444
common: libeval_compiler :virtual method support
2020-07-05 22:44:38 +02:00