Commit Graph

65 Commits

Author SHA1 Message Date
Jon Evans 3a2cc8f56f Net Inspector: clear sort ordering during rebuild
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14697
2023-06-09 09:06:11 -04:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Jeff Young 74f064d3aa Don't keep smart pointers to wxWindows, particularly modeless ones.
wxWindows have their own lifecycle management.
2023-03-11 19:36:01 +00:00
Seth Hillbrand 20d7ffd5d3 Ensure we are not trying to sort on an invalid col
Fixes https://gitlab.com/kicad/code/kicad/issues/13377
2023-01-04 13:56:25 -08:00
Jeff Young c0872364d4 Get rid of bloated bitmap buttons on wxWidgets 3.2. 2022-12-13 20:48:02 +00:00
Jeff Young 96819f6c01 Better cache invalidation for text objects with references.
Fixes https://gitlab.com/kicad/code/kicad/issues/13059
2022-12-04 11:51:44 +00:00
Jeff Young b2177718a1 Tighten up refresh logic for net & netclass references.
Also tightens it up a bit for text variables which can reference things
like netnames and netclasses, but also board settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/13032
2022-11-29 15:18:36 +00:00
Jeff Young 437d2c4589 Overhaul of remove-unconnected's zone filling and drawing strategies.
1) The highest priority zone that a via/pad collides with "owns" its
connectivity state.  Once set, lower priority zones cannot change it --
and in fact, if they would have connected to it are forced not to.

2) The connectivity state goes with the zone fill state, and therefore
must be saved in the file.

3) Display of remove-unconnected's pads is no longer done in GetViewLOD()
(which isn't called for selected items), and is instead done in PCB_PAINTER.
This allows us to draw the full pad in outline mode when a via/pad is
selected which would otherwise only show the hole.

4) Note that in some cases this will still generate DRC errors -- in
particular when a via nearly collides with a higher priority zone it
won't get "owned" by that zone and may therefore have insufficient
clearance if said zone concludes it's unconnected and a subsequent
(lower priority) zone connects to it (causing it to now become flashed).

Fixes https://gitlab.com/kicad/code/kicad/issues/11299
2022-10-18 13:05:42 +01:00
Seth Hillbrand a0865082fb Fix compile warnings 2022-10-04 17:06:45 -07:00
Marek Roszko 59d62f7df1 Untangle some includes 2022-09-25 11:37:06 -04:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
jean-pierre charras 488a53e71b Fix a few minor Coverity warnings 2022-08-12 10:51:36 +02:00
Seth Hillbrand 129905686f Fix error in net list sorting 2022-08-04 10:27:01 -07:00
Seth Hillbrand 090e70ccd2 ADDED: Have Net Inspector report lengths per layer
When tuning high speed traces, you may need to extract data per layer
rather than just the summary as signal speed varies based on dielectric
and trace type
2022-08-03 16:35:58 -07:00
Seth Hillbrand f5283c6133 Fix cherry-pick issue 2022-08-01 21:32:56 -07:00
Seth Hillbrand e4ca2408d4 Net Inspector: Handle via layers
Rather than measuring the total via height, measure from the entry to
exit track height to get a more accurate distance

(cherry picked from commit 57de5a6b65)
2022-08-01 20:25:27 -07:00
Jeff Young 4f63611ee5 SetWidth as well as SetMinWidth for MSW.
Fixes https://gitlab.com/kicad/code/kicad/issues/11467
2022-04-30 14:09:30 +01:00
Jeff Young d72b9861f7 Translate net inspector column names on the fly.
Fixes https://gitlab.com/kicad/code/kicad/issues/11467
2022-04-30 00:22:27 +01:00
Jeff Young 4966e2ebc2 Fix collapsing name column in Net Inspector. 2022-02-17 23:59:09 +00:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
dsa-t d105e773a1 Update columns when height changes too 2021-12-25 15:26:43 +00:00
Alex bc146db06d Net inspector changes 2021-12-25 15:26:43 +00:00
Alex 45c50535c5 Use GetUnobscuredSize in dialogs/panels 2021-12-25 15:26:43 +00:00
Jeff Young dabc75bee8 Source 3D dimensions from board stackup.
Also includes a performance improvemnt by caching the 3D model matrices.
2021-12-24 21:10:28 +00:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
dsa-t f2639e2928 Reverse sort order for net id in inspector 2021-12-11 23:12:47 +00:00
Jeff Young f606679164 Proper numeric sorting for intersheet refs.
Also expunges the horrifically named std::remove and std::remove_if
(neither of which remove anything).
2021-10-01 18:29:21 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young 126cd14715 Fix width setting bug in Net Inspector. 2021-07-03 21:16:15 +01:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko 0bc0f2265e dialog_board_statistics.h shouldn't leak confirm.h 2021-06-06 19:34:53 -04:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Marek Roszko cfa2b57c68 Use logical OR to quiet static analyzer (no functional change) 2021-06-01 18:44:22 -04:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Jon Evans c973a447df Make sure board netinfo list is updated when net inspector renames a net 2021-04-20 21:15:42 -04:00
Jon Evans 8792d7288d Net inspector: Fix calculation of via length
We have a function for this in the BOARD_STACKUP now, and it returns
a more correct number (excluding the start and end copper layers)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8256
2021-04-20 20:03:38 -04:00
Jon Evans 29c45743b7 Fix calculation of arc lengths; include them in net inspector
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8140
2021-04-15 21:06:35 -04:00
Jon Evans 36ef198610 Clean up nets from items when deleting in the inspector
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8162
2021-04-12 21:17:42 -04:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jonathan Haas f90164f7cf Fix some typos and improve wording 2021-03-02 19:13:49 +01:00
david-beinder c1aa50e522 Notify control when removing items without parent
Fixes https://gitlab.com/kicad/code/kicad/issues/7441
2021-02-22 14:00:13 +00:00
Jeff Young 0ba0160da9 Add a PT_NIC pin electrical type and a netlist token for SCH_NO_CONNECT.
ADDED a new pin electrical type "free" for internally unconnected pins.

CHANGED the "unconnected" pin electrical type is now represented by
"no_connect" in files and netlists.  (The legacy syntax is also accepted
in files.)
2021-01-23 00:10:01 +00:00
Jeff Young 366c7096b3 More double- and triple-pointer erradication. 2021-01-06 14:37:38 +00:00
Jeff Young 426536c381 Don't show empty-net synthetic net in Net Inspector.
Also fixes an assert when deleting a net inspector row with no
parent row.

Fixes https://gitlab.com/kicad/code/kicad/issues/6962
2021-01-06 14:27:02 +00:00
Michael Kavanagh 154e19b6e7 Icons: use common prefix for small 16x16 2021-01-02 23:16:33 +00:00
Jeff Young 6848b1055e Make sure sorting is honoured on first display.
Fixes https://gitlab.com/kicad/code/kicad/issues/6295
2020-12-21 19:47:36 +00:00
Jeff Young 01f6c90fac BOARD_CHANGED is only called after the previous board has been freed.
There is therefore no reason to remove the listener (and every reason
not to try).

Fixes https://gitlab.com/kicad/code/kicad/issues/6666
2020-12-18 12:49:20 +00:00