Commit Graph

45 Commits

Author SHA1 Message Date
Jeff Young 21790fcab7 Fix a pair of dereference-freed-pointers in DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/10335
2022-01-10 21:06:03 +00:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young 5f37c2b247 Custom rule severities.
ADDED severity token to custom rule syntax.  Each rule can now define
its own severity.

Fixes https://gitlab.com/kicad/code/kicad/issues/6148
2021-12-24 15:42:22 +00:00
Mikolaj Wielgus 0d3e8e3d09 Make ERC/DRC item lightness proportional to default text brightness
Fixes https://gitlab.com/kicad/code/kicad/issues/9824
2021-12-01 23:06:58 +01:00
Jeff Young fb8ee1a9d3 Remove assert. 2021-10-14 14:13:50 +01:00
Roberto Fernandez Bautista 0fa8e1f311 DRC Control: Clear pointer to MARKER after it has been centered
Also, added asserts to verify SelectMarker and CenterMarker actually
do select one.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9344
2021-10-10 16:22:04 +01:00
Jeff Young 1bb5fc3fd6 Work around EnsureVisible bug in wxWidgets during DRC cross-probe.
Also adds double-click-marker to open DRC dialog and select marker
in list.

Fixes https://gitlab.com/kicad/code/kicad/issues/7246
2021-10-06 11:17:03 +01:00
Jeff Young e2baacec21 Add cross-probing between PCB (markers) and DRC marker list.
Fixes https://gitlab.com/kicad/code/kicad/issues/7246
2021-10-02 23:39:45 +01:00
Jeff Young 8b5f393804 DRC bug fixes and debugging improvements.
1) Don't wait for UpdateUserInterface to build the (global) list of
layer names.

2) Report clearance resolution between a silk layer and a mask layer.

3) When writing DRC reports, include info about the violating rule.

4) Report "no relevant layers" if we fail to find anything to write
a clearance resolution report about.

Fixes https://gitlab.com/kicad/code/kicad/issues/8963
2021-08-17 15:41:12 +01:00
Wayne Stambaugh bcd6bddfd4 Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
Jeff Young 3269f45776 Add wxDataView-style defensive code to wxListView usage.
Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-22 22:25:06 +01:00
Marek Roszko fcb21038cb Reduce some eda_item.h usage in headers 2021-06-06 11:09:06 -04:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
Ian McInerney fc20eaa083 Fix some compiler and Coverity warnings 2020-12-17 00:30:22 +00:00
jean-pierre charras 00255f2a9c Fix a compil warning. 2020-12-15 16:20:58 +01:00
Jeff Young 4d3224a9cb Fix off-by-one error when deleting single marker.
Fixes https://gitlab.com/kicad/code/kicad/issues/6625
2020-12-04 14:01:54 +00:00
Jeff Young df262eaa06 Make prev/next marker work reliably on all platforms.
Requires us to move from arrow-keys to our own commands (the only
way that the OSX wxWidgets impl doesn't eat the keys when the dataVIew
has focus).

While there we might as well add a command to exlucde markers.

ADDED Prev Marker, Next Marker, Exclude Marker

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5501
2020-12-01 22:37:07 +00:00
Seth Hillbrand 298bc13f5d Delay deletion of the RC_ITEM tree nodes
The wxWidgets call "ItemDeleted" still requires access to the item in
memory, so we delay deletion by storing removed items to the end of the
call

Fixes https://gitlab.com/kicad/code/kicad/issues/6301
2020-11-23 09:52:46 -08:00
Jeff Young 1391774f64 Re-factor boundary/courtyard checker error handling.
ADDED Footprint Checker dialog to display the results in.

Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-21 20:57:35 +00:00
Jeff Young ae77dfc455 Fix crash bug in marker deletion. 2020-10-31 15:45:41 +00:00
Jeff Young d5addb692c Move a bunch of DRC tests to RTrees. 2020-10-31 15:45:41 +00:00
Jon Evans cc71f7d050 Add some missing headers required on wx3.0 at least 2020-10-18 12:45:41 -04:00
Jon Evans cb1d416e5a Use settings keys, not error codes, for ERC/DRC reports
Error codes can shift around if the enum ordering is
not maintained, which is more fragile than the settings
key which should never be changed after a new code is
created.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6001
2020-10-13 18:03:07 -04:00
Jeff Young 44b23dd3d1 Add some defensive code to try and prevent freed pointer access.
Fixes https://gitlab.com/kicad/code/kicad/issues/5747
2020-10-03 18:50:49 +01:00
Tomasz Wlostowski 3e0635bd22 common: RC_ITEM can now keep an arbitrary number of violating UUIDs 2020-09-27 16:45:46 +02:00
Jeff Young ac4978cf8a Some defensive code which may prevent a freed-memory-access.
Fixes https://gitlab.com/kicad/code/kicad/issues/5747
2020-09-23 18:43:07 +01:00
Ian McInerney e9aa9a759a Add missing break statements to prevent fallthrough
Otherwise all RC_ITEM objects are severity info in the log
2020-09-21 12:18:46 +01:00
Jeff Young c6fb799fcd Restore severity in saved DRC/ERC reports.
Fixes https://gitlab.com/kicad/code/kicad/issues/5733
2020-09-21 11:59:27 +01:00
Jeff Young 81b523f9a4 Make sure the board itself is in the item map.
Also makes closing the DRC dialog a bit more foolproof.

Fixes https://gitlab.com/kicad/code/kicad/issues/5665
2020-09-18 00:53:14 +01:00
Dominik Wernberger 6c164310ec Delete nodes in vector before clearing it 2020-09-01 23:26:39 +00:00
Jon Evans a52e3fc87a Fix a segfault if screen changes from under the RC_TREE_MODEL 2020-08-30 15:43:16 -04:00
Jeff Young 93ef18d775 Fix typo where two footprint warning messages were transposed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5303
2020-08-22 16:20:18 +01:00
Tomasz Wlostowski d937fadd6f Migrate RC_ITEM to use shared_ptr 2020-08-13 14:50:59 +02:00
Jeff Young f67ba62c11 Don't stop when current item is reached: there might be more.
In particular, the two sub-items also count as "current" and need
to be deleted.

Fixes https://gitlab.com/kicad/code/kicad/issues/5057
2020-08-04 13:28:16 +01:00
Jeff Young 9c9fdb2569 More performant (and more correct) deletion of DRC markers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5057
2020-08-04 11:45:07 +01:00
Jeff Young c56599ab07 Allow ERC/DRC markers to be deleted without deleting exclusions.
Fixes https://gitlab.com/kicad/code/kicad/issues/4953
2020-08-02 22:45:48 +01:00
Jeff Young c8170d9430 Restore selection after rebuilding DRC/ERC tree.
Fixes https://gitlab.com/kicad/code/kicad/issues/5042
2020-08-01 18:19:58 +01:00
Jon Evans 12b4a55ae8 Port Eeschema to new project settings
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04:00
Jeff Young a7703d1207 Cleanup Graphics to parallel Cleanup Tracks & Vias.
This also allows for easier migration to DRAWSEGMENT::S_RECTs by
auto-converting 4 rectilinear lines to a rectangle.
2020-06-17 18:44:39 +01:00
jean-pierre charras 59523efc1a Eeschema: fix a crash after reopening the ERC dialog, after changes in schematic.
When the ERC is run and a component has a ERC error linked to it, if it is deleted,
when reopening the ERC dialog, the dialog crashed due to a not found item
(null pointer use)
2020-06-01 19:42:16 +02:00
Jeff Young 4a60b8a776 Improve DRC error reporting and fix some bugs. 2020-05-01 18:49:42 +01:00
Jeff Young 32db9eb0f1 Add some distances to a few DRC errors. 2020-04-24 22:17:45 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
jean-pierre charras aebfbda183 DRC dialog: fix a crash when clicking on a item in Footprint Warning panel:
if the warning is a missing footprint, obviously there is no marker associated.
It creates a crash due to a null pointer.

Fixes #4114
https://gitlab.com/kicad/code/kicad/issues/4114
2020-03-28 11:00:54 +01:00
Jeff Young cee973dc04 Move ERC error reporting over to the new framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-16 11:06:15 +00:00
Renamed from pcbnew/drc/drc_tree_model.cpp (Browse further)