Commit Graph

67 Commits

Author SHA1 Message Date
Alex Shvartzkop 6a69396070 Allow column auto-sizing in RC trees.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16727
2024-01-25 20:51:54 +03:00
Jeff Young 68cbb820a7 performance efficiencies 2023-12-18 17:20:34 +00:00
jean-pierre charras 499f3ca95b DRC_TEST_PROVIDER_MISC::testOutline(): add test to detect questionable items.
Graphic items (segments, rects, circles) on Edge.Cuts can create issues when
building board outlines, when they are very small (a few nm in size), because
they are not easily handled when trying to search connected graphics.
Also protect RC_ITEM::SetItems() against null pointer.
Fixes #15865
https://gitlab.com/kicad/code/kicad/-/issues/15865
2023-10-12 14:48:24 +02:00
Jeff Young 10d62ed766 Replace wxWidgets-Mac-specific API with a general one.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15817
2023-10-03 23:40:42 +01:00
Jeff Young 336a38695a MacOS fix for expanded items; MSW fix for selected event
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15817
2023-10-03 20:09:37 +01:00
Marek Roszko 87d36dbfd8 Fix up erc json a little 2023-08-13 19:19:20 -04:00
Marek Roszko 14a0fa435c ADDED: DRC JSON report 2023-08-13 14:59:10 -04:00
Ian McInerney 20ec8ed303 Fix GitLab URLs to point to the correct project page
GitLab 16.0 removes support for URLs that don't contain /-/ after the
repository name, so the report bug feature and various links we had in
the source (including the git-fixes script) would lead to a 404 error.

See GitLab docs for deprecation/removal notice:
https://docs.gitlab.com/ee/update/deprecations.html?removal_milestone=16.0#legacy-urls-replaced-or-removed

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14759
2023-05-17 11:23:00 +01:00
Jeff Young 3521add640 Suppress newlines in RC_ITEM messages.
Fixes https://gitlab.com/kicad/code/kicad/issues/14569
2023-04-19 14:09:21 +01:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
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.
2022-09-19 17:10:59 +01:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
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.
2022-09-09 17:21:47 -07:00
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
2022-08-30 12:07:19 +01:00
jean-pierre charras afacec3acb Protect RC_TREE_MODEL::GetValue() against null pointer 2022-08-18 10:14:02 +02:00
Marek Roszko 19e27ef587 Avoid missing null check in RC_TREE_MODEL::DeleteItems 2022-08-17 07:12:26 -04:00
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
2022-08-15 18:03:03 +01:00
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
2022-08-08 22:02:20 +01:00
Jeff Young 74b9ff5865 Don't specify a severity when traversing the filtered list. 2022-07-24 08:41:02 +01:00
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
2022-04-06 15:59:29 -07:00
Jeff Young 3fddf0414b A bit of wxT(). 2022-03-11 20:52:11 +00:00
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)
2022-01-28 16:34:34 -08:00
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