Commit Graph

49 Commits

Author SHA1 Message Date
Jon Evans 595bf70d5d Do not try to read from UI elements that haven't been initialized yet
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13480
2023-01-12 09:16:22 -05:00
Jeff Young 3f63f9fc57 Don't prune inner layers of through-hole parts.
For historical reasons we've always included ALL inner layers in these
items and changing that has uncovered several latent bugs.  Rather
than find all the rest this late in the game, I went back to storing
all inner layers, even those the board doesn't currently have.

Fixes https://gitlab.com/kicad/code/kicad/issues/12863
2022-11-09 15:58:14 +00:00
Jeff Young d67437a2aa Move ratsnest exclusion processing to a post-pass.
Also fixes a few cases where we were unnecessarily rebuilding
connectivity more than once for an operation.
2022-09-29 17:08:49 +01:00
Seth Hillbrand 35ac39844f Clean up some auto usage
Don't make new copies of shared_ptr if we can use references.  Keep auto
usage down to hard-to-type-out sequences
2022-08-15 11:29:45 -07:00
jean-pierre charras 4d48376eae Fix some warnings detected by PVS-STUDIO (not used vars) 2022-07-26 16:00:14 +02:00
Jon Evans dc6c27b686 Don't wipe out visibility state when changing layer count
(cherry picked from commit 7053981835)
2022-06-08 03:01:02 +00:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
jean-pierre charras a0bcde088e Use ChangeValue() instead of SetValue() in some wxTextCtrl
(It avoids generating unused events)
2021-12-23 17:58:50 +01:00
Jon Evans a7bd621419 Remove checkboxes that can't be unchecked (part 1)
The checkboxes for copper layers should probably also be removed
but leaving them for now since they direct the user to the right
place to disable copper layers.
2021-08-24 20:29:03 -04:00
Jeff Young 95b87ba29a Freshen microwave polygon dialog and remove a bunch of dead code. 2021-08-03 01:11:11 +01:00
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Jeff Young 0f27618125 Use a list dialog that can be parented by the Board Setup dialog.
(The current one keeps pulling the Kicad Manager window to the front
on OSX.)

I also removed the UpdateUI stuff which was probably causing:

Fixes https://gitlab.com/kicad/code/kicad/issues/5049
2021-06-27 01:41:35 +01:00
Wayne Stambaugh 7c14e4e967 Common widget header housekeeping. 2021-06-03 12:02:45 -04:00
Jeff Young 52aea0a2c9 Consistent terminology. 2021-04-03 11:15:11 +01:00
Jon Evans bba7fae104 Coverity fixes 2021-02-24 22:55:11 -05:00
Jon Evans 887ad1c30d CHANGED: Copper layer count is now set on physical stackup page
REMOVED: Board layer stackup presets that were not very useful

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6765
2021-02-23 21:31:12 -05:00
jean-pierre charras 96af236493 Code cleanup: remove include wx.h from pcb_plot_params.h.
including wx.h is useless for this file, and include wx.h in a lot of other files.
Include wx.h must be made only when needed in a given file, because on Windows
it include some headers that frequently create collision with kicad declarations
2021-01-25 16:18:46 +01:00
jean-pierre charras dd3b5512ee PANEL_SETUP_LAYERS:do not disable the button "Add User Defined Layer".
For boards having 2 or 4 layers this button was disabled, that make no sense.
2020-12-14 17:47:55 +01:00
Marek Roszko 16e3e59495 Split out arrayDim and MIRROR templates from macros.h
These were not macros
2020-11-17 20:21:04 -05:00
Jeff Young 666c11965a Clean up some more MODULE terms. 2020-11-14 19:56:06 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Marek Roszko 81a7afc76e Use kicad_algo directly rather than common.h 2020-10-24 08:53:11 -04:00
Jeff Young 505d764f25 Set board modify bit only when necessary after Board Setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/5685
2020-10-13 23:11:29 +01:00
jean-pierre charras 3144bab36f final cleanup about removing useless include 2020-10-03 16:40:36 +02:00
Jon Evans 4dda3a1715 Don't allow editing design rules without a project
Also fix a crash initializing DRC engine on an empty board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5835
2020-09-30 19:12:26 -04:00
Jeff Young f8875bc5a6 Move std::contains to alg::contains. 2020-09-26 14:42:40 +01:00
Jeff Young d7e80f8008 Add std::contains() to simplify a lot of code. 2020-09-26 12:40:32 +01:00
Wayne Stambaugh 564f363c57 Pcbnew: fix user defined layer bugs. 2020-09-24 10:19:10 -04:00
Wayne Stambaugh 188232de6f Pcbnew: add user defined layers and allow all layers to have user names.
This changes the file format.  All previous copper layers that had a user
defined name are forced back to the canonical name and the user defined
name is stored as an optional quoted string in the layer definition and
only used for UI and plotting purposes.  All copper object layer names
are now the canonical name for internal file use.

ADDED: Nine new user definable non-copper layers that can be optionally
added to the board layer stack.

CHANGED: All board layers can now be renamed by the user.

CHANGED: User defined layer names can now contain space characters.

Fixes https://gitlab.com/kicad/code/kicad/issues/1969
2020-09-23 15:41:43 -04:00
Jeff Young 1039fb1bc5 Minor refinement to Import Settings from Board dialog.
Also some defensive code to protect against an ASAN stack buffer
underflow.

Fixes https://gitlab.com/kicad/code/kicad/issues/5660
2020-09-20 13:55:59 +01:00
Jeff Young 4317881012 Improve delete-unused-layers to better handle multi-layer items.
Fixes https://gitlab.com/kicad/code/kicad/issues/5116
2020-08-09 15:39:51 +01:00
PJM 829316fad4 Pcbnew #4904 : Import settings from another board deleted internal layers
When importing settings from a board with more copper layers and applying it
to a board with less copper layers, if the user has ticked the checkbox
"Layer settings", then KiCad will delete the inner copper layers.  Only
when the user clicks OK does it then warn that it found deleted items on inner
layers.  The message is too generic and comes after the layers have already
been deleted.

This Merge Request tries to address this by warning them early.  The changes are:

1 - Added code to check if user is trying to import settings from a
board with less copper layers than the current loaded board.  This
results in KiCad deleting inner copper layers.  Now it presents a
warning dialog that explains the current settings will result in deleted
inner layers, and lets the user stop the import process before making any changes.

2 - Made "Import Settings" dialog disable "Import Settings" button
until at least one import option checkbox is checked.

3 - Made "Select All" button on "Import Settings" dialog toggle
between "Select All" and "Deselect All" on each click.

Items 2&3 were added to improve the overall import settings usability
experience.

Fixes issue https://gitlab.com/kicad/code/kicad/-/issues/4904
2020-08-08 00:51:23 +00:00
Seth Hillbrand eb89d1c68b pcbnew: Minor update to ratsnest calc
BuildConnectivity updates the ratsnest after it completes.  By compiling
the ratsnest before connectivity, we update it twice with the dirty flag
being reset after connectivity updates.
2020-06-17 19:43:11 -07:00
Ian McInerney e2853862e5 Cleanup redundant type casting 2020-01-13 14:00:45 +00:00
Ian McInerney 36f6b4a9b4 Clean up redundant dynamic casts 2020-01-13 01:39:08 +00:00
Jeff Young 14c4175040 Tighten up the board setup dialog layout a bit. 2019-09-07 13:57:38 +01:00
jean-pierre charras f3f0e20a67 Pcbnew: add a board layer stack manager
This is a new feature.
2019-09-05 18:51:18 +02:00
Seth Hillbrand 48d68f55d7 pcbnew: Two layer boards need both masks
Adds the missing default layer to the default board setups for two
layers with parts on single side (either top or bottom)

Fixes: lp:1841294
* https://bugs.launchpad.net/kicad/+bug/1841294

(cherry picked from commit 8b3a2984bf)
2019-08-26 17:14:35 -07:00
Jeff Young 03bab2f4a9 Remove some more legacy drawing stuff. 2019-05-31 21:54:22 +01:00
Seth Hillbrand 1e5ba6f1b1 Replace DIM() macro
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time.  Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
2019-01-06 08:43:12 -08:00
jean-pierre charras db7dba96ad Fix a few Coverity warnings.
Mainly not initialized members, and replace not tested dynamic_cast by static_cast.
2019-01-04 09:49:21 +01:00
Jeff Young ff6a3482ec Remove on-kill-focus-validation.
Fixes: lp:1805361
* https://bugs.launchpad.net/kicad/+bug/1805361
2018-11-29 19:00:21 +00:00
Maciej Suminski d599a02a90 Fix unused variable warnings 2018-10-09 09:14:51 +02:00
Jeff Young dfd028a66a Don't gray out non-enabled layers in layers setup panel.
Fixes: lp:1794215
* https://bugs.launchpad.net/kicad/+bug/1794215
2018-09-25 20:47:03 +01:00
Maciej Suminski de65ca512f Fixed reference to PCB_EDIT_FRAME in PANEL_SETUP_LAYERS
GetParent() in PANEL_SETUP_LAYERS::TransferDataFromWindow() returns a
wxTreebook pointer, instead of expected PCB_EDIT_FRAME resulting in a
crash.
2018-09-04 12:29:36 +02:00
Jeff Young 994a9c5ff8 Only show all layers when the stackup changes.
Fixes: lp:1783231
* https://bugs.launchpad.net/kicad/+bug/1783231
2018-07-24 18:43:44 +01:00
Jeff Young 909f850d16 Give panels the correct parent (the treebook, not the dialog).
(cherry picked from commit 7338533)

(cherry picked from commit 3ce75be)
2018-07-17 15:14:19 +01:00
Jeff Young aab97c8385 Consolidate design rules UI.
Implement new Board Setup paged dialog which includes:
  Layers Setup
  Design Rules
  Solder Mask & Paste
  Text & Drawings

Moves line width and text properties to a layer-class-based
system.  Renames unlocked to upright (which also reverses the
logic).

New Edit Text and Graphic Properties dialog which replaces
Edit Footprint Text and adds layer-class-based editing and the
italic, upright and visibility properties.

Adds Import Settings functionality which allows settings to
be imported from another project at page granularity.

Also UNIT_BINDERizes the dialog and adds editing of pcb text.

Fixes: lp:1731952
* https://bugs.launchpad.net/kicad/+bug/1731952

Fixes: lp:1743464
* https://bugs.launchpad.net/kicad/+bug/1743464

Fixes: lp:1664761
* https://bugs.launchpad.net/kicad/+bug/1664761

Fixes: lp:1753362
* https://bugs.launchpad.net/kicad/+bug/1753362

Fixes: lp:1545427
* https://bugs.launchpad.net/kicad/+bug/1545427

Fixes: lp:1753775
* https://bugs.launchpad.net/kicad/+bug/1753775

Fixes: lp:1777692
* https://bugs.launchpad.net/kicad/+bug/1777692

Fixes: lp:1780670
* https://bugs.launchpad.net/kicad/+bug/1780670

Fixes: lp:1519601
* https://bugs.launchpad.net/kicad/+bug/1519601

(cherry picked from commit 3944a5e)
2018-07-17 15:12:34 +01:00
Renamed from pcbnew/dialogs/dialog_layers_setup.cpp (Browse further)