Commit Graph

9544 Commits

Author SHA1 Message Date
Jeff Young 1d1a5afe0c Remove minimum pin after fixing size.
Fixes https://gitlab.com/kicad/code/kicad/issues/5347
2020-08-24 15:01:12 +01:00
Jeff Young 8eda4d93ee Use LAYER_VIAS instead of via-type-specific layers for visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/5344
2020-08-24 14:00:46 +01:00
Jeff Young 502f2ca2ef Fix some snarled up event processing.
See the bug for details.  It's complicated.

Fixes https://gitlab.com/kicad/code/kicad/issues/5336
2020-08-24 13:20:29 +01:00
Jon Evans 3673c23696 Code style 2020-08-23 22:10:05 -04:00
Mark Roszko 89e74140eb Save file / window states for kicad project locally 2020-08-24 02:01:14 +00:00
Ian McInerney 2f7094b352 Cleanup some unused variables
* Make the app progress indicator only have the indeterminate state
  when the taskbar indicator is used (causes an uused variable warning
  on wx<3.1)
* Remove unused dry run variable in pcb_netlist.h
* Remove unused forceDropAnnotations from the paste special dialog
  since the dialog only controls keeping them.
2020-08-24 01:51:23 +01:00
Jeff Young fba6152709 Force wxWidgets to set widths smaller than BestWidth(). 2020-08-24 00:49:08 +01:00
Jeff Young d41f196d7f Appearance panel must be initialized from board before setting active layer. 2020-08-24 00:49:08 +01:00
Jeff Young 2c7093439e Don't attempt to set active layer to a non-activated layer. 2020-08-24 00:49:08 +01:00
Jon Evans e343234c61 Allow both 'save' and 'save as' for layer presets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5309
2020-08-23 17:00:49 -04:00
Jon Evans 63fb6d49e0 Make sure ratsnest gets redrawn when enabled
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5335
2020-08-23 16:45:33 -04:00
Jeff Young 49ac89f72c Only paint pads on layers they appear on.
Also adds pad layer removal controls to Pad Properties dialog.

Fixes https://gitlab.com/kicad/code/kicad/issues/5320
2020-08-23 21:23:34 +01:00
Jeff Young 6edcc9d38f Resolve textvars in Pad Settings dialog. 2020-08-23 21:23:34 +01:00
Jon Evans 8e03d278f0 Fix buttons in appearance panel in MSW
Ensure we pass the focus back to the canvas when
closing dialogs that might have been launched from the
appearance panel

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5326
2020-08-23 15:48:48 -04:00
Thomas Pointhuber a03fb7a9a8 Altium: Refactor and add initial structure for schematic importer
altium: move pcbnew/altium2kicadpcb_plugin -> pcbnew/plugins/altium

See: https://gitlab.com/kicad/code/kicad/-/issues/4412
2020-08-23 19:01:08 +00:00
Jon Evans eb0d3d653f Fix updating of grid view in MSW 2020-08-23 13:48:50 -04:00
Jon Evans a77000f9d9 Add DRC markers to the list of never-dimmed layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5307
2020-08-23 13:24:48 -04:00
Jon Evans 6720473db9 Move net visibility/color controls to a wxGrid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5235
Might improve https://gitlab.com/kicad/code/kicad/-/issues/5210
2020-08-23 13:15:07 -04:00
Jon Evans 342fae7768 Don't allow color overrides for Default netclass
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5330
2020-08-23 12:55:35 -04:00
Jon Evans 41f53cc138 Check that net is valid before dereferencing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5325
2020-08-23 12:55:31 -04:00
Jon Evans 9a0f956b92 Fix clearing netclass color override
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5327
2020-08-23 12:05:03 -04:00
PJM dd374e12ad Pcbnew: Fix bug when mouse moves off clarification menu
CHANGED: This code fixes an issue where bringing up the clarification
menu and moving off it while keeping the button pressed the entire
time caused an assertion.

Fixes https://gitlab.com/kicad/code/kicad/issues/5250
2020-08-22 16:48:19 -07:00
Jeff Young c71bb246e6 Don't allow preview to try and draw empty polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/5314
2020-08-22 23:46:56 +01:00
Jeff Young 591e1c5de9 Resolve textvars in Gerber place files.
Fixes https://gitlab.com/kicad/code/kicad/issues/5287
2020-08-22 22:23:15 +01:00
Jeff Young 8fc8e2c5f1 Add support for RECTs to VRML exporter. 2020-08-22 22:17:23 +01:00
Jeff Young 6598ad81e7 Resolve text vars when exporting IDF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5287
2020-08-22 22:08:32 +01:00
Jeff Young 929528a72c Coding style. 2020-08-22 22:03:43 +01:00
Jeff Young a2341f0f33 Pin dragged pad edges to hole (if it has one).
Fixes https://gitlab.com/kicad/code/kicad/issues/5317
2020-08-22 20:45:54 +01:00
Jon Evans 0fa755ebb8 Don't refresh appearance panel until after project is loaded 2020-08-22 15:40:43 -04:00
Jeff Young aa84bd6283 Use the right sign when dealing with the clearance epsilon.
Fixes https://gitlab.com/kicad/code/kicad/issues/5313
2020-08-22 20:03:46 +01:00
jean-pierre charras c196423192 fix a wxWidgets alert 2020-08-22 17:54:46 +02:00
Jeff Young f95651841e Report all extra footprints, even if they're duplicates.
Fixes https://gitlab.com/kicad/code/kicad/issues/5303
2020-08-22 16:20:18 +01: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
jean-pierre charras f28d30a87b Fix minor wxWidgets alert and a few Coverity warnings. 2020-08-22 17:11:02 +02:00
Seth Hillbrand 686af65a9b Fix issue generating alternate shape
Boolean ops need boolean inputs.
2020-08-22 08:04:03 -07:00
jean-pierre charras e5198e7404 Fix minor wxWidgets alerts. 2020-08-22 13:26:00 +02:00
Jeff Young d71d127c1a Put up infobar when editing board footprint.
Fixes https://gitlab.com/kicad/code/kicad/issues/5294
2020-08-21 23:53:40 +01:00
Jeff Young e92f58bb4f Implement "fromOtherCommand" for PlaceModule() too.
Fixes https://gitlab.com/kicad/code/kicad/issues/5281
2020-08-21 23:24:29 +01:00
Jeff Young c324c2cbf6 Make sure zone fills are up-to-date before deleting unconnected things.
Fixes https://gitlab.com/kicad/code/kicad/issues/5253
2020-08-21 20:32:19 +01:00
Jeff Young 842641308f Solids don't always have nets (even a defualt one).
Fixes https://gitlab.com/kicad/code/kicad/issues/5290
2020-08-21 20:08:12 +01:00
Jeff Young 9878a1e10c Add other (open) shapes to GetLength() calculation.
Since this is for trace length/propagation time, I'm not sure what
it would mean on a closed shape, so I left RECT and CIRCLE for now.
2020-08-21 19:55:52 +01:00
Jeff Young 80846dcbc7 Improve shutdown performance. 2020-08-21 19:12:51 +01:00
Seth Hillbrand cd51785173 Fix crash with missing board outline 2020-08-21 05:55:22 -07:00
Seth Hillbrand 9a4f92dfd9 Ensure that all pads with holes have alts
Alternate shapes for holes that are fallback clearance are needed in
case we have missing copper on any layer

Fixes https://gitlab.com/kicad/code/kicad/issues/5233
2020-08-20 21:50:37 -07:00
Seth Hillbrand 20de1b2b4f Minor code tightening 2020-08-20 20:18:31 -07:00
PJM 29ddc73d6c Pcbnew: Allow rects to have overlapping end corner locations
CHANGED: If a rectangle is drawn and the location of the second corner
is the same as another rectangle's second corner, Pcbnew crashes. The
reason is that a call is made to DRAWSEGMENT::GetLength(), but that
function only handles shapes of type S_CURVE and S_SEGMENT.  This code
checks if the overlapping end points are from a rectangle and if so
it doesn't call DRAWSEGMENT::GetLength().

Fixes https://gitlab.com/kicad/code/kicad/issues/5282
2020-08-21 02:58:32 +00:00
Jon Evans c763d92275 Just sample the panel background color rather than guessing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5260
2020-08-20 21:04:15 -04:00
Seth Hillbrand 1e315bc3fe pcbnew: Add "Select All" Action to pcbnew and fpedit
Fixes https://gitlab.com/kicad/code/kicad/issues/2497
2020-08-20 16:07:10 -07:00
PJM dad3101107 Pcbnew: Verify path can be made relative before asking in plotter dialog
CHANGED: When the output path is set in the plotter dialog, the user is
asked if they want to make the path relative to the project.  The old
code would ask the user if they wanted to do this, and then if it
failed would present an error dialog.  The new code tries it first on
a copy, and only if it works does the user get asked if they want
to do it.

Fixes https://gitlab.com/kicad/code/kicad/issues/5263
2020-08-20 17:07:21 +00:00
Wayne Stambaugh c14065ee98 Fix initial zoom to fit size in schematic and board editors.
This may affect other EDA_DRAW_FRAME objects as well but it doesn't seem
to be as noticeable in the symbol, footprint, and worksheet editors.

Fixes https://gitlab.com/kicad/code/kicad/issues/5248
2020-08-20 10:33:30 -04:00
Seth Hillbrand 2deefdd9ce Remove extra redirection from GetDesignSettings()
Now that m_designSettings is a unique_ptr, we can use the operator* to
get the reference to the element.
2020-08-20 06:23:21 -07:00
Jeff Young c5006b52ff Output resolved text to place files. 2020-08-20 13:41:50 +01:00
Jeff Young 38a994975b Output resolved text from PCBNew BOM generator. 2020-08-20 13:41:50 +01:00
Jeff Young 1813db6970 Fix indentation of properties in PCB file. 2020-08-20 13:41:50 +01:00
Ian McInerney 3ddee6503a Dialog changes forgotten in c479deaf 2020-08-20 01:43:52 +01:00
Ian McInerney c479deaf02 Use groups when doing graphics import
ADDED: Allow DXF/SVG graphics to be imported as a group

Also, cleanup the placement routine to allow the edit tool's flip
and rotate routines to be used when placing the items.
2020-08-20 01:22:48 +01:00
Ian McInerney 68f1c678dd Allow DXF/SVG import onto copper layers
ADDED: DXF/SVG import onto copper layers

Fixes https://gitlab.com/kicad/code/kicad/issues/2341
2020-08-20 01:20:53 +01:00
Jeff Young 2f0b8eb5e9 Don't allow view preset switcher on non-front window. 2020-08-20 00:51:16 +01:00
Jeff Young 6450ee2f2c Prevent crash if board doesn't have any layers in the layer preset. 2020-08-20 00:51:16 +01:00
Jeff Young 21a9f2ecfe Prevent crash when appearance panel defines no view presets. 2020-08-20 00:48:35 +01:00
Jon Evans cffbc34f12 Fix some logic issues with net coloring
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5266
2020-08-19 18:42:46 -04:00
Jon Evans 9437afef0b Don't try to set an active layer that doesn't exist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5273
2020-08-19 18:42:46 -04:00
Jeff Young 631b5a9340 Don't allow point editor inversion when editing pad shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/5272
2020-08-19 23:27:16 +01:00
Jeff Young 5589cdf921 Copy properties in module operator= and copy constructors.
Fixes https://gitlab.com/kicad/code/kicad/issues/5256
2020-08-19 22:45:40 +01:00
Jeff Young a13f6c3922 Repair initialization order in FOOTPRINT_VIEWER_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/5267
2020-08-19 20:12:10 +01:00
Jeff Young 4cd994611b Remove some wxString& return values for better thread safety. 2020-08-19 20:12:10 +01:00
Jeff Young 95591669f1 Merge board properties when appending board.
Fixes https://gitlab.com/kicad/code/kicad/issues/5255
2020-08-19 19:32:20 +01:00
Jeff Young 27b047ab3f Cache project text vars as properties in the PCB board file.
Fixes https://gitlab.com/kicad/code/kicad/issues/5255

Fixes https://gitlab.com/kicad/code/kicad/issues/5005
2020-08-19 19:32:20 +01:00
Jeff Young b9c50c893c Don't double-add presets to preset picker menu. 2020-08-19 19:32:20 +01:00
Seth Hillbrand dd9f7c8c25 PNS: Add defensive coding to AlternateShape()
Adds additional check/warnings about missing alternate shapes when they
are expected.

Fixes https://gitlab.com/kicad/code/kicad/issues/5233
2020-08-19 09:02:06 -07:00
Jeff Young 8bccb5f85c Fix null-ptr dereference. 2020-08-19 13:31:27 +01:00
Jeff Young 2bf4fcae2a Cancel preceeding command if Move was called to place it.
Fixes https://gitlab.com/kicad/code/kicad/issues/5252
2020-08-19 13:18:53 +01:00
Jon Evans 249de20c6b Fix show/hide of default netclass 2020-08-19 07:47:20 -04:00
Jeff Young 4b7c883095 Add layer presets switcher.
Fixes https://gitlab.com/kicad/code/kicad/issues/5247
2020-08-19 11:56:28 +01:00
Jeff Young 01bf395cc2 Make via cleaning options clearer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5253
2020-08-19 11:56:28 +01:00
Michael Kavanagh 1aad216647 Move Geographical Reannotate menu below separator 2020-08-19 10:18:24 +00:00
Seth Hillbrand a3fc028c9b CHANGED: locked parameter explictly written
Removed the bitmap status field that saved internal states into the
file, creating rcs churn.  Also removed the unneeded count variables at
the start of the file as these created merge conflicts for every board
that had multiple revisions

Fixes https://gitlab.com/kicad/code/kicad/issues/1850
2020-08-19 03:51:30 +00:00
Jon Evans d7b38d10c2 Use layer base color to create selection candidate color
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5072
2020-08-18 22:57:17 -04:00
Jon Evans a0f2435ccd Clarify net selection tooltip
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5242
2020-08-18 22:42:21 -04:00
Jon Evans a36d30656f Fix selection/highlighting of Default netclass 2020-08-18 22:19:25 -04:00
Jon Evans 4cd13c3867 Fix focus handling on appearance panel
wxScrolledWindow doesn't like to give up its focus events,
use wxScrolledCanvas instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5251
2020-08-18 21:55:45 -04:00
Jon Evans 17066134f4 Fix brightness factor application for selected items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5236
2020-08-18 20:55:41 -04:00
Jon Evans eb9756840d Better defaults for brightness factors
Also store them in the JSON so they can be tweaked
2020-08-18 20:55:39 -04:00
Ian McInerney 8bca145b75 Initialize the PCB_LAYER_T enum in the property manager
Since all the property descriptions are static initialization, each instance
should contain the code to initially populate the enum if it is empty,
otherwise an assert is thrown warning the enum may be empty.
2020-08-18 22:42:56 +01:00
Jeff Young f2a902c0b1 Remove extraneous drag actions. 2020-08-18 19:05:30 +01:00
Jeff Young 1711b489b6 Dark-mode proof the undefined colour swatch. 2020-08-18 19:05:30 +01:00
Jeff Young 1cce03acb1 Commenting and formatting. 2020-08-18 19:05:30 +01:00
Wayne Stambaugh e2bdd34d82 Fix overzealous delete from previous commit. 2020-08-18 13:34:48 -04:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Seth Hillbrand 4cc820f550 PNS: skip hulls for layers where the solid isn't
If we don't have an object on the required layer and there isn't a
through-hole (m_alternateShape), then we shouldn't return a hull

Fixes https://gitlab.com/kicad/code/kicad/issues/5233
2020-08-18 06:53:03 -07:00
Marek Roszko 294de666a4 Don't update msgpanel while dragging zone points 2020-08-18 13:11:47 +00:00
Marek Roszko d2086eecdd Don't update panel while drawing a dimension 2020-08-18 13:11:47 +00:00
Marek Roszko 73b2a10cab Don't try updating msgpanel while segments. 2020-08-18 13:11:47 +00:00
Marek Roszko a417da4ce0 Split selecteditemmodified to a selecteditemmoved to reduce updatemsgpanel spam 2020-08-18 13:11:47 +00:00
Marek Roszko 3696064f6f Don't post update events twice and on motion for movement of items
Fix #4880
Fix #4741 (hopefully)
2020-08-18 13:11:47 +00:00
Marek Roszko a0956fbf97 text tool: msgpanel on motion is the same as msgpanel on not moved text.... 2020-08-18 13:11:47 +00:00
Jon Evans 96f4e8f6f8 Remember the last active tab on the appearance panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5216
2020-08-17 22:06:31 -04:00
Jon Evans ab7c96f672 Pass focus back to canvas from appearance panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5225
2020-08-17 21:57:49 -04:00
Jon Evans 3c66f932bf Synchronize flip board checkbox
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5224
2020-08-17 21:48:11 -04:00
Jeff Young 88d76eaf62 Enforce Apple's destructive button distance guideline.
Also fixes a few errant icon buttons that were still setting a fixed
size.
2020-08-17 23:55:31 +01:00