Commit Graph

9937 Commits

Author SHA1 Message Date
jean-pierre charras 2335a58f5d DIALOG_FOOTPRINT_XX_EDITOR: fix incorrect position of checkboxes.
In 3D settings panels, due to a bug in wxWidgets 3.1.4, the checkboxes
controlling the 3D model visibility were not correctly put at the right Y position
2020-09-08 16:11:00 +02:00
Jon Evans 3d5b216d1d Allow rectangles to be converted to lines 2020-09-08 08:41:33 -04:00
Jeff Young b205c01c5b Add comments. 2020-09-08 11:02:09 +01:00
Jeff Young 9ea96ee64e Update pad layer testing for selectability.
My only guess is the old code predated the introduction of
GetLayerSet().  In any case it was long-winded and still didn't
catch the case of being on copper layers other than front or back
(which might be hidden).
2020-09-08 11:02:09 +01:00
Jon Evans e0f08338a8 Keep collapsible panes from stealing focus 2020-09-07 21:11:58 -04:00
Tomasz Wlostowski 54ca66be72 router: NODE::AllItemsInNet() can now filter by item type 2020-09-08 01:31:42 +02:00
Tomasz Wlostowski 70beca164f PCB_RENDER_SETTINGS: added SetZoneDisplayMode() method 2020-09-08 01:31:42 +02:00
Tomasz Wlostowski 91ce549e63 PCB_EXPR_EVALUATOR: added isMicroVia() and isBlindBuriedVia() built-in methods 2020-09-08 01:31:42 +02:00
Tomasz Wlostowski 2c1bd645b2 pcbnew: initial support for GetEffectiveShape() for zones and modules 2020-09-08 01:31:42 +02:00
Tomasz Wlostowski f2338d9faa router: fix segfault with NPTH holes in COMPONENT_DRAGGER 2020-09-08 01:31:42 +02:00
Jon Evans 147540b3bb ADDED: Control to only show ratsnest for visible layers 2020-09-07 16:43:43 -04:00
Jeff Young 5ec18aaf2a Fix board initialization error which left FPEdit without inner layers. 2020-09-07 21:01:42 +01:00
Jon Evans 11e61db03d Don't change preview notebook selection when editing
This causes focus change (on GTK at least), plus the user might
not want the notebook to change in the first place.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5477
2020-09-07 12:08:40 -04:00
Jon Evans e3ff3a2d15 Make sure nets display when first loading a board 2020-09-07 12:02:18 -04:00
Jon Evans 4433259c80 Fall back on copper color when net color is not found
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5540
2020-09-07 11:51:55 -04:00
Jon Evans d6be0be177 Skip migration if target key is missing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5536
2020-09-07 11:43:12 -04:00
Michael Kavanagh ad1ef9f4c9 Pcbnew: Enable resize of net inspector columns
Fixes https://gitlab.com/kicad/code/kicad/issues/5467
2020-09-07 05:34:37 +00:00
qu1ck 636285311e Make DRAWSEGMENT::GetRectCorners return vector
... instead of modifying the argument.
This will make the method usable in python API and will not incur
permormance penalty because named return value optimization (NRVO)
is a thing since C++11.
But even if copy is not elided vector is moved instead of copied.
https://en.cppreference.com/w/cpp/language/copy_elision
2020-09-07 05:33:10 +00:00
Jon Evans 758a4c26d5 Switch appearance panel to custom collapsible pane widget
The new widget looks the same on all platforms and fixes a few
bugs with the wxWidgets version
2020-09-06 22:43:39 -04:00
Seth Hillbrand 7e2a6a9b64 Block undo/redo while editing points
We need to keep a stable board while modifying items.

Fixes https://gitlab.com/kicad/code/kicad/issues/5533
2020-09-06 15:30:38 -07:00
Jeff Young a1e8ecc616 Beat wxWidgets into submission.
Fixes https://gitlab.com/kicad/code/kicad/issues/5534
2020-09-06 22:38:23 +01:00
Seth Hillbrand 8648a074da Ensure ZONEs use copy CTOR for super-class
If we don't uniformly use the copy CTOR, we miss the additional
properties held by the superclass.

This also adds additional crash protection in GetMsgPanelInfo for zones
although it should never be triggered

Fixes https://gitlab.com/kicad/code/kicad/issues/5530
2020-09-06 08:34:39 -07:00
Jeff Young 1be1205734 Repair missing checkVisibilityOnly test.
Fixes https://gitlab.com/kicad/code/kicad/issues/5516
2020-09-05 19:12:07 +01:00
Jeff Young adfcdc89af Repair parent pointer after SwapData() nukes it.
Fixes https://gitlab.com/kicad/code/kicad/issues/5523
2020-09-05 18:51:56 +01:00
Jeff Young 5b81c6c70f Fix typo. 2020-09-05 18:51:19 +01:00
Jeff Young e782794f96 Flesh out object properties and DRC Rule syntax help. 2020-09-05 17:44:59 +01:00
qu1ck 3dbebda168 Fix GetCustomShapeAsPolygon and add a unit test
Fixes #5497
2020-09-04 20:30:54 -07:00
Ian McInerney f28b60896c Allow toolbar items to cancel tools when pressed
There was a regression in v6 where the zoom to selection toolbar
item wasn't canceling the tool when pressed and the tool was active
(it was in v5). This implements a more generic framework for canceling
tools on button presses.

Fixes https://gitlab.com/kicad/code/kicad/issues/5103
2020-09-05 01:49:38 +01:00
Jeff Young 7893af2c60 insideArea should be outline-based, not fill-based.
Fixes https://gitlab.com/kicad/code/kicad/issues/5499
2020-09-05 00:25:19 +01:00
Jeff Young d0d13766ae Use the layerSettings vector, not map. Map may not yet be valid.
Fixes https://gitlab.com/kicad/code/kicad/issues/5505
2020-09-04 23:02:41 +01:00
Jeff Young f1f8f746f4 Also resolve worksheet textVar refs in DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/5506
2020-09-04 21:55:10 +01:00
Jeff Young 5e9ec82642 Correctly resolve textVar refs in worksheet items in ERC.
Also fixes a null-ptr bug in DRC.

Fixes https://gitlab.com/kicad/code/kicad/issues/5506
2020-09-04 21:38:07 +01:00
Jeff Young 08dee31d9e Try and unify the background colors between panels and platforms.
Also moves to WX_GRID to get rid of some wxGrid bugs, and moves the
provision of attrs to the GRID_TABLE (as those applied to the grid
are ignored when a table is specified).

Fixes https://gitlab.com/kicad/code/kicad/issues/5260
2020-09-04 20:47:50 +01:00
jean-pierre charras 2babcd5936 Do not translate debug strings 2020-09-04 20:29:22 +02:00
Jeff Young 800d8acb00 Reinstate collapsable controls in Appearances widget.
Also tries to fix highlighting on BOTH OSX and GTK (previuos efforts
have all worked only on one or the other).
2020-09-04 17:45:07 +01:00
Jeff Young 2736becb8b Fix typo in Toggle Layers action and add descriptions to hotkeys lists.
Fixes https://gitlab.com/kicad/code/kicad/issues/5494
2020-09-04 17:45:07 +01:00
Jeff Young ec576b5dfa DRC checks need to be done on current layer.
Don't be fooled by the name "segment".  It might be a via which is
on multiple layers....

Fixes https://gitlab.com/kicad/code/kicad/issues/5503
2020-09-04 15:05:03 +01:00
jean-pierre charras 0bd6e5d96e FIELDS_GRID_TABLE and TEXT_MOD_GRID_TABLE: fix incorrect position of checkboxes
This is an issue specific to wxWidgets 3.1.4
2020-09-04 15:41:51 +02:00
Jeff Young a728abe63c Simplify appearances controls presentation.
Fixes some OSX bugs in panel background colouring.
Also adds a bit info to control titles.

Fixes https://gitlab.com/kicad/code/kicad/issues/5260
2020-09-04 14:07:42 +01:00
Jeff Young 8ffad4b375 Only override color if net or netclass color is set.
Fixes https://gitlab.com/kicad/code/kicad/issues/5368
2020-09-04 14:07:42 +01:00
Jeff Young 007580c4b8 ADDED pad:pin checks for DRC "Test footprints against schematic". 2020-09-04 14:07:42 +01:00
Seth Hillbrand 91914f1a71 Reverts premature Python 3 calls in favor of backwards compat.
This reverts commits d8d8f4f670
and 9614f6d0d9.
2020-09-03 20:05:38 -07:00
Jon Evans 686311f0b4 Make sure to show newly-enabled layers when changing board setup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5478
2020-09-03 18:05:29 -04:00
Jeff Young 3573c8b967 ADDED hotkey for comment/uncomment line(s) in Scintilla.
Useful primarily for DRC Rules editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/5480
2020-09-03 20:37:05 +01:00
Jeff Young 555b78e7ca Read/write COLOR4D::UNSPECIFIED in netinfo so you can clear colors.
Fixes https://gitlab.com/kicad/code/kicad/issues/5368
2020-09-03 20:35:38 +01:00
Jeff Young d1006138fd ADDED holeWallPlatingThickness to AdvancedCfg.
Used for zone filling and DRC hole collision testing.  Allows us to
calculate the actual hole size from the finish hole size.

Fixes https://gitlab.com/kicad/code/kicad/issues/5468
2020-09-03 16:00:07 +01:00
Jeff Young e535489a0a Pad settings need to be copied to both master *and* edited pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/5447
2020-09-03 15:03:09 +01:00
Jeff Young eccb1e612e Refresh net annotations on tracks, pads, etc. when name changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/5466
2020-09-03 15:03:09 +01:00
Jeff Young 8609180406 Add all non-shape properties to dummy hole pad.
This is required in case there are DRC Rules that are matching against
the properties.  It also allows any local clearance overrides to take
effect.

Fixes https://gitlab.com/kicad/code/kicad/issues/5468
2020-09-03 15:03:09 +01:00
Jeff Young b0081606f7 Fix crash bug in Select All / Delete.
We only expect footprint edge selections in the Footprint Editor.
They cause PCBNew's undo architecture to wrap itself in knots.
2020-09-03 15:03:09 +01:00
Jeff Young 38e9217d54 Consolidate all DRC epsilon/threshold values to a single advancedCfg setting.
Fixes https://gitlab.com/kicad/code/kicad/issues/5464
2020-09-03 15:03:09 +01:00
Jeff Young 450519a4bd Sometimes a DRAW_PANEL_GAL wants its immediate parent and sometimes not.
For instance, we get things like high-contrast-mode from the pad
dialog when rendering a pad preview, but we want the colours from the
parent PCB_BASE_FRAME.
2020-09-03 15:03:09 +01:00
Jeff Young 9a8dd6312b Fix formatting. 2020-09-03 15:03:09 +01:00
Seth Hillbrand 8751a55651 Tightening up the title bar display
Eeschema was the only application showing the file path.  This is of
limited use and prevented other information from showing in the
shortened menubar display.  Also combined strings for better translation
2020-09-03 06:59:37 -07:00
Seth Hillbrand d6a4ab0eec Shortening filenames in titlebar
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2096
2020-09-03 06:38:34 -07:00
Michael Kavanagh de03d3d427 Application title bar: app name after filename
Fixes https://gitlab.com/kicad/code/kicad/issues/2096
2020-09-03 06:35:48 -07:00
Jeff Young 70b74b1fcd Add comment syntax to Rule Syntax Help
Fixes https://gitlab.com/kicad/code/kicad/issues/5458
2020-09-02 15:21:51 +01:00
jean-pierre charras eb16fec7ec Footprint wizards: fix some issues due to C++ code change.
Some constants were renamed, breaking some wizards.
2020-09-02 15:45:20 +02:00
Jon Evans 2198f8666c Fix typo in preset switcher 2020-09-01 21:27:57 -04:00
Ian McInerney cb36006406 First round of cleanup for the PCB groups
ADDED: Leave group action

Fixes https://gitlab.com/kicad/code/kicad/issues/5299
2020-09-02 02:10:26 +01:00
Ian McInerney 4ca7993382 Give new footprint libraries a dummy name in the file dialog
If they don't have a dummy name, then GTK will display the regex
for the extension in the dialog.

Fixes https://gitlab.com/kicad/code/kicad/issues/5365
2020-09-02 00:10:25 +01:00
Ian McInerney 84fb024b9d Fix array creation in the autoplacement tool
Fixes https://gitlab.com/kicad/code/kicad/issues/5424
2020-09-02 00:10:25 +01:00
Jeff Young ac73c99842 Code completion for netclasses and netnames.
Fixes https://gitlab.com/kicad/code/kicad/issues/5441
2020-09-01 18:36:58 +01:00
jean-pierre charras 9fdadcbcf5 EDA_BASE_FRAME::windowClosing( wxCloseEvent& event ): fix incorrect behavior.
windowClosing() calls Destroy() when the wxCloseEvent has no veto.
This is fine for usual EDA_BASE_FRAME frames, but not for frames shown in modal mode.
In modal mode, windowClosing() should not call Destroy(), because the calling frame
expects the instance not deleted after closing.
(the caller has to call Destroy() only once the frame can be actually deleted)
2020-09-01 17:46:17 +02:00
Mark Roszko 9f128f942c Move shutdown blocker to kiplatform 2020-09-01 10:14:51 +00:00
jean-pierre charras 756d6a123b FOOTPRINT_WIZARD_FRAME: fix a crash when opening the frame.
LoadSettings() was using the gal canvas, but the gal canvas was not created
when calling LoadSettings().
2020-09-01 09:32:05 +02:00
Mark Roszko a9532c2fa1 Add browse button to footprint 3d settings
Add normalization to 3d settings and footprint library table editor
2020-09-01 02:00:38 +00:00
Jeff Young 6e72f609f0 Make sure router and via tools update when sizes change.
Also adds a size menu to the context menu for the Via tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/5321
2020-08-31 23:33:02 +01:00
Jeff Young 2697fc3864 Remove canvas-switching from OSX.
The Cairo renderer doesn't work on Retina displays.

Fixes https://gitlab.com/kicad/code/kicad/issues/4788
2020-08-31 18:48:25 +01:00
Jeff Young 452171e055 Remove more dead code (mostly includes). 2020-08-31 17:29:44 +01:00
Jeff Young 6488260185 Fix another signed/unsigned compare which will never work. 2020-08-31 17:29:44 +01:00
Jeff Young cfdf818878 Remove long-dead vestiges of DRC checks on Edit Tracks and Vias. 2020-08-31 17:29:44 +01:00
Michael Kavanagh 108936079b Fix default hotkey clash on "Delete Full Track"
Fixes https://gitlab.com/kicad/code/kicad/issues/3710
2020-08-31 15:48:29 +00:00
Jeff Young 1fa96b794a Update some strings for Appearance manager.
Fixes https://gitlab.com/kicad/code/kicad/issues/5431
2020-08-31 16:38:11 +01:00
Jeff Young 88635ee5b6 Clean up error messages.
Convert a lot of nags to InfoBar errors/warnings/messages, and some
that never should have been exposed to wxFAIL_MSGs.
2020-08-31 14:19:57 +01:00
Jeff Young 35a1b8a353 Remove error reporting which throw up GUI from plugin.
It's reporting a class of error (reference to non-existing net)
which could happen in a variety of other ways that aren't reported.
The correct thing to do is to alwasy run DRC.
2020-08-31 14:11:59 +01:00
Jeff Young 6b46c9b8be This error is no longer meaningful with UUIDs. 2020-08-31 14:10:39 +01:00
Jeff Young 091f769106 Add infobar error message for Autoplace when board not defined.
Fixes https://gitlab.com/kicad/code/kicad/issues/5425
2020-08-31 12:54:45 +01:00
Jeff Young d0479eb92c Fix signed/unsigned comparison that was destined to fail. 2020-08-31 12:53:15 +01:00
Jon Evans 8945f8865b Add PCB_LAYER_IDs to LayerName() and reformat for readability
LayerName() can now be called to get the default, translatable name
for any board layer.  LSET::Name() is used for the untranslated
names required for parsing board files.
2020-08-30 20:20:45 -04:00
Jon Evans 7a5c99ee0f Tweak the mouse-based posture solver
Add an epsilon to reduce flutter
Add a lock after a certain distance
Forget the old trail when unlocking

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5381
2020-08-30 19:54:09 -04:00
Jeff Young 14a9c8dc42 Fix printing for introduction of zone layers and meta items.
Fixes https://gitlab.com/kicad/code/kicad/issues/5298
2020-08-30 22:49:27 +01:00
Jon Evans 9f7bca38b3 A better way of handling standalone project files 2020-08-30 16:04:39 -04:00
Jeff Young 3f1f89405e Removed unused datastructure in auto-router.
May (or may not) have some effect on #5424.

Fixes https://gitlab.com/kicad/code/kicad/issues/5424
2020-08-30 20:22:53 +01:00
Jeff Young c073749a5c Update clipboard format (host -> generator).
Fixes https://gitlab.com/kicad/code/kicad/issues/5413
2020-08-30 15:20:59 +01:00
Jeff Young 305abb210f Add a mode to allow zone smoothing to produce external fillets.
Fixes https://gitlab.com/kicad/code/kicad/issues/5306
2020-08-30 15:20:59 +01:00
Jeff Young 5be39c6299 Remove horizontal scrollbars from nets in appearances panel.
They're not really appropriate for a panel and the grid one (at
least) perturbs a bug in wxWidgets scroll space calculation).

Fixes https://gitlab.com/kicad/code/kicad/issues/5239
2020-08-30 15:20:59 +01:00
Fabien Corona 4a0d6297ab pcbnew: Add an alternate edit method for arcs
The alternate edit methods keeps the radius constant

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5369
2020-08-29 22:59:11 +00:00
Jeff Young cc64709407 Reimplement skip-parent-page to work with MacHack.
This prevents the "leaking" pages where the layers panel is shown
in the background of all other panels.

Fixes https://gitlab.com/kicad/code/kicad/issues/5182
2020-08-29 20:53:53 +01:00
Jeff Young 12926723d7 Add file omitted from an earlier commit.
Fixes https://gitlab.com/kicad/code/kicad/issues/5407
2020-08-29 20:13:41 +01:00
Jeff Young c241b0716a Fix wxWidgets assert.
Fixes https://gitlab.com/kicad/code/kicad/issues/5407
2020-08-29 17:26:48 +01:00
Jon Evans 37b2ba1363 Fix missing board outline in All Copper Layers preset 2020-08-29 12:13:59 -04:00
Jon Evans fa8655511e Enable converting segments to arcs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1957
2020-08-29 12:13:51 -04:00
Jon Evans a390b19f97 Move actions around 2020-08-29 10:43:05 -04:00
Jon Evans 19832c7599 ADDED: Tool for converting shape types in PcbNew
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2406
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2507
2020-08-28 21:16:06 -04:00
Jeff Young 56a531109a Don't try and shrink shapes generated from pads.
It ends up being different from shrinking the final outline.
2020-08-28 20:48:47 +01:00
Seth Hillbrand 691c33e003 Don't export libid with footprints
We use the LIBID for board files to locate the correct library for the
footprint.  Once exported, the footprint should be associated with the
library that contains it, if any.

Fixes https://gitlab.com/kicad/code/kicad/issues/5400
2020-08-28 12:33:13 -07:00
Seth Hillbrand 4e08ec79dc pcbnew: Don't skip adjacent points
std::make_reverse_iterator already accounts for the difference in
directional representation

Fixes https://gitlab.com/kicad/code/kicad/issues/5392
2020-08-28 11:53:54 -07:00
Julian Fellinger dcf058d91e added vrml export via python api 2020-08-28 16:41:09 +00:00
Jeff Young beb370a3e5 Another typo. 2020-08-28 14:42:30 +01:00
Jeff Young f005977aab Minor simplification to custom colour theme GUI for print/plot dialogs. 2020-08-28 14:15:58 +01:00
Jeff Young ebb9a636fa Handle differential x:y clearance for solder mask.
Fixes https://gitlab.com/kicad/code/kicad/issues/5363
2020-08-28 14:00:37 +01:00
Jeff Young 5c67ee6c9d Fix typo. 2020-08-28 11:06:55 +01:00
Jeff Young 1caaf62454 Fix typo. 2020-08-28 11:05:58 +01:00
Jeff Young 9e12ea9bb6 Cleanup some dead code and make better use of iterators.
Also applies coding style around auto and lambdas.
2020-08-28 11:05:58 +01:00
Jeff Young 8b7c0cbe04 Adjust footprint zones while dragging footprint. 2020-08-28 11:05:58 +01:00
Jeff Young e7db43285f ADDED new footprint fabrication attributes.
This commit also adds mapping of the new symbol properties
"exclude from BOM" and "exclude from board" to be correctly
handled in Update Board from Schematic.

Fixes https://gitlab.com/kicad/code/kicad/issues/2399

Fixes https://gitlab.com/kicad/code/kicad/issues/4643

Fixes https://gitlab.com/kicad/code/kicad/issues/2233
2020-08-28 11:05:58 +01:00
Jeff Young b8aee85b94 Don't drop selection on an undo/redo.
We want to be able to restore it back to the way it was.

Fixes https://gitlab.com/kicad/code/kicad/issues/5356
2020-08-28 11:05:58 +01:00
Jeff Young 4e885990b8 Don't keepout a keepout's own footprint.
Fixes https://gitlab.com/kicad/code/kicad/issues/5371
2020-08-28 11:05:58 +01:00
Seth Hillbrand e665ad811d pcbnew: Remove 'host' compile info from header
The 'host' tag causes issues with revision control when editing files on
two different machines with the same KiCad version but different builds.
This replaces the host tag with a simpler 'generator pcbnew' pair that
does not include build data.
2020-08-27 11:57:50 -07:00
Seth Hillbrand 1e461c2259 ADDED: Improved center point dragging
The center point on polygons now maintains the axis of the dragged line
and, optionally with Ctrl pressed, maintains the slope of the adjacent
segments as well.

This also fixes a longstanding issue that prevented the ctrl-snapping
from using the original point rather than the last updated point when
constraining.

Fixes https://gitlab.com/kicad/code/kicad/issues/2465
2020-08-27 10:34:12 -07:00
Seth Hillbrand a08c5c67e3 pcbnew: Get correct default parameter from settings
Corrects courtyard default width when read from settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/5384
2020-08-27 06:14:21 -07:00
Seth Hillbrand 0dc0536cbf pcbnew: Fix Select All copy-pasta
Adds condition to footprint editor and corrects condition for both
modedit and pcbnew
2020-08-26 17:19:32 -07:00
Jon Evans dc7e1783b3 Make sure a project is loaded at all times
For now, much of KiCad depends on Prj() working, so when we
are asked to unload a project, immediately load the null project
so that nothing breaks.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5374
2020-08-26 18:37:34 -04:00
Seth Hillbrand 3e754e0378 Teach PNS to respect PTH pads on single layers
This is a valid configuration for some single layer boards (e.g.
high-power LEDs) so we should ensure that PNS doesn't allow connections
to those layers without pads.
2020-08-26 18:09:06 +00:00
Seth Hillbrand f4e8c194be Revise restriction on No Copper setting
This allows the user to specify a NPTH with "No Copper", allowing a pad
to retain the mask layer without a copper landing.

Fixes https://gitlab.com/kicad/code/kicad/issues/3407

Fixes https://gitlab.com/kicad/code/kicad/issues/5237
2020-08-26 18:09:06 +00:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Reece R. Pollack 0b56dc09a6 EXPERIMENTAL: Origin transform of class DRAWSEGMENT 2020-08-26 17:54:22 +00:00
Reece R. Pollack a9c835275a Apply display origin transforms in Pcbnew dialog classes
This commit applies display origin transforms to all Pcbnew
dialog classes that use UNIT_BINDER for their formatting:

  * DIALOG_CREATE_ARRAY
  * DIALOG_FOOTPRINT_BOARD_EDITOR
  * DIALOG_GRAPHIC_ITEM_PROPERTIES
  * DIALOG_GRID_SETTINGS
  * DIALOG_MOVE_EXACT
  * DIALOG_PAD_PROPERTIES
  * DIALOG_POSITION_RELATIVE
  * DIALOG_TEXT_PROPERTIES
  * DIALOG_TRACK_VIA_PROPERTIES
2020-08-26 17:54:22 +00:00
Reece R. Pollack 6f1204cfd7 Add Display Origin Transforms support to the PCB_BASE_FRAME class
This commit adds support for display origin transforms to the PCB_BASE_FRAME
class. This instantiates a PCB_ORIGIN_TRANSFORMS object, and overrides the
GetOriginTransforms method in the EDA_DRAW_FRAME class to reference it.

The formatting of the status line has been updated to display coordinates
relative to the user-selected origin, and with the coordinates increasing
in the user-selected direction.
2020-08-26 17:54:22 +00:00
Reece R. Pollack af218a5dc0 Add the PCB_ORIGIN_TRANSFORMS class
This commit adds the PCB_ORIGIN_TRANSFORMS class, which is derived
from the ORIGIN_TRANSFORMS class, and provides a set of templated
functions to convert PCB coordinates between internal representation
and display representation. It extends the ORIGIN_TRANSFORMS class
to understand the three user-selectable display origins and the
coordinate direction display options.
2020-08-26 17:54:21 +00:00
Reece R. Pollack 5a5d99b018 Add Pcbnew Display Origin Transforms preferences panel
This commit adds support for the Display Origin Transforms preferences
selection panel. This panel allows the user to select the desired
coordinate origin, and the direction in which the axes increase.
2020-08-26 17:54:21 +00:00
Reece R. Pollack b483fd32a6 Support save/restore/upgrade of PCB Display Origin Transforms settings
This commit modifies PCBNEW_SETTINGS to add support for saving and
restoring the user's display origin transform settings. It also adds
support for converting these settings from the 5.x format to the
current format, for anyone who used the tech demo of this feature.
2020-08-26 17:54:21 +00:00
Reece R. Pollack 2895d664e6 Add Display Origin Transform data to the PCB_DISPLAY_OPTIONS class
This commit adds the user configuration options to support display
origin transforms to the PCB_DISPLAY_OPTIONS class. This data is
configured by the "Origins & Axes" preferences panel added in a
later commit.
2020-08-26 17:54:21 +00:00
Jeff Young a55eaec28c If it's modal then we don't own the window. Just DismissModal().
Fixes https://gitlab.com/kicad/code/kicad/issues/5355
2020-08-25 23:32:17 +01:00
Jeff Young b863beaaf6 Make tracks respond to stingy selections like everything else.
Fixes https://gitlab.com/kicad/code/kicad/issues/5332
2020-08-25 20:10:56 +01:00
Jeff Young 996ea4d5f9 Performance improvements for zone filling.
Remove extraneous simplify calls.

Fixes https://gitlab.com/kicad/code/kicad/issues/3812
2020-08-25 20:10:14 +01:00
Jeff Young 6d12859c14 Give up on trying to get Clipper's miter strategies to work.
Instead, make sure we remove the clearance holes and outline at
the end so that copper isn't allowed to "spill" into areas it
shouldn't be in.

Also fixes a bug where the Advance Cfg defaults weren't getting
loaded when the file didn't exist.

Fixes https://gitlab.com/kicad/code/kicad/issues/3812

Fixes https://gitlab.com/kicad/code/kicad/issues/5306
2020-08-25 19:07:37 +01:00
Seth Hillbrand adff7f749b PNS: Addition layer smarts
Edge.Cuts have no parent but cross all layers, so we need to handle the
"all layers" case.  Also renames "IsPadOnLayer" to "IsOnLayer".

Fixes https://gitlab.com/kicad/code/kicad/issues/5351
2020-08-25 09:42:50 -07:00
Jeff Young 1138c32bf3 Don't pass Cancel event where there was a specific action cancelled.
For instance, if during a move the user hits ESC they only want the
move cancelled, not (for instance) the selection dropped.

Fixes https://gitlab.com/kicad/code/kicad/issues/5356
2020-08-25 12:54:40 +01:00
Seth Hillbrand 35eda030a2 pcbnew: Ensure we are cloning pads
When calling MODULE::Clone() we need to clone the pads as well or we
will end up with scm churn when running undo/redo operations
2020-08-24 19:40:08 -07:00
Jon Evans 24435fcc62 Don't create new project files when opening boards/schematics
Display warning infobar in the board/schematic setup when no project
is loaded, since most of the settings in those dialogs are saved in
the project and not in the board/schematic file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4868
2020-08-24 22:17:21 -04:00
Jon Evans eda0f1a27f Remove broken RefreshRect; it doesn't seem to add much 2020-08-24 21:32:04 -04:00
Jon Evans 5e2946ef90 Use full net names in netclasses
Short net names are not unique; full names with paths must be used.
Added a grid cell renderer that does the escaping, to make it easier
to display net names in grid cells.

Once you unescape a net name, you can't go back to the escaped form
because you can't assume which `/` should be {slash} and which `/`
Because of this, we cannot use Unescape/Escape on the data model in
the netclass setup panel, and instead do the Unescape in the view.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5331
2020-08-24 21:19:07 -04:00
Jon Evans 1efd512847 Remove unnecessary event handler binding
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5341
2020-08-24 19:59:16 -04:00
Jon Evans 67a5ed15c7 Make sure appearance panel builds after project has been loaded
OnBoardChanged must run after LoadProjectSettings.
Move the local overrides to PCB_EDIT_FRAME::onBoardLoaded
so that they are run after the panel is initialized.
2020-08-24 19:39:18 -04:00
Jon Evans e9b8cac320 Erase net colors when they are reset by the user
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5342
2020-08-24 19:39:18 -04:00
Jon Evans f8609ed603 Don't hide swatches when setting netclass color
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5343
2020-08-24 19:39:18 -04:00
Jeff Young 15c136ead2 Make a bunch of help dialogs modeless.
Fixes https://gitlab.com/kicad/code/kicad/issues/5334
2020-08-24 23:17:33 +01:00
Jeff Young b8bbe72e48 Another attempt to fix the select-reference-point toolstack thing.
This time remove the push/pop from the picker tools as that's
responsible for the issue of trying to re-activate the move action
when its popped.  Instead do the push/pop from the client code
of other actions that need it, and not at all from the move-with-
reference action.

Fixes https://gitlab.com/kicad/code/kicad/issues/5336
2020-08-24 22:47:24 +01:00
Jeff Young 50b182574d Missing change from last commit. 2020-08-24 21:59:43 +01:00
Jeff Young 5a0db6802a Use IsOnLayer(); GetViewLayers() now returns synthetic ZONE layers.
Also uses IsPadOnLayer() for pads so that it will drop layers which
have had their pads removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5349
2020-08-24 20:20:04 +01:00
Jeff Young a4ff339a1e Clear toolstack after cancel.
Fixes https://gitlab.com/kicad/code/kicad/issues/5336
2020-08-24 19:28:53 +01:00
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
Jeff Young e6a0732e64 Minor cosmetic issues. 2020-08-17 23:55:31 +01:00
Jeff Young 66ff16dd3d Better board-edge error reporting.
Fixes https://gitlab.com/kicad/code/kicad/issues/4950
2020-08-17 23:55:31 +01:00
Jeff Young 01eb8ad032 Better handling of excluded layers for Color Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/5184
2020-08-17 23:55:31 +01:00
Jeff Young 8234e70e77 Remove unused footprint text front & back colours. 2020-08-17 23:55:31 +01:00
Ian McInerney e825a99b9a Consolidate some UI conditions from context menu enabling
These conditions are for enabling/disabling a control,
so place them inside the new UI conditions framework instead
of the separate update routine.
2020-08-17 23:21:25 +01:00
Jeff Young aceed2b0a4 Cleaner look for colour swatches and the undefined colour. 2020-08-17 18:31:20 +01:00
Seth Hillbrand 5c3a1d059e Fix memory mgmt issue with SOLID shapes
We don't delete items from the CTOR but we do need to check if they
exist in the incoming SOLID before cloning

Fixes https://gitlab.com/kicad/code/kicad/issues/5214
2020-08-17 06:16:11 -07:00
Ian McInerney cff76e55d5 Only update the layer icon bitmap when it has actually changed
This was causing unnecessary calls to refresh the toolbar, causing
flickering in the layer widget.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5212
2020-08-17 12:37:25 +01:00
jean-pierre charras 5b365053db Fix a few I18n issues.
Especially, only ASCII7 chars can be used in messages.
Do not mark debug messages as I18n strings
2020-08-17 09:18:49 +02:00
Michael Kavanagh b06e605255 Remove duplicate code in Eagle PCB plugin 2020-08-17 03:02:44 +00:00
Jon Evans 595ea70b0f Don't rebuild on page change in MSW
This bug appears to not happen on MSW, so we can avoid the refresh

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5210
2020-08-16 18:42:50 -04:00
Jeff Young fd53df6f10 Collapse space out of the presets area.
Hopefully this will save us from conditional compilation as the
OSX spacing here is wildly different from GTK.
2020-08-16 22:22:47 +01:00
Jeff Young 1134d99bb7 Repair some more merge conflicts. 2020-08-16 22:22:47 +01:00
Seth Hillbrand 0debaa5866 Update selection ratsnest should do slow updates sometimes
When rotating/mirroring/etc, the selection ratsnest should be
recalculated to keep the lines correctly connected for the fast tree
move.

Fixes https://gitlab.com/kicad/code/kicad/issues/5194
2020-08-16 13:31:50 -07:00
Jon Evans 126565cbed Fix visibility control for Default netclass 2020-08-16 15:43:14 -04:00
Seth Hillbrand afc94fdec3 PNS: Be better about handling multiple layers
Rather than adding pads/vias multiple times for each layer, we introduce
the "alternate shape" idiom to PNS that allows us to optionally place
the collision constraint on the hole instead of the pad for those
vias/pads that have inner layers removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5158

Fixes https://gitlab.com/kicad/code/kicad/issues/5198

Fixes https://gitlab.com/kicad/code/kicad/issues/5195
2020-08-16 12:39:15 -07:00
Ian McInerney 4491f24d5e Ripout the old SyncToolbars infrastructure reminants
The tool framework no longer needs to request updates of the UI
state for the controls, wxWidgets will do it for us.
2020-08-16 19:10:26 +00:00
Ian McInerney 75cdf9df4e Don't say the board must be empty to be modified
It is possible to empty a full board and have modifications that
should be saved.

Fixes https://gitlab.com/kicad/code/kicad/issues/3739
2020-08-16 19:10:26 +00:00
Ian McInerney e8b11c911e Migrate Pcbnew/footprint viewer/footprint editor to the new UI update system 2020-08-16 19:10:26 +00:00
Ian McInerney d19ff3e595 Unify the UI IDs for actions between the menus and toolbars
By unifying the IDs so that an action only has one UI ID,
it will receive only one update event that will work for
all controls using the action.
2020-08-16 19:10:24 +00:00
Jeff Young 15edac4738 Implement a more flexible layout for the objects tab of appearances. 2020-08-16 19:51:26 +01:00
Jon Evans 54682d39ff Remember width of right AUI panel in PcbNew 2020-08-16 14:33:40 -04:00
Jon Evans 92174d414c Ensure pads and zones come up visible by default
These visibility layers didn't exist until now
2020-08-16 10:17:20 -04:00
Jon Evans 6bfb32245b Show the Default netclass in the appearance panel 2020-08-16 09:57:21 -04:00
Jon Evans 7da5419a2c Reduce flicker on layout change in MSW 2020-08-16 09:38:12 -04:00
Jon Evans 1f5a3c57a0 Fix net color radio buttons 2020-08-16 09:32:03 -04:00
Ian McInerney 453976be5e Add cleanup to the new appearance widget
It really should be cleaning up the heap-allocated objects
it owns.
2020-08-16 12:37:51 +01:00
Ian McInerney 25f2a13157 Fix pcbnew/fpedit editing options panel
The panel was incorrectly saving the preferences for the footprint
editor.
2020-08-16 12:37:50 +01:00
Ian McInerney ade7f529b8 Switch shared_ptr creation to using make_shared 2020-08-16 12:37:50 +01:00
Jeff Young 198d9a4243 Fix merge conflicts. 2020-08-16 12:26:15 +01:00
Jeff Young 92322667d6 Fix asserts on later wxWidgets versions.
Fixes https://gitlab.com/kicad/code/kicad/issues/5197
2020-08-16 11:49:36 +01:00
Jeff Young e5f2015a9c More spacing adjustments for appearance manager. 2020-08-16 01:55:09 +01:00
Jeff Young 5938528a16 Move to conditional compilation for appearance palette spacing. 2020-08-16 00:43:19 +01:00
Jon Evans 103443f496 Back out some spacing changes for MacOS
These were too aggressive on other platforms
2020-08-15 19:20:49 -04:00
Jon Evans c124934831 Improve tooltips 2020-08-15 19:07:26 -04:00
Jon Evans 0db00046d1 Fix rendering of net colors on items 2020-08-15 18:50:44 -04:00
Jon Evans beab35472b Fix wrong style for slider
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5197
2020-08-15 18:50:44 -04:00
Jeff Young f83a9c0a22 Clean up some OSX issues in new appearance panel. 2020-08-15 23:26:58 +01:00
Jon Evans 2f604b4494 Add selection filter to footprint editor 2020-08-15 16:42:19 -04:00
Jeff Young 57c3d8e8d8 Make sure preview group gets added to view after a clear. 2020-08-15 21:13:44 +01:00
Jon Evans bd14f8a82a ADDED: New appearance control widget for PcbNew
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls

CHANGED: Simplified object visibilty controls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Jeff Young b42395ec8d Attempt to fix locale issue with decimal separator in rules. 2020-08-15 17:32:13 +01:00
Jeff Young 6c74658a98 Finish arc implementation of m_ThirdPoint for EDGE_MODULEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/5191
2020-08-15 17:32:13 +01:00
Jeff Young 7342532276 Remove auto. 2020-08-15 17:32:13 +01:00
Jeff Young 4410df50a8 Remove layer check that prevents synthetic layer drawing.
In this particular case it was LAYER_PAD_FR.

Fixes https://gitlab.com/kicad/code/kicad/issues/5190
2020-08-15 17:32:13 +01:00
Jeff Young dbb7859b7c Move Eagle routing layer to Dwgs.User (instead of Edge.Cuts).
Fixes https://gitlab.com/kicad/code/kicad/issues/1899
2020-08-15 17:32:13 +01:00
jean-pierre charras e4021a9ffa Fix some I18n issues.
Strings used for debug and strings containing only a print format like "%i"
are not translated
2020-08-15 17:56:32 +02:00
Seth Hillbrand a0c54951db pcbnew: Clean up group move
SetPosition() only changes the base position of tracks, we need to use
Move() to move the whole element.

This also cleans up white space and group handling in ratsnest

Fixes https://gitlab.com/kicad/code/kicad/issues/5188
2020-08-14 19:47:03 -07:00
Seth Hillbrand b8b3d5c16d pcbnew: Remove all threading from dynamic ratsnest
The last remaining threaded operation in dynamic ratsnest was the
recalculation of the dynamic connectivity map.  Because we do not
require any of the extra features of the connectivity map, we can get
away with a lightweight move of the anchors to update the ratsnest.  The
resulting connectivity tree is not valid but it is not needed for the
ratsnest, which only needs a list of nets/anchors.
2020-08-14 17:48:33 -07:00
Jeff Young ec5040aff5 Fix missing 'else' and EOF processing, both of which cause crashes. 2020-08-14 22:11:04 +01:00
Jeff Young 94ef2781bf Allow case-insensitive filtering and filter on keystrokes.
Fixes https://gitlab.com/kicad/code/kicad/issues/5177
2020-08-14 22:11:04 +01:00
Peter Montgomery 672224106c Pcbnew: Adjust soldermask dialog panel to scale properly
Added the wxExpand flag to all wxStatic Text widgets to prevent
text from being wrapped awkwardly under Linux (and possibly other
operating systems).

Made sure all sentences ended with a period.

Corrected some spelling mistakes.

Simplified tooltips to read and display better.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5168

~Also in this commit:
~Rephrased main warning note at top to emphasize get clearance
~settings from your board house.
~Moved two notes at top into tooltips for entry fields
~Removed note that solder mask and paste only apply to copper pads.
2020-08-14 19:51:57 +00:00
Tomasz Wlostowski 9cdada9eb4 PCB_EXPR_EVALUATOR: another string fix for wx 3.0 2020-08-14 14:36:27 +02:00
Seth Hillbrand 027b6c8cf9 Account for via width in connectivity
Fixes https://gitlab.com/kicad/code/kicad/issues/5176
2020-08-13 20:31:17 -07:00
Seth Hillbrand b351bec0d7 Handle blind/buried vias in connectivity 2020-08-13 20:14:23 -07:00
Jeff Young 7a6a6c2272 Reset active layer if it gets deleted in board setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/5118
2020-08-13 20:39:08 +01:00
Jeff Young 519bc80394 Replace error reporting in DRC rule compiler. 2020-08-13 18:47:41 +01:00
Jeff Young 0b17dbd123 Fix nesting issues in the DRC rule expression code generator.
We were executing function calls multiple times because we were
processing them at a depth the traversal algorithm wasn't expecting.
2020-08-13 18:36:10 +01:00
Jeff Young 2c60c4778e Do a layer-specific test only if the zone has the layer we're on.
Otherwise do a outline test (ie: for a keepout which isn't
layer-specific).
2020-08-13 16:16:36 +01:00
Tomasz Wlostowski 518a659185 Post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski 47919cdc54 pcbnew/dialogs: use shared_ptr for RC_ITEM 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski ae5eab1d85 TRACKS_CLEANER: post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski c607a60e3b PCB_EXPR_EVALUATOR: post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski e907e43bd9 pcbnew/drc: post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski d937fadd6f Migrate RC_ITEM to use shared_ptr 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski f6ea753968 pcbnew: implement GetEffectiveShape() for tracks/vias/arcs/texts 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski 59303adaca BOARD_ITEM: assert on unimplemented GetEffectiveShape() 2020-08-13 14:50:59 +02:00
jean-pierre charras e0351b4e4c Zone filler: make new algo (no thickness for filled outlines) the default
Add also a message info to the pcbnew constraints panel for arc to segment
approx min error value.
2020-08-13 10:01:23 +02:00
Jeff Young a407befa4c Fix breakage from layer change.
We have to be careful about processing edges on the Edge_Cuts even
when we're talking about a zone on some other layer.
2020-08-13 00:18:09 +01:00
Jeff Young 0c9d08249f Fix crash where dummy edge doesn't have a valid parent. 2020-08-13 00:07:59 +01:00
Jeff Young e05cd0e914 Raise limit to prevent zooming on cross-probing.
Fixes https://gitlab.com/kicad/code/kicad/issues/5149
2020-08-12 22:28:18 +01:00
Jeff Young 393bb0fd83 Fix assert where geometry routine wasn't ready to handle layers.
This introduces layer handling to a lot of the geometry routines.
Many of them don't do much with it now, but it does help multi-layer
zones and will help when padstacks are implemented.
2020-08-12 22:20:08 +01:00
Jeff Young 463100d67f Remove a long-standing hack to keep divots out of adjacent zones.
The new algorithm unions any adjacent zones before doing the
chamfer/fillet and then subtracts the other zones back out afterwards.

Fixes https://gitlab.com/kicad/code/kicad/issues/3812
2020-08-12 22:20:08 +01:00
Jeff Young a6d44676b3 Move commit handling outside of ZoneFiller.
This allows us to rever the commit on a cancel.

Fixes https://gitlab.com/kicad/code/kicad/issues/5107
2020-08-12 22:20:07 +01:00
Jeff Young fad18dccd5 Make sure board design settings get updated when switching boards.
Fixes https://gitlab.com/kicad/code/kicad/issues/5129
2020-08-12 22:20:07 +01:00
Jeff Young 84425f5a40 Fix crash bug from bad static_cast. 2020-08-12 22:20:07 +01:00
Graham Keeth 9057a46a20 circular pad array wizard: pin 1 optionally square
Add option to make pin 1 rectangular to Circular Pad Array wizard.
Default behavior is unchanged (oval pin 1).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4614
2020-08-12 20:49:55 +00:00
Seth Hillbrand c4de3c8f1a Move mutual capacitance wizard to correct folder 2020-08-12 11:26:01 -07:00
Qbort b41892e4da Rename class GROUP in pcbnew to PCB_GROUP
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5156
2020-08-12 15:36:08 +01:00
Seth Hillbrand d8d8f4f670 Removing extra parameters to super() calls
The extra parameters seem to cause problems for some Python
configurations and are not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/4896
2020-08-12 06:22:45 -07:00
Blake Smith 9614f6d0d9 Fix PadGridArray super call 2020-08-12 06:22:45 -07:00
Seth Hillbrand ab58b67842 Adding triangulation viewing to AC
This adds a helper routine to visualize the quality of our
triangulation.  It also renames an excessively long variable name for
the arc editor
2020-08-12 06:22:45 -07:00
jean-pierre charras eae739d98e ZONE_CONTAINER::TransformSolidAreasShapesToPolygonSet(): for polygons with outline
thickness, use another algo to create shapes mainly used in 3D viewer.
For the 3D viewer, the calculation time to build zones is significantly faster.
2020-08-12 10:13:54 +02:00
Ian McInerney 47f7c616f8 Fix Python environment variable handling
The variables in the common settings struct are only updated on
save, so Python must use the ones from Pgm to get its values.
This does lead to the observation that Python's changes to the
variables do affect KiCad (they can break resolvers). So apparently
it can mess with us but we can't mess with it easily.

Also, improve the environment variable tracing infrastructure to capture
more changes.
2020-08-12 00:14:19 +01:00
Jeff Young d97e519036 Fix typo in regex.
Had to get rid of the regex as Search actually changes the user's
selection, which is not what we want.  (It wasn't earlier because
the search would always fail due to the typo.)

It's much faster now that we're not scanning from the beginning every
time.
2020-08-11 22:04:38 +01:00
Jeff Young bc9723340a Add support for print-as-per-items-tab.
ADDED a print mode which allows the Layers Manager's Items tab to
control the visiblity of various items.

Fixes https://gitlab.com/kicad/code/kicad/issues/3894
2020-08-11 20:42:08 +01:00
Jeff Young 7f65b31cb6 Beautify the PCBNew print dialog.
Mostly fix some uneven spacing, but also indent the color theme
selection under the checkbox which controls it.
2020-08-11 20:42:08 +01:00
Joshua Redstone ee428876ec ADDED: Group/Ungroup function
This implements the group/ungroup functions to mark a set of EDA_ITEMs as a unit, allowing them to be moved and rotated as a unit
2020-08-11 19:37:07 +00:00
Jeff Young f65a0037dc Display violation layer (and select it) for DRC errors.
Fixes https://gitlab.com/kicad/code/kicad/issues/5123
2020-08-11 17:47:39 +01:00
Jeff Young 8b67d5185a Update keepout rule syntax example to something with less "magic". 2020-08-11 15:22:48 +01:00
Jeff Young a0f95855d1 ADDED board repair tool.
Currently it just fixes duplicate UUIDs.
2020-08-11 15:02:27 +01:00
Jeff Young 5ab39b7c06 Clean up reannotation UI. 2020-08-11 15:02:27 +01:00
jean-pierre charras 9c817638d9 ZONE_CONTAINER::TransformSolidAreasShapesToPolygonSet(): fix incorrect transform
For zones filled using the new algo (filled areas without thickness), a outline
with thickness was added, that is incorrect.
Used only in 3D viewer.
2020-08-11 11:49:08 +02:00
jean-pierre charras 29d6fe88f0 3D viewer: do not show via/pad shapes of pads not connected on copper layers.
Show the same vias/pad shapes as plot functions.
2020-08-11 11:26:00 +02:00
PJM a06a0c1236 Fix Pcbnew tree order in "Preferences" tree
Eeschema and Pcbnew display the same dialog panels in a different order
in the 'Preferences' tree.  This code make Pcbnew match the order of
Eeschema.

Fixes issue: https://gitlab.com/kicad/code/kicad/-/issues/5147
2020-08-10 19:01:04 -07:00
Ian McInerney e03f6a3b49 Pcbnew: Route all display options updates through the frame
The frame contains the main option set that is used for setting the UI
state, so it must be updated. The frame also updates the view when set,
so calling the view separately to update the options isn't needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5069
2020-08-11 01:20:11 +01:00
Ian McInerney 0a0ed9e064 Escape all env var strings sent to the Python interpreter
Fixes https://gitlab.com/kicad/code/kicad/issues/5130
2020-08-11 00:51:02 +01:00
Jeff Young 9716c62e32 Performance enhancements for PCBNew scrolling and zooming.
Fixes https://gitlab.com/kicad/code/kicad/issues/5136
2020-08-10 23:43:24 +01:00
Jeff Young e1c449902d Ask user before throwing away changes to DRC Rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/5135
2020-08-10 23:43:24 +01:00
Jeff Young de6314e3b5 Convert smart quotes and dashes to ASCII in DRC rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/5135
2020-08-10 23:43:24 +01:00
Seth Hillbrand f36c158696 Remove via contact minimum from connectivity check
Connectivity takes an absolute approach to whether elements are
connected.  DRC will be adjusted to check to illegal necks that are less
than the board minimum width
2020-08-10 14:47:49 -07:00
Seth Hillbrand e5ab97994d pcbnew: Fix error in proximity calc for zones
Zone ContainsPoint() accuracy should be calculating the radial distance
and so does not need to be halved.
2020-08-10 14:46:34 -07:00
Seth Hillbrand 5096deeb3b pcbnew: Handle module ratsnest
Ensure we display the module ratsnest appropriately
2020-08-10 12:09:32 -07:00
Seth Hillbrand 211cbadc24 pcbnew: MODULEs are not BOARD_CONNECTED_ITEMS
Handling ratsnest requires first checking for modules, handling their
pads and then checking that the remaining elements derive from
BOARD_CONNECTED_ITEM

Fixes https://gitlab.com/kicad/code/kicad/issues/5131
2020-08-10 11:01:03 -07:00
jean-pierre charras 23a5b0ca5f fix a few compil warnings and a Coverity warning. 2020-08-10 18:32:44 +02:00
Jeff Young 34705fd8b2 More clone vs duplicate bugs.
Fixes https://gitlab.com/kicad/code/kicad/issues/5120
2020-08-10 14:45:01 +01:00
Jeff Young 692aeff334 Fix a bunch of usages of copy ctor that really meant duplicate.
In particular, "duplicate" means "with a new KIID".

Fixes https://gitlab.com/kicad/code/kicad/issues/5127
2020-08-10 14:23:11 +01:00