Jeff Young
be957e0105
Convert parent-less module items to board items on paste.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4938
2020-07-27 19:53:42 +01:00
Jeff Young
1d8c71c617
Fix layout issues in net inspector dialog.
...
1) don't add 10 -and- include 'M's in the strings; they're both for
margins
2) take scroll bar width into account when sizing columns
3) make sure margins are added to temp variables that we're going to
use to size column 1
Fixes https://gitlab.com/kicad/code/kicad/issues/4981
2020-07-27 19:53:42 +01: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
jean-pierre charras
124afa5fc4
FOOTPRINT_PREVIEW_PANEL: Ensure we are never using the high contrast mode
...
to display the selected footprint
Fixes #4980
https://gitlab.com/kicad/code/kicad/issues/4980
2020-07-26 13:22:21 +02: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
Simon Richter
fdaaa0a704
Make PCB_EXPR_UCODE final
...
This avoids a warning about its non-virtual destructor during deletion, as
polymorphic classes are expected to be deleteable through any pointer.
Possibly not entirely correct -- might be problematic if UCODE objects are
deleted through a base pointer.
2020-07-25 19:41:16 -07:00
Jeff Young
4153309fba
Add defensive code.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4941
2020-07-25 23:54:04 +01:00
Seth Hillbrand
ad625d8d76
Add missing KIID to edge_module
...
In order to support grouping in the footprint editor, we need full KIIDs
stored with the footprint elements.
2020-07-25 14:10:53 -07:00
Seth Hillbrand
0a5f11fb37
Keep item ordering as much as possible
...
The ordering goes first by type and then by uuid. In the case of
DRAWSEGMENT and EDGE_MODULE, we also sort by shape type before UUID.
Fixes https://gitlab.com/kicad/code/kicad/issues/4068
2020-07-25 12:56:19 -07:00
Jeff Young
2af6d01fdf
Add some defensive code for empty polygons.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4947
2020-07-25 17:35:05 +01:00
jean-pierre charras
6f7d5f5e2b
Footprint editor: fix some issues in flip and mirror commands.
...
more about fixes #4958
https://gitlab.com/kicad/code/kicad/issues/4958
2020-07-25 18:10:24 +02: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
d1d7f5e7fa
Fix text size in Edit Footprint dialog.
2020-07-25 13:03:33 +01:00
jean-pierre charras
377da31fcc
D_PAD copy ctor and operator = : fix missing copy of pad name and pin function members.
2020-07-25 13:28:20 +02:00
jean-pierre charras
bebba1df61
D_PAD copy ctor and operator = : fix missing copy of m_LengthPadToDie member.
2020-07-25 08:29:33 +02:00
jean-pierre charras
b5960dfb40
class D_PAD: add Copy ctor and operator =.
...
Due to the fact basic primitives for custom pads are now managed by
a list of pointer, the default copy ctor and default operator = do not work
(the basic primitives list must be duplicated).
It fixes issues related to primitives list id pad edition, footprint edition
and undo/redo
Fixes #4958
https://gitlab.com/kicad/code/kicad/issues/4958
2020-07-24 18:02:56 +02: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
b60303efdb
Fix crash due to uninitialised variable.
2020-07-23 17:20:32 +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
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
Tomasz Wlostowski
70b98c3b49
router: dump entire event log + annotated PCB upon user request
2020-07-22 18:05:54 +02:00
Tomasz Wlostowski
379aa8f3b5
router: clearer distinction between LOGGER and DEBUG_DECORATOR classes.
...
The first one keeps a log of events (start routing, mouse motion, etc).
The second allows for adding temporary debug drawings and messages which are stored synchronously with the events in LOGGER.
The event stream together with the PCB design (now with UUIDs) can be used to deterministically replay routing bugs as the user sees them.
2020-07-22 18:05:54 +02:00
Tomasz Wlostowski
2a2e389a94
router: auto-guess track posture from mouse movements, experimental!
2020-07-22 18:05:50 +02:00
Tomasz Wlostowski
fd07e94760
router: abstract segment links into a LINK_HOLDER interface. DIFF_PAIRS are now also linkable
2020-07-22 17:04:42 +02:00
Jeff Young
a6b6084a60
Add preflighting for DRC rule function calls.
2020-07-22 14:33:32 +01:00
jean-pierre charras
a61ea1fb0c
Fix a compil warning
2020-07-22 09:02:30 +02:00
Ian McInerney
450107e453
Remove if statement with duplicated branches in router
2020-07-22 00:18:30 +01:00
Jeff Young
fd647a1fa9
Code completion hookup to property manager.
2020-07-21 23:43:10 +01:00
Jeff Young
c52df811ae
Add expression eval to constraint min/max/opt values.
...
Also adds error reporting for above.
2020-07-21 23:43:10 +01:00
Jeff Young
7cbd166df7
Don't complain about duplicate names when the name didn't change.
2020-07-21 23:43:10 +01:00
Jeff Young
beb5bad9b7
Initialize Scintilla with correct braces for sexpr grammar.
2020-07-21 23:43:10 +01:00
Ben Ellis
42a2f13464
Added a check that sexprs isn't empty before popping
...
This fixes a crash on malformed sexprs in the DRC rules panel
2020-07-21 14:52:48 +00:00
Jeff Young
1790c536ef
Allow user layer names to be used in DRC rules.
...
I imagine this will also fix the property inspector, once it
gets merged.
2020-07-20 23:28:54 +01: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
Mark Roszko
3b727b5d16
Make preference groups not selectable
2020-07-20 13:45:46 +00:00
Ian McInerney
20c1492b6a
Initialize pointers to nullptr in copy constructor
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4940
2020-07-20 11:31:34 +01:00
jean-pierre charras
ba90416096
Pcbnew, legacy plugin (for .brd files): remove non working code.
...
This code controls the visibility of items, is not useful and does not
make sense for some items in current Pcbnew version.
2020-07-19 09:32:53 +02:00
Ian McInerney
967587adcc
Guard against dynamic cast failure
2020-07-19 01:47:03 +01:00
Ian McInerney
50b2271f84
Fix missing variable initialization
2020-07-18 23:56:39 +01:00
Ian McInerney
2542d41481
Fix copy constructors for BOARD_DESIGN_SETTINGS and ZONE_CONTAINER
2020-07-18 23:55:06 +01:00
Seth Hillbrand
4aef369ca2
Remove accidentally committed test file
2020-07-18 13:03:22 -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
jean-pierre charras
a25f7cc0a4
Pcbnew, footprint editor: make switching layers visibility on/off working.
...
In footprint editor the board is a dummy board not managed by project settings,
so using its settings to manage layers visibility does not work.
Fixes #4924
https://gitlab.com/kicad/code/kicad/issues/4024
2020-07-18 10:31:06 +02: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
jean-pierre charras
e7e1d5140e
Pcbnew, DRAWSEGMENT plot function: add missing plot code for S_RECT shape.
...
Fixes #4905
https://gitlab.com/kicad/code/kicad/issues/4905
2020-07-17 11:26:35 +02: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
Jon Evans
5444a1b4b0
Only init display options after creating a canvas
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4909
2020-07-16 22:27:03 -04:00
Jeff Young
944c9eac7c
Allow Update Schematic from PCB to re-link based on refdes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4306
2020-07-16 18:32:49 +01:00