Jeff Young
64a6fc0fd4
Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
3 years ago
Mark Roszko
b00178adb3
Nuke base_units from orbit
3 years ago
Seth Hillbrand
09ef7c8f1e
Add RPT_SEVERITY_DEBUG for developer-type messages
Move a bunch of importer messages out of the user-visible space as they
are not information that the average user can act on.
3 years ago
Jeff Young
63386ba64d
Pointer safety for ERC/DRC dialogs.
Also makes the "Edit ingored violations" easier to find.
Fixes https://gitlab.com/kicad/code/kicad/issues/12308
3 years ago
jean-pierre charras
afacec3acb
Protect RC_TREE_MODEL::GetValue() against null pointer
3 years ago
Marek Roszko
19e27ef587
Avoid missing null check in RC_TREE_MODEL::DeleteItems
3 years ago
Jeff Young
1f347582f8
Introduce new marker type so we can track DRC errors on the drawing sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/12221
3 years ago
Jeff Young
a11f48ef10
Markers provider is no longer responsible for all markers.
Unconnected items and schematic partity violations are also now
represented by markers, so the ERC/DRC window itself needs to do
the deep-delete.
Fixes https://gitlab.com/kicad/code/kicad/issues/12182
3 years ago
Jeff Young
74b9ff5865
Don't specify a severity when traversing the filtered list.
3 years ago
Seth Hillbrand
91a3024e34
Check pointer after yield
Yielding can change the status of the m_rcItemsProvider, so we need to
check after the yield to ensure we don't try to dereference it after
freeing
Fixes https://gitlab.com/kicad/code/kicad/issues/11347
4 years ago
Jeff Young
3fddf0414b
A bit of wxT().
4 years ago
Seth Hillbrand
16e802aff4
Don't count zero-length as duplicate
We were checking for duplicate tracks by looking to see if the two
tracks had two shared points. A null track always matched this case,
which removed the valid track. We solve this by avoiding null tracks in
the duplicate checker. They are removed separately in the null track
stage.
This also fixes a GTK-specific tree issue where we require the
BeforeReset()/AfterReset() calls instead of Cleared() to prevent GTK
from dereferencing a parent after freeing
Fixes https://gitlab.com/kicad/code/kicad/issues/10624
(cherry picked from commit 8753051db6
)
4 years ago
Jeff Young
21790fcab7
Fix a pair of dereference-freed-pointers in DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/10335
4 years ago
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
4 years ago
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
4 years ago
Mikolaj Wielgus
0d3e8e3d09
Make ERC/DRC item lightness proportional to default text brightness
Fixes https://gitlab.com/kicad/code/kicad/issues/9824
4 years ago
Jeff Young
fb8ee1a9d3
Remove assert.
4 years ago
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
4 years ago
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
4 years ago
Jeff Young
e2baacec21
Add cross-probing between PCB (markers) and DRC marker list.
Fixes https://gitlab.com/kicad/code/kicad/issues/7246
4 years ago
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
4 years ago
Wayne Stambaugh
bcd6bddfd4
Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
4 years ago
Jeff Young
3269f45776
Add wxDataView-style defensive code to wxListView usage.
Fixes https://gitlab.com/kicad/code/kicad/issues/8657
4 years ago
Marek Roszko
fcb21038cb
Reduce some eda_item.h usage in headers
4 years ago
Dominik Wernberger
e2aa7be4b3
Added a lot of consts and refactored a few lines
5 years ago
Ian McInerney
fc20eaa083
Fix some compiler and Coverity warnings
5 years ago
jean-pierre charras
00255f2a9c
Fix a compil warning.
5 years ago
Jeff Young
4d3224a9cb
Fix off-by-one error when deleting single marker.
Fixes https://gitlab.com/kicad/code/kicad/issues/6625
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
Jeff Young
ae77dfc455
Fix crash bug in marker deletion.
5 years ago
Jeff Young
d5addb692c
Move a bunch of DRC tests to RTrees.
5 years ago
Jon Evans
cc71f7d050
Add some missing headers required on wx3.0 at least
5 years ago
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
5 years ago
Jeff Young
44b23dd3d1
Add some defensive code to try and prevent freed pointer access.
Fixes https://gitlab.com/kicad/code/kicad/issues/5747
5 years ago
Tomasz Wlostowski
3e0635bd22
common: RC_ITEM can now keep an arbitrary number of violating UUIDs
5 years ago
Jeff Young
ac4978cf8a
Some defensive code which may prevent a freed-memory-access.
Fixes https://gitlab.com/kicad/code/kicad/issues/5747
5 years ago
Ian McInerney
e9aa9a759a
Add missing break statements to prevent fallthrough
Otherwise all RC_ITEM objects are severity info in the log
5 years ago
Jeff Young
c6fb799fcd
Restore severity in saved DRC/ERC reports.
Fixes https://gitlab.com/kicad/code/kicad/issues/5733
5 years ago
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
5 years ago
Dominik Wernberger
6c164310ec
Delete nodes in vector before clearing it
5 years ago
Jon Evans
a52e3fc87a
Fix a segfault if screen changes from under the RC_TREE_MODEL
5 years ago
Jeff Young
93ef18d775
Fix typo where two footprint warning messages were transposed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5303
5 years ago
Tomasz Wlostowski
d937fadd6f
Migrate RC_ITEM to use shared_ptr
5 years ago
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
5 years ago
Jeff Young
9c9fdb2569
More performant (and more correct) deletion of DRC markers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5057
5 years ago
Jeff Young
c56599ab07
Allow ERC/DRC markers to be deleted without deleting exclusions.
Fixes https://gitlab.com/kicad/code/kicad/issues/4953
5 years ago
Jeff Young
c8170d9430
Restore selection after rebuilding DRC/ERC tree.
Fixes https://gitlab.com/kicad/code/kicad/issues/5042
5 years ago
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
5 years ago