Commit Graph

9520 Commits

Author SHA1 Message Date
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