Commit Graph

256 Commits

Author SHA1 Message Date
Jeff Young faf9cca938 Fix many cases of old mils flag getting interpreted as allowEval flag.
Fixes https://gitlab.com/kicad/code/kicad/issues/7883
2021-03-12 15:15:50 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

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

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

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

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Jeff Young 86aaa2e9cb Rationalize footprint bounding boxes and cache all of them.
Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-26 13:50:27 +00:00
jean-pierre charras 76cc7b98a7 Fp editor, DIALOG_PAD_PROPERTIES: do not disable posX and posY settings.
When a pad is locked,  posX and posY settings in DIALOG_PAD_PROPERTIES must
be locked only for the board editor, not in the fp editor.
2021-01-12 20:33:52 +01:00
Seth Hillbrand c09dc5abdd Prevent locking items in footprint editor
Adding footprints to the board now has a preference for whether we want
pads locked or unlocked by default
2021-01-11 11:23:26 -08:00
Jeff Young 8fffb75347 Allow custom pads with 0-sized anchor pads.
(Surprisingly we used to in 5.1, so this is a regression.)

Also had to go back to the nag dialog as on a small screen the infobar
comes up behind the dialog.  A lot of the errors have also been turned
into warnings, so the overall effect should still be to reduce nagging.

Fixes https://gitlab.com/kicad/code/kicad/issues/6992
2021-01-08 20:43:02 +00:00
Jeff Young 3467e643e5 Move pad locking from footprint to pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/6997
2021-01-08 20:43:02 +00:00
Jeff Young c09d3b765a Slight improvement to error text for when drill is same size as pad. 2021-01-04 00:03:21 +00:00
jean-pierre charras a6a2dae480 Footprint editor: ensure the pad editor is closed before load a new footprint.
When editing a new footprint from the board editor, if the Footprint editor has the pad editor
open, there is a risk of crash when replacing the footprint in edit.

Fixes #6892
https://gitlab.com/kicad/code/kicad/issues/6892
2020-12-31 10:53:14 +01:00
Jeff Young 1fc4523711 Remove pad-size-setting hack from PCB_PAINTER.
Also improves the pad warning and error messages, and moves a few
remaining nags from the setting infrastructure to the warning
infrastructure.

Fixes https://gitlab.com/kicad/code/kicad/issues/6141
2020-12-27 21:11:27 +00: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 a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young ec020dd19f First-class support for filled shapes. 2020-11-14 01:40:32 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
jean-pierre charras 4d7aa2f9c9 Pcbnew, Pad properties dialogs: fix some issues related to chamfered rect shapes. 2020-11-12 20:13:28 +01:00
Jeff Young 82e495d202 Be more explicit about pad types to reduce fragility.
Fixes https://gitlab.com/kicad/code/kicad/issues/6300
2020-11-05 11:56:50 +00:00
Jeff Young daa0c3aaa1 Switch pad preview canvas to that of parent.
Fixes https://gitlab.com/kicad/code/kicad/issues/6228
2020-11-04 21:06:46 +00:00
jean-pierre charras 2ffa88d076 DIALOG_PAD_PROPERTIES: fix a few issues and a crash when no copper layers selected.
Fixes #6280
https://gitlab.com/kicad/code/kicad/issues/620
2020-11-04 13:13:08 +01:00
jean-pierre charras 89e21d28f0 French translation update, and minor I18n fixes 2020-11-02 20:23:01 +01:00
Jeff Young 3b10d15835 Don't run hole offset check for pad with no copper.
Fixes https://gitlab.com/kicad/code/kicad/issues/6255
2020-11-02 12:53:02 +00:00
jean-pierre charras 0ef480dc84 DIALOG_FOOTPRINT_PROPERTIES: fix an issue when selecting 0.0 orientation.
Allows also entering a rotation angle in 0.001 degrees
(The limitation to 0.1 degree is outdated since years)
2020-10-29 18:33:28 +01:00
jean-pierre charras a7ba5ea9c8 DIALOG_PAD_PROPERTIES: fix a few issues found for flipped pads after edition:
Incorrect y offset.
Incorrect rounded/chamfered corner positions
2020-10-27 15:32:29 +01:00
Roberto Fernandez Bautista 4ea8f29a43 Fix typo causing custom shaped pads to be flipped when opening the pad properties dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6180
2020-10-27 11:33:35 +00:00
Roberto Fernandez Bautista d75151a847 Replace some errors with warnings in pad properties dialog 2020-10-27 11:33:35 +00:00
Marek Roszko e49ac45b84 HTML_MESSAGE_BOX is a dialog 2020-10-25 20:01:12 -04:00
Seth Hillbrand 4085757aeb Remove beginning/ending spaces in translations
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
Jon Evans 2e50723781 Ensure preview pad has access to parent board design settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6057
2020-10-18 15:27:30 -04:00
Jeff Young 92d84b0d67 Naming updates. 2020-10-15 01:35:16 +01:00
Jeff Young 37906511f5 Class renaming.
DRAWSEGMENT  -> PCB_SHAPE
EDGE_MODULE  -> FP_SHAPE
TEXTE_PCB    -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Jeff Young 7a4900b8dc PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
Seth Hillbrand 12a30c43de Fix missing refactor 2020-09-30 08:42:58 -07:00
Seth Hillbrand bf3cb0b1d0 Standardize pad type enums 2020-09-30 08:38:35 -07:00
Jeff Young e31705d4b3 More source reporting for clearance rules. 2020-09-10 20:58:38 +01:00
Jeff Young 59c6635286 Add restrictions on copper layers for NPTH pads.
Also updates the stackup graphics to include NPTH pads.

Fixes https://gitlab.com/kicad/code/kicad/issues/5477
2020-09-09 10:22:17 +01:00
Jeff Young c090f1b646 Add restrictions on copper layers for NPTH pads.
Also updates the stackup graphics to include NPTH pads.
2020-09-09 01:49:50 +01:00
Jeff Young ab71ef9ec5 Try a different strategy at getting wxWidgets to honor stackup bitmaps.
Fixes https://gitlab.com/kicad/code/kicad/issues/5559
2020-09-08 23:34:43 +01:00
Jeff Young 0ec4c4fe65 A more targetted fix at the focus issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/5477
2020-09-08 22:35:04 +01:00
Jeff Young 5d304cfa2a Uniformly apply focus hack to auto-preview.
Since the feature is controversial this also moves it into a single
function so that it's easy to disable.

Fixes https://gitlab.com/kicad/code/kicad/issues/5477
2020-09-08 22:19:29 +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
Jeff Young a1e8ecc616 Beat wxWidgets into submission.
Fixes https://gitlab.com/kicad/code/kicad/issues/5534
2020-09-06 22:38:23 +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 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 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 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
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
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
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