Commit Graph

2500 Commits

Author SHA1 Message Date
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 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
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
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 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
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
Jon Evans 9f7bca38b3 A better way of handling standalone project files 2020-08-30 16:04:39 -04: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 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
Jeff Young f005977aab Minor simplification to custom colour theme GUI for print/plot dialogs. 2020-08-28 14:15: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 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
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 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 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
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
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 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
jean-pierre charras c196423192 fix a wxWidgets alert 2020-08-22 17:54:46 +02: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
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
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
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 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
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
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 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
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
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
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 47919cdc54 pcbnew/dialogs: use shared_ptr for RC_ITEM 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
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 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 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
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 5ab39b7c06 Clean up reannotation UI. 2020-08-11 15:02:27 +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
jean-pierre charras 23a5b0ca5f fix a few compil warnings and a Coverity warning. 2020-08-10 18:32:44 +02:00
Seth Hillbrand 5fc6b74c89 ADDED: Remove unused pads
This option removes copper layers from pads and vias where they are not
connected to other board elements.  This allows the inner layers to be
more closely routed if the via landing pad is not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/1835
2020-08-10 03:27:26 +00:00
Jon Evans abc64f228b Use wxAtoi instead of atoi 2020-08-09 18:26:54 -04:00
Jeff Young 78fb6a384d Fix wxWidgets debug assert on GTK.
Fixes https://gitlab.com/kicad/code/kicad/issues/5121
2020-08-09 22:13:29 +01:00
evils cc6f582aa3 Pcbnew: Fix typo in drill file generation dialog
From https://gitlab.com/kicad/code/kicad/-/merge_requests/335
2020-08-09 19:56:12 +01:00
jean-pierre charras 9b3ff5af47 Fix a few I18N issues.
Especially keywords should not be included in translated strings.
2020-08-09 20:38:35 +02:00
Jon Evans db811510af Improve layout of reannotate dialog 2020-08-09 13:04:33 -04:00
Jon Evans 5abc85aa80 Cleanup re-annotation code style 2020-08-09 12:43:05 -04:00
bjpiccioni d08bf90576 ADDED: Geographic Reannotation 2020-08-09 12:43:05 -04:00
Jeff Young 3b280e4886 Keep properties across an Exchange_Module call.
This is also used when saving a footprint from the Footprint Editor
back to the board.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5114
2020-08-09 15:39:51 +01:00
Jeff Young 4317881012 Improve delete-unused-layers to better handle multi-layer items.
Fixes https://gitlab.com/kicad/code/kicad/issues/5116
2020-08-09 15:39:51 +01:00
Mark Roszko c6e388db14 Implement an app progress indicator in the taskbar
ADDED: Progress indicator in the taskbar

This adds a progress indicator to the Windows and macOS taskbar
icons to display the progress of some operations.

Note, this requires wxWidgets 3.1+
2020-08-09 10:55:00 +00:00
Jeff Young 492f7859e7 Make sure design settings get written back to board.
Fixes https://gitlab.com/kicad/code/kicad/issues/5109
2020-08-08 23:35:59 +01:00
Jeff Young ae404e6339 Update board markers from DRC changes before dialog is closed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5110
2020-08-08 19:09:22 +01:00
PJM 829316fad4 Pcbnew #4904 : Import settings from another board deleted internal layers
When importing settings from a board with more copper layers and applying it
to a board with less copper layers, if the user has ticked the checkbox
"Layer settings", then KiCad will delete the inner copper layers.  Only
when the user clicks OK does it then warn that it found deleted items on inner
layers.  The message is too generic and comes after the layers have already
been deleted.

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

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

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

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

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

Fixes issue https://gitlab.com/kicad/code/kicad/-/issues/4904
2020-08-08 00:51:23 +00:00
Jon Evans dcc484e114 CHANGED: Library editors are now usable with no project loaded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3688
2020-08-07 18:02:34 -04:00
Jeff Young e5b50d90a7 Update DRC rules to new layer and disallow grammars.
Also adds support for hooking rules up to named zones.

Fixes https://gitlab.com/kicad/code/kicad/issues/2041
2020-08-07 21:49:36 +01:00
Jeff Young 00e77d1ba4 Implement pad & via aprons for hatched zones.
Fixes https://gitlab.com/kicad/code/kicad/issues/2519
2020-08-07 15:15:43 +01:00
Jon Evans 1a3b7828f8 Fix layer exclusions and worksheet in board color theme editor 2020-08-06 17:44:16 -04:00
Jeff Young 76bd344730 Preview for PCBNew colour settings editor. 2020-08-06 19:38:06 +01:00
Jeff Young b26ced820c Make sure plugins table has columns wide enough for headers.
Don't expect wxWidgets to return appropriate values for this.  At
least not in the version we're using.

Fixes https://gitlab.com/kicad/code/kicad/issues/1916
2020-08-05 19:37:52 +01:00
Jeff Young 5d6c65509a Adjust spacing in pcbnew edit options. 2020-08-05 00:20:37 +01:00
Jeff Young aa8fb38445 Bring panel_pcbnew_color_settings in line with eeschema equivalent.
Also fixes a bug where color changes weren't getting saved because
the set of valid layers didn't include the copper layers.
2020-08-04 15:08:20 +01:00
Jeff Young 0f3d79245e Tidy up delete-all-markers.
Fix a typo in the order of booleans, and move from 3 buttons to
2 buttons and a (remembered-for-session) checkbox.
2020-08-04 13:28:16 +01:00
Jeff Young f67ba62c11 Don't stop when current item is reached: there might be more.
In particular, the two sub-items also count as "current" and need
to be deleted.

Fixes https://gitlab.com/kicad/code/kicad/issues/5057
2020-08-04 13:28:16 +01:00
Jeff Young 9c9fdb2569 More performant (and more correct) deletion of DRC markers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5057
2020-08-04 11:45:07 +01:00
Jeff Young c56599ab07 Allow ERC/DRC markers to be deleted without deleting exclusions.
Fixes https://gitlab.com/kicad/code/kicad/issues/4953
2020-08-02 22:45:48 +01:00
Jeff Young 8c16c60e42 Fix typo keeping aperture pads from working.
Fixes https://gitlab.com/kicad/code/kicad/issues/5036
2020-08-01 15:40:34 +01:00
Qbort 9977299340 Fix compile errors in drc_engine.cpp and panel_setup_rules.cpp 2020-07-31 21:47:01 +00:00
Jeff Young 5c479e150d Tooltip and better icon for compile/check syntax button. 2020-07-31 22:29:05 +01:00
Jeff Young 1be39195ab Remove UUIDs from the GUI.
Fixes https://gitlab.com/kicad/code/kicad/issues/5018
2020-07-31 16:06:54 +01:00
Seth Hillbrand 51d7fea934 Separate Cleanup Via from Cleanup Track
There are cases where you will want to keep vias that only connect to
one layer but still want to cleanup tracks.  As distinct entities, they
are given their own checkboxes and actions

Fixes https://gitlab.com/kicad/code/kicad/issues/5019
2020-07-30 21:22:33 -07:00
Ian McInerney 268dec5c19 Cleanup some build and Coverity warnings 2020-07-31 02:46:05 +01:00
Jeff Young 577c1be391 Report all DRC rule errors, not just the first. 2020-07-30 14:27:42 +01:00
Jeff Young 5a1b1c544a Add layer to rule grammar. 2020-07-30 14:27:42 +01:00
Jeff Young 1d8c71c617 Fix layout issues in net inspector dialog.
1) don't add 10 -and- include 'M's in the strings; they're both for
   margins
2) take scroll bar width into account when sizing columns
3) make sure margins are added to temp variables that we're going to
   use to size column 1

Fixes https://gitlab.com/kicad/code/kicad/issues/4981
2020-07-27 19:53:42 +01:00
jean-pierre charras 6f7d5f5e2b Footprint editor: fix some issues in flip and mirror commands.
more about fixes #4958
https://gitlab.com/kicad/code/kicad/issues/4958
2020-07-25 18:10:24 +02:00
Jeff Young d1d7f5e7fa Fix text size in Edit Footprint dialog. 2020-07-25 13:03:33 +01:00
jean-pierre charras b5960dfb40 class D_PAD: add Copy ctor and operator =.
Due to the fact basic primitives for custom pads are now managed by
a list of pointer, the default copy ctor and default  operator = do not work
(the basic primitives list must be duplicated).
It fixes issues related to primitives list id pad edition, footprint edition
and undo/redo

Fixes #4958
https://gitlab.com/kicad/code/kicad/issues/4958
2020-07-24 18:02:56 +02:00
jean-pierre charras c254b331f3 Pcbnew: Activate pad fabrication property in pad properties dialog.
It was previously an option of advanced config since 6 months.
It is now not optional.
2020-07-23 14:33:24 +02:00
Jeff Young 86c9adbcba Add auto-completion for DRC rule function calls. 2020-07-22 21:28:02 +01:00
Jeff Young fd647a1fa9 Code completion hookup to property manager. 2020-07-21 23:43:10 +01:00
Jeff Young c52df811ae Add expression eval to constraint min/max/opt values.
Also adds error reporting for above.
2020-07-21 23:43:10 +01:00
Jeff Young 7cbd166df7 Don't complain about duplicate names when the name didn't change. 2020-07-21 23:43:10 +01:00
Jeff Young beb5bad9b7 Initialize Scintilla with correct braces for sexpr grammar. 2020-07-21 23:43:10 +01:00
Ben Ellis 42a2f13464 Added a check that sexprs isn't empty before popping
This fixes a crash on malformed sexprs in the DRC rules panel
2020-07-21 14:52:48 +00:00
Jeff Young 095937563b Hook libeval compiler up to rule parser
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
  board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
  don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
Mark Roszko 3b727b5d16 Make preference groups not selectable 2020-07-20 13:45:46 +00:00
Ian McInerney af729d578f Unify settings reset buttons into one location 2020-07-16 00:08:16 +01:00
Ian McInerney b428364a98 Fix memory leak in color settings panel 2020-07-16 00:04:17 +01:00
Jeff Young 7340c97ef9 Undo for schematic-wide operations.
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.

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

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

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00
Jeff Young e325d2e18f Allow Net Inspector to create, rename and delete nets.
ADDED: create/edit/delete nets in PCBnew Net Inspector
ADDED: update from PCB now allows updating of changed nets

Fixes https://gitlab.com/kicad/code/kicad/issues/1996
2020-07-11 21:19:49 +01:00
Jeff Young 741481591e NetClass settings for Eeschema.
ADDED Eeschema-specific netclass settings including wire and bus
thickness, color, and line style.

Netclasses override individual wire & bus colors and line styles.
If that proves an issue we might look at something more sophisticated
with inheritance.

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-08 21:23:25 +01:00
Jeff Young 3939b31027 Integration of netclasses into Eeschema.
This is mostly architecture, with the hookup of the Schematic Setup
dialog's Net Classes page.  Things like assigning to a net on the
canvas to follow.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-06 20:00:50 +01:00
Jeff Young b0ca7d5140 Netclass setup for Eeschema.
ADDED netclass panel in Schematic Setup dialog.

Fixes https://gitlab.com/kicad/code/kicad/issues/2132
2020-07-06 20:00:50 +01:00
Jeff Young 2819570d1e Push panel_setup_netclasses down into common. 2020-07-06 20:00:50 +01:00
Ian McInerney 476558ece7 Cleanup some memory leaks 2020-07-06 02:11:17 +01:00
Jeff Young 5bc6389477 Comments. 2020-07-05 19:53:04 +01:00
Jeff Young edecfaa433 Minor code cleanup. 2020-07-05 19:53:04 +01:00
Jon Evans 2f4a14a57b Properly exclude colorless GAL layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4793
2020-07-03 23:23:58 -04:00
Jon Evans b592a4169f Update project template system for new format 2020-07-02 22:08:54 -04:00
Jon Evans 12b4a55ae8 Port Eeschema to new project settings
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04:00
Jon Evans c0aa6965de Migrate PcbNew project settings to new framework
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.

ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jon Evans a7708fa6dc Add PROJECT_FILE and basic load/unload methods 2020-07-02 22:08:54 -04:00
Ian McInerney c27207500d Cleanup some compiler warnings 2020-07-03 00:10:31 +01:00
Jeff Young 441dfa30f0 Return individual custom pad shapes instead of a SHAPE_POLY_SET.
Also implements an optional pointer to return the actual distance
from all the SHAPE collision routines.

Fixes https://gitlab.com/kicad/code/kicad/issues/4774
2020-07-02 17:09:15 +01:00
Jeff Young 3b764d6357 Minor dialog spacing issues. 2020-07-01 16:57:00 +01:00
Jeff Young 7b042f4a75 Add rectangle tool to PCBNew toolbar in favour of Aux Origin.
ADDED new rectangle graphics tool for PCBNew and Footprint Editor.

Also adds rectangle tool to both Footprint Editor and PCBNew Place
menus.

The Aux Origin tool can come back once we have multi-select toobar
buttons.

Also collapses an unnecessary level out of the auxOrigin and gridOrigin
settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/2246
2020-07-01 13:31:30 +01:00
Jon Evans 1d5e4f86af ADDED: Copper zone island removal is now configurable
ADDED: Zones and keepouts can now be named (for DRC)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4392
2020-06-28 09:09:38 -04:00
Jon Evans 0d4ee39f75 CHANGED: Copper zones can be on more than one layer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1963
2020-06-28 08:52:37 -04:00
Jon Evans bd19c580f4 Add configuration for cross-probing behavior
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2317
2020-06-27 22:48:48 -04:00
Jeff Young 32c3ea4edd Flags cleanup.
Remove extraneous use of FLAG0 from tracks cleaner (it was checked but
never set).

Fix issue in expand connections where two parts of it couldn't agree
on the same flag (BUSY vs SKIP_STRUCT), and where the second part was
clearing the flag instead of setting it.

Remove obsolete HIGHLIGHT infrastructure (we now use selection).

Remove extraneous use of BUSY flag in several places (it was never
set).
2020-06-27 17:53:04 +01:00
Jeff Young da2b7071b4 WYSISYG custom pad editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2153

Fixes https://gitlab.com/kicad/code/kicad/issues/2305
2020-06-27 14:37:01 +01:00
Jeff Young e376750f62 Flatten CS_PAD_PRIMITIVE out in favour of reusing DRAWSEGMENT.
(In prep for the eventual replacement of DRAWSEGMENT internals with
SHAPE.)
2020-06-24 12:22:42 +01:00
Jeff Young 18ab3c4714 Fix missing user grid in COMMON_TOOLS.
Fixes https://gitlab.com/kicad/code/kicad/issues/4702
2020-06-23 11:17:15 +01:00
Jeff Young d01b29ab37 Cleanup pad geometry handling.
There were a lot of plotters, exporters, etc. that were rolling their
own implementations.

This also introduces a lazily-built set of SHAPE objects for doing
collision detection and some forms of rendering (and later DRC).
2020-06-22 22:28:37 +01:00
Jon Evans c0175c48af ADDED: Setting to control track mouse drag behavior
Default is now to perform a 45-degree drag
2020-06-21 15:39:39 -04:00
jean-pierre charras 55e283634a Pcbnew, DIALOG_PLOT_BASE: better warning message about non null solder mask margins. 2020-06-21 20:41:06 +02:00
Jeff Young 970921f88b Support for filled DRAWSEGMENT::S_RECT and S_CIRCLE.
One more step in unifying pad primitives and draw segments.
2020-06-20 14:34:53 +01:00
Jeff Young ee9d8fcd15 Collapse Pcbnew & ModEdit display and edit settings.
(Prep work for reusing them with a custom shape editor.)
2020-06-18 15:38:01 +01:00
Seth Hillbrand eb89d1c68b pcbnew: Minor update to ratsnest calc
BuildConnectivity updates the ratsnest after it completes.  By compiling
the ratsnest before connectivity, we update it twice with the dirty flag
being reset after connectivity updates.
2020-06-17 19:43:11 -07:00
Jeff Young a7703d1207 Cleanup Graphics to parallel Cleanup Tracks & Vias.
This also allows for easier migration to DRAWSEGMENT::S_RECTs by
auto-converting 4 rectilinear lines to a rectangle.
2020-06-17 18:44:39 +01:00
jean-pierre charras 55c0bd7ae3 Remove a incorrect code, unfortunately not removed after another (old) code change. 2020-06-17 12:54:09 +02:00
Seth Hillbrand 8c57821e9b pcbnew: Move ratsnest items to separate folder 2020-06-16 11:15:14 -07:00
Jeff Young aeed8e6e2c Finish implementation of DRAWSEGMENT::C_RECT.
It's currently only supported in the Footprint Editor.  It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +01:00
Jeff Young ad12c42e8b Push grid settings dialogs down into common.
This also gives support for fast grid switching and a user grid
to eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/2200
2020-06-14 19:26:37 +01:00
jean-pierre charras a8d5d9b690 panel lib tables: avoid crash when deleting the last entry in list. 2020-06-14 17:39:32 +02:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
jean-pierre charras 2b122892d3 DIALOG_PAD_PROPERTIES: fix some issues:
- fix many wxWidgets alerts.
- ensure pad offset wxTextCtrs are shown or not according to the wxCheckBox state.
- ensure there is room in dialog for some wxTextCtr when switched from Hide to Show
(resize it if it is too small)
2020-06-11 20:34:13 +02:00
Jeff Young 4629b701ea Fix spacing issue in Pad Properties. 2020-06-11 18:26:44 +01:00
Wayne Stambaugh c5fc1d4a7c More dialog clipped bitmap button fixes. 2020-06-11 07:31:50 -04:00
Jeff Young 4138c8554c Parse DRC rules when closing Board Setup dialog. 2020-06-10 12:03:37 +01:00
jean-pierre charras 2401ed587e eeschema, pcbnew: fix too narrow window showing the item color list
Fixes #4610
https://gitlab.com/kicad/code/kicad/issues/4610
2020-06-09 20:05:38 +02:00
jean-pierre charras f8967550a8 PANEL_FP_LIB_TABLE: fix incorrect size of the SPLIT_BUTTON.
This was due to use of a not yet calculated of a bitmap button.
At least on msw just after setting the bitmap of a bitmap button
the actual size is not yet calculated: it is calculated after calling Layout()
2020-06-08 10:19:31 +02:00
jean-pierre charras 27c80e8a2e Solder mask clearance default value: set default to 0, taking advice from
both Ucamco and Eurocircuits.
Update message in plot dialog about best solder mask clearance value.
Show warning in plot dialog if these values are no 0.
2020-06-07 11:10:28 +02:00
jean-pierre charras 74051be3b7 pcbnew, DIALOG_PLOT: fix a cosmetice issue: a SVG option was sometimes shown
when the PDF plotter was selected.
2020-06-06 20:50:24 +02:00
Jon Evans 2cbae18598 Remove PCBNEW_SETTINGS dependence from PCB_PLOT_PARAMS 2020-06-06 13:57:28 -04:00
Jeff Young fb4f37f39c Inherit GAL settings from parent's GAL. 2020-06-05 19:07:23 +01:00
Jeff Young 80c0e0080f Move layout updating out of OnUpdateUI to prevent endless looping.
Fixes https://gitlab.com/kicad/code/kicad/issues/4623
2020-06-05 17:45:25 +01:00
jean-pierre charras a29b3eb017 Eeschema, DIALOG_EDIT_ONE_FIELD: fix incorrect behavior for footprint field,
when initialized from the footprint viewer.

Fixes #4609
https://gitlab.com/kicad/code/kicad/issues/4609
2020-06-04 18:47:12 +02:00
Jeff Young 7876bab0e0 Implement another shape choice for Chamfer + Rounded. 2020-06-04 17:28:46 +01:00
Wayne Stambaugh 0032845f9e Fix clipped bitmap buttons with GTK on Linux.
A note to developers, please do not set the minimum and/or size of bitmap
buttons.  It causes bitmaps to get clipped using GTK on Linux.  If the
bitmap button size is not acceptable, then supply an appropriately sized
bitmap rather than attempt to force the wxWidgets sizing mechanism to do
what you want.  This almost always causes platform differences that do
not work well.
2020-06-03 14:01:44 -04:00
Jeff Young 8575afd7ef Adjust spacing in dialog for non-OSX platforms. 2020-06-03 16:34:09 +01:00
Jeff Young b8e4f4bfc4 Attempt #1 to fix layout issue on GTK (and perhaps MSW). 2020-06-03 16:28:08 +01:00
Jeff Young 7db4a3f702 Fix offset issue when pad edited from board instead of modEdit. 2020-06-03 13:50:50 +01:00
Jeff Young 3bd4c0c5dc Don't allow the pad preview canvas to become too large.
Also offset canvas with pad so that hole stays in centre.

Fixes https://gitlab.com/kicad/code/kicad/issues/4185
2020-06-02 22:51:41 +01:00
Jeff Young 9ff09aa784 Progressive disclosure pad properties. 2020-06-02 17:22:24 +01:00
Jeff Young a76a1aefaa Update membership grid when a netclass name changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4596
2020-06-01 22:00:03 +01:00
Jeff Young 6d5b6c8b81 A bit more refactoring to get code out of the DRC tool. 2020-05-29 22:06:48 +01:00
Jeff Young 39ec63c4e9 Fix some inconsistencies in clearance priorities.
Fixes https://gitlab.com/kicad/code/kicad/issues/4555
2020-05-29 13:41:45 +01:00
Jeff Young fe4fd19c66 Fix crash bug in unicode chars with Scintilla. 2020-05-28 00:23:18 +01:00
Jeff Young 8b084c373e Autocomplete for text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4190
2020-05-27 23:29:51 +01:00
jean-pierre charras 53360acc3d DIALOG_BOARD_SETUP: fix incorrect parent for the PANEL_TEXT_VARIABLES panel.
Fixes #4548
https://gitlab.com/kicad/code/kicad/issues/4548
2020-05-27 09:24:32 +02:00
jean-pierre charras bf889e91fe PANEL_SETUP_RULES: make rules help translatable.
Only titles are translatable.
Other strings are keywords and remain not translatable.
2020-05-27 08:52:03 +02:00
Jon Evans 39a2416c11 Only sketch pads on fab layers if they exist on that side
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4546
2020-05-26 21:17:39 -04:00
Jon Evans d46c651d80 Only update colors on layer widget when closing preferences
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4545
2020-05-26 21:17:39 -04:00
Jeff Young 6ef6284924 Make sure markers get removed from view when deleted. 2020-05-26 22:09:31 +01:00
Jeff Young 3ea093539b DRC rule syntax help improvements. 2020-05-26 22:09:30 +01:00
jean-pierre charras f971e1267b Fix typo and remove a I18N marker in a sentence containing keywords
(keywords cannot be translated)
Fix also use of a deprecated constant.
2020-05-26 17:47:58 +02:00
Jeff Young f7fbb600d2 Fix compile errors on Linux. 2020-05-26 00:08:27 +01:00
Jeff Young 1f93020be4 Performance improvements for autocomplete and some syntax help. 2020-05-25 22:51:47 +01:00
Jeff Young 1db799d841 Implement "disallow" rules and integrate with keepout settings. 2020-05-25 22:51:47 +01:00
Jeff Young 90c4249de5 Implement autocompletion for rule s-expr syntax. 2020-05-25 22:51:47 +01:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +01:00
Jeff Young 416d82727f Redo DRC rules to get ready for new system. 2020-05-25 22:51:47 +01:00
Jon Evans a52435bbb0 ADDED: New mouse settings panel, expanded mouse settings
You can now choose the behavior of dragging with the
middle and right mouse buttons.

You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.

You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.

You can also now zoom by dragging with the right or
middle button if desired.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
2020-05-24 14:38:28 -04:00
Jon Evans c7daf8a8f3 ADDED: Cross-probe highlighting of bus members
Note: this is a basic implementation but it could be
improved once we include bus information in the netlist
and pcbnew can natively keep track of buses and nets
instead of just nets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4158
2020-05-24 13:30:23 -04:00
Ian McInerney 4ecf99e7c8 Give the footprint viewer a toolbar and remove the options dialog
CHANGED: Cvpcb fpviewer and the pcbnew fpviewer no longer have an options dialog
ADDED: Add a side toolbar to the pcbnew footprint viewer (and the measure tool)

This also cleans up some of the settings structs in the viewers, since
it was somewhat confusing before.

Fixes https://gitlab.com/kicad/code/kicad/issues/2205
2020-05-24 11:58:33 +01:00
Ian McInerney 6692935808 Consolidate common viewer actions across cvpcb and pcbnew frames
* Consolidate the measure tool into one tool (this gives cvpcb
  unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
2020-05-24 11:58:33 +01:00
Michael Kavanagh ab07c852d0 Board setup: replace checkboxes with radio buttons
Fixes https://gitlab.com/kicad/code/kicad/issues/4520
2020-05-24 00:25:28 +00:00
jean-pierre charras 17fad3a9a4 Minor cosmetic fix and enhancement is 2 dialogs. 2020-05-23 09:48:05 +02:00
jean-pierre charras f056713ceb Remove old incorrect code. 2020-05-22 08:05:39 +02:00
Jeff Young 7bb280ea39 General cleanup. 2020-05-19 20:48:47 +01:00
jean-pierre charras 4efed4b729 Pcbnew, exchange footprint and export DSN: fix incorrect rotation if the edit
option Flip was set to flip around Y axis.

Fixes #4487
https://gitlab.com/kicad/code/kicad/issues/4487

Fixes #4478
https://gitlab.com/kicad/code/kicad/issues/4478
2020-05-19 10:20:12 +02:00
Jeff Young 05855a5a1c Performance enhancements for DRC. 2020-05-18 13:38:17 +01:00
Jeff Young 3656297f99 Add a simple editor for DRC rules. 2020-05-16 23:30:30 +01:00
Jon Evans f2e003147e ADDED: Enable color themes for PcbNew printing 2020-05-16 13:19:43 -04:00
Jeff Young d3f017d825 DRC rules parser and engine.
Fixes https://gitlab.com/kicad/code/kicad/issues/2182

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1965
2020-05-16 15:53:05 +01:00
jean-pierre charras 23927957e1 Pcbnew: fix a crash due to use of invalid pointers after a list modification
Fixes #4409
https://gitlab.com/kicad/code/kicad/issues/4409
2020-05-13 11:51:56 +02:00
jean-pierre charras 2cf82d9129 fix a wxWidgets minor alert and compil warnings 2020-05-13 08:53:32 +02:00
Jeff Young 74ee143d45 Add via annulus minimum. 2020-05-11 22:56:09 +01:00
jean-pierre charras acdfeee942 Footprint editor: fix crashes when trying to edit the Default Pad Properties.
The crsahes were due to a null pointer use.

Fixes #4379
https://gitlab.com/kicad/code/kicad/issues/4379
2020-05-09 11:15:28 +02:00
jean-pierre charras c78e7c5485 Fix compil issues (warnings and missing include) 2020-05-09 08:59:00 +02:00
Jeff Young 7c935b1997 Fix Mac-specific include.
Fixes https://gitlab.com/kicad/code/kicad/issues/4377
2020-05-09 00:47:35 +01:00
Jeff Young 1f68323439 Solder mask min width --> solder mask min bridge width.
Fixes https://gitlab.com/kicad/code/kicad/issues/4345
2020-05-08 23:30:33 +01:00
Jeff Young 3c3984a6fc Generalize default footprint fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/2289
2020-05-08 23:30:33 +01:00
Jeff Young 7305f407fc Fix typo in user string. 2020-05-08 23:30:33 +01:00
Jeff Young 0f8c7ffd11 Add pad keepout and footprint keepout areas.
Fixes https://gitlab.com/kicad/code/kicad/issues/2365
2020-05-07 17:51:27 +01:00
Jeff Young 902e0d0c42 Attempt to fix GTK bug of just-added 3D model not getting selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/4314
2020-05-06 21:19:38 +01:00
Jeff Young 52d1c93777 Use standard OK/Cancel paradigm rather than Apply/Cancel.
Apply/Cancel puts the buttons in a different order on some platforms.

Fixes https://gitlab.com/kicad/code/kicad/issues/4332
2020-05-06 20:50:44 +01:00
Jeff Young 001a50bf14 Moved PANEL_COLOR_SETTINGS from buttons to swatches.
This allows us to correctly display non-100%-opacity colors (ie:
over the correct background color).
2020-05-06 19:02:21 +01:00
Jon Evans 9916f24fab Split out footprint editor color settings
Migrate COLOR_SETTINGS 0->1 to remove fpedit section
Migrate FOOTPRINT_EDITOR_SETTINGS 0->1 to use new theme if created
Remove COLOR_CONTEXT that is no longer needed
2020-05-05 21:46:00 -04:00
Jon Evans 51eac3e3e6 Split pcbnew and footprint editor settings getters for clarity 2020-05-05 21:46:00 -04:00
Jeff Young 9e4125c451 Add note on spacing to Global Label Properties dialog.
Also cleans up some of the other notes to have a uniform presentation.

Fixes https://gitlab.com/kicad/code/kicad/issues/4323
2020-05-05 20:33:20 +01:00
Jeff Young 67bccaf465 Make indeterminate control states clearer for the user.
Fixes https://gitlab.com/kicad/code/kicad/issues/4313
2020-05-05 20:26:51 +01:00
jean-pierre charras e208cd8eca DIALOG_FOOTPRINT_BOARD_EDITOR: minor cosmetic changes. 2020-05-05 15:20:55 +02:00
jean-pierre charras 62852e18e1 Pcbnew, DIALOG_UPDATE_PCB: store "Re-link footprints" option in config 2020-05-05 15:20:54 +02:00
Jeff Young 8df5f70c4a If more than one text matches by text try layer and then position.
Fixes https://gitlab.com/kicad/code/kicad/issues/4187
2020-05-05 00:11:59 +01:00
Jeff Young e0da677d4d Add min clearance to DRC; rename Min Via Drill to Min Through Hole.
Also fixes a crash bug when ignoring a DRC violoation with multiple
markers.

Fixes https://gitlab.com/kicad/code/kicad/issues/2528
2020-05-04 22:08:36 +01:00
Jeff Young e39d145d72 Add DRC tests for minimum drill size (based on min via size). 2020-05-04 22:08:36 +01:00
Jeff Young 1b5a6f8698 Fix crash bug when using Pad Properties in board editor. 2020-05-04 22:08:36 +01:00
Jeff Young b7cccf6844 Work around some wxWidgets bugs on OSX.
Set the netclass grid a bit narrower so it doesn't end up with a scroll
bar.

Load the constraints bitmaps on show so they get drawn (otherwise all
but those in the first sizer are blank).
2020-05-04 22:08:36 +01:00
Jeff Young 889b6cb1b1 Clean up some commenting and rename MODULE_EDITOR_TOOLs to match filename. 2020-05-03 20:56:32 +01:00
Wayne Stambaugh 63291141df Pcbnew: minor footprint properties dialog layout improvements. 2020-05-03 11:45:18 -04:00
Wayne Stambaugh 4aeb0a6d71 Fix footprint library table dialog padding. 2020-05-03 07:42:35 -04:00
Jeff Young 56946f4db1 Fix pad name increment to use last edited pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/1882
2020-05-03 08:59:51 +01:00
Jeff Young 10614a9ebc Implement changes for Sketch Pads to Fab Layers.
Includes adding Fab Layers to default text & graphic settings.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/2274
2020-05-01 18:49:42 +01:00
jean-pierre charras 36d1d57505 Pcbnew: fix a minor wxWidget alert 2020-04-30 16:41:10 +02:00
Jeff Young d2046b17d7 More shrinking of Footprint Properties. 2020-04-27 00:24:57 +01:00
Jeff Young 2e73703cc8 Shrink the Footprint Properties dialogs a bit. 2020-04-27 00:24:57 +01:00
jean-pierre charras 3759799d1e Pcbnew, PANEL_SETUP_FEATURE_CONSTRAINTS: cosmetic enhancements: add a few icons.
Fixes #4263
https://gitlab.com/kicad/code/kicad/issues/4263
2020-04-25 15:22:20 +02:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
Jeff Young fd6dffe170 Only save changed severities etc. if the modify bit is set.
(Also means we need to set said bit when changing them.)

Fixes https://gitlab.com/kicad/code/kicad/issues/4164
2020-04-24 23:09:10 +01:00
Jeff Young 32db9eb0f1 Add some distances to a few DRC errors. 2020-04-24 22:17:45 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jon Evans 69db66e1ea Fix saving of pcbnew colors when edited from layers widget 2020-04-23 22:33:02 -04:00
Jon Evans 2d95270a31 Add color theme settings to pcbnew 2020-04-23 21:55:29 -04:00
jean-pierre charras 825d202480 Fix some strings to help translation.
Remove translation mark for strings used in debug, or strings
that cannot be translated (for instance because they are char strings
instead of wide char strings)
2020-04-23 07:40:19 +02:00
Michael Kavanagh e800c47406 NPTH pads can have the hole offset from centre
Fixes https://gitlab.com/kicad/code/kicad/issues/3671
2020-04-22 21:50:51 +00:00
Michael Kavanagh e4cbeeab4c Remove dead code in pcbnew
* Remove dead zone printer
* Remove old canvas in pad properties window
2020-04-22 21:50:15 +00:00
Jon Evans b22ff26688 Rename List Nets to Net Inspector to better reflect function 2020-04-21 20:24:27 -04:00
Oleg Endo 60cad7d526 use dynamic_cast instead of dyn_cast 2020-04-21 13:23:56 +00:00
Oleg Endo ff5828fc33 fix formatting and update comments 2020-04-21 13:23:56 +00:00
Oleg Endo 80e40b862c destroy window when list nets dialog is closed
avoid potential performance issues when the dialog is still listening to
the board updates and refreshing its data and view structures.

it seems useful to keep the settings of the dialog across dialog
open-close cycles.
2020-04-21 13:23:56 +00:00
Oleg Endo 137fe48d88 rewrite select net dialog 2020-04-21 13:23:56 +00:00
Oleg Endo 7bf8a744f1 add support for board listeners 2020-04-21 13:23:56 +00:00
Oleg Endo e3aec20f82 move PCB_INSPECTION_TOOL::ListNets into pcb_inspection_tool.cpp, split out dialog_select_net_from_list.h 2020-04-21 13:23:56 +00:00
Johannes Pfister e5042a46ba Add ability to set SVG plot units and precision
ADDED: Ability to set SVG to metric or imperial units
and made it possible to change the size of a step
2020-04-20 22:02:03 +00:00
Jeff Young b2cd66f0a3 Add specific selection updating when adding 3D models.
This keeps us from being at the receiving end of wxWidgets' vagaries.

Fixes https://gitlab.com/kicad/code/kicad/issues/3760
2020-04-19 22:42:27 +01:00
Jeff Young 7e4d255cdd Apply Scintilla hack to get auto-sizing canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/4207
2020-04-19 20:09:43 +01:00
Jeff Young 895f46da8f Another attempt to fix the textbox scrollbars on GTK.
Fixes https://gitlab.com/kicad/code/kicad/issues/4207
2020-04-18 21:41:20 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Michael Kavanagh 7513303cf4 Remove pad properties wxNotebook background
Fixes https://gitlab.com/kicad/code/kicad/issues/3920
2020-04-16 15:06:43 +00:00
Mikołaj Wielgus 5049214f33 Pcbnew statistics: remove horizontal margin in drill table
This margin caused a horizontal scrollbar to appear on Debian Buster
Xfce.
2020-04-16 12:58:02 +00:00
jean-pierre charras 5143f87678 Kicad2step: Many fixes in oce_utils.
- Better code and messages.
- Speedup calculations when removing cutouts and holes from main board.
- Do not stop step generation when trying to load a 3D modele having issues.
2020-04-15 11:44:12 +02:00
jean-pierre charras b68bdc22d7 Fix in kicadpcb reader. Update dialog export step
kicad2step: code cleanup, and more activity messages displayed
2020-04-15 10:51:35 +02:00
jean-pierre charras 110b05fe78 kicad2step: convert it from a wxAppConsole to a wxApp, using a wxFrame/wxPanel 2020-04-15 10:51:35 +02:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young 350696ecdd Only convert references to KIIDs if the variable resolves.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
Jeff Young 505d8bf56e Allow ':'s in field name references in text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/2458
2020-04-11 20:47:44 +01:00
Jeff Young a8b025ab06 Fix "show" column label. 2020-04-11 13:02:18 +01:00
Jeff Young 174856bac5 Promote 3D model "preview" flag to a persisted "show" flag.
Fixes https://gitlab.com/kicad/code/kicad/issues/2061
2020-04-10 22:49:56 +01:00
Jeff Young 84944524cc Fix crash on OSX when page was changed before hack array was alloc'ed. 2020-04-10 22:49:56 +01:00
Jeff Young 840cab4eec Allow user to show layer if DRC object is hidden.
Fixes https://gitlab.com/kicad/code/kicad/issues/3686
2020-04-07 17:29:58 +01:00
Jeff Young aba0fa7bf8 Allow cross-referencing text substitutions. 2020-04-07 17:29:58 +01:00
Ian McInerney cb380cda0c Fix some build warnings 2020-04-06 00:31:45 +01:00
Jeff Young 7bce0e17f2 Refresh netlist popups after import settings from.
Fixes https://gitlab.com/kicad/code/kicad/issues/4075
2020-04-06 00:05:34 +01:00
Jeff Young 9a258df58a Fix layout issues in Gen FP Positions dialog and add text var support.
Also adds text var support to Export SVG dialog.
2020-04-05 23:56:24 +01:00
Jeff Young b13559c926 Add envVar and text variable resolution to plot directory paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/3808
2020-04-05 23:56:24 +01:00
Jeff Young 78dfbca9a3 Save pre-eval values for Move Exactly dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/4088
2020-04-03 21:47:47 +01:00
Wayne Stambaugh 082944ad06 Minor build warning fixes. 2020-04-03 13:03:23 -04:00
Jeff Young 4990d1e7b2 Variable substitution framework.
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00
Jeff Young ba36fc0009 Fix some Coverity issues. 2020-03-25 14:38:43 +00:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
Jeff Young 204f2cd580 Reference -> reference designator.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-17 16:09:25 +00:00
Jeff Young 847de9143e Add some tooltips.
Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-16 22:43:16 +00:00
Jeff Young cee973dc04 Move ERC error reporting over to the new framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-16 11:06:15 +00:00
Jeff Young 222b222299 Improve ease of understanding around PCB <-> schematic links.
Includes improvements to Update PCB from Schematic dialog and
corresponding changes to Symbol Properties, Sheet Properties and
Footprint Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4012
2020-03-16 11:06:15 +00:00
Jeff Young 085d80e3f3 Remove duplicated settings from preferences.
These have now moved to project-specific settings.
2020-03-13 17:28:53 +00:00
jean-pierre charras 741783c6d1 Pcbnew: Set default solder mask min size to 0.
When the solder mask min size is > 0, pads are no longer flashed or regions items.
Good Gerber files need pads flashed or regions items.

Non 0 solder mask min size is reserved to special cases (home made PCBs for instance)
2020-03-12 20:05:08 +01:00
Jeff Young 437f888c25 Schematic Setup dialog.
Includes:
- moving some of the project settings from the Preferences dialog
- ERC severites
- project-specific field-name templates

Fixes https://gitlab.com/kicad/code/kicad/issues/2145
2020-03-10 18:54:17 +00:00
jean-pierre charras c3beeac977 fix a minor wxWidgets alert. 2020-03-08 10:53:36 +01:00
Jeff Young 535033c5c9 Enable editing of sheet fields. 2020-03-07 18:52:30 +00:00
Jeff Young 2f17cbf242 Flag known DRC violations and exclusions in Plot dialog. 2020-03-06 16:23:44 +00:00
Seth Hillbrand ecbfea68dd ADDED: Allow creation of nets in pcbnew
When editing pcb items, the creation of a new net to connect existing
pads or traces can be a useful shortcut.  This inserts the ability to
optionally create a new net from the Net Selector dropdown menu.
2020-03-04 16:11:47 -06:00
Jeff Young 2359d19cf4 Add menu item to DRC dialog to go to Board Setup / Violation Severities. 2020-03-04 21:52:30 +00:00
Jeff Young d20f36511f Fix issue with severities not get initialised in DRC_TREE_MODELs. 2020-03-04 21:52:30 +00:00
Jeff Young 0894674869 Save severities settings in the DRC dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/3978
2020-03-04 21:52:30 +00:00
jean-pierre charras b7cd0c54c2 Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00:00
Michael Kavanagh 265c1663f9 Remove empty choice in Via type dropdown
Fixes https://gitlab.com/kicad/code/kicad/issues/3968
2020-03-03 22:12:04 +00:00
Andrew Downing a8dea9274f modify behavior of position relative tool
CHANGED: The reset buttons now set the X or Y offset to the current
offset from the reference position. Selecting individual pads as the reference item is now also possible.
2020-03-02 20:55:06 +00:00
jean-pierre charras 911c6eb781 Pcbnew, DIALOG_NETLIST: fix incorrect storage of wx_MessageWindow options.
Config values were not stored into the right variables.

Make also an option persistent during the session
in DIALOG_UPDATE_PCB and DIALOG_NETLIST

DIALOG_UPDATE_PCB and DIALOG_NETLIST match options: use same order in dialogs.
2020-03-01 20:49:56 +01:00
Andrew Downing 2f7ac2b5b4 Don't truncate polar coordinates in position relative dialog/move exact dialog 2020-02-29 02:21:18 +00:00
Jon Evans 9cc5b4b3f9 Fix management of nested settings for PNS 2020-02-27 22:53:00 -05:00
Ian McInerney d5ceb8252e Clean up some warnings 2020-02-28 00:06:52 +00:00
Jeff Young 3860ab9f0c Fix issue returning pointers to items inside std::vector.
(When the vector is re-allocated your pointers become bogus.)
2020-02-27 22:00:51 +00:00
Tomasz Wlostowski f77d2f8cb8 router: option to enable optimization of the track being dragged 2020-02-27 22:02:56 +01:00
Jeff Young 82ae9db262 Another variation on the wxDataViewCtrl issue.... 2020-02-26 17:56:47 +00:00
Jon Evans 9f8ff236d6 Fix load and save of PNS settings 2020-02-25 19:36:36 -05:00
Seth Hillbrand 5b6a4d794f pcbnew: Avoid wx scaling error
When drawing to a scaled DC, the window doesn't reflect the expected
size if scaled after.  This causes elements drawn on the edge to reflect
back into the drawing area instead of being cut off.

We can simply scale our own values to avoid this issue.

Fixes #3849 | https://gitlab.com/kicad/code/kicad/issues/3849
2020-02-25 13:39:04 -08:00
Jeff Young cdad62022b Bug fix for double-click in DRC dialog.
Also better clean-up of highlighting in board editor window.
2020-02-25 12:18:24 +00:00
Jeff Young a4837f7d32 Move DRC dialogs to wxDataView.
This allows for hierarchy and better selection handling.
2020-02-24 23:19:17 +00:00
Jeff Young c5077aeb97 Move weak-reference stuff to UUIDs. 2020-02-24 23:19:17 +00:00
Jeff Young c7ec110fba Only center focused items when they're not visible.
This includes outside the window and behind an occluding dialog.
This keeps the view from jumping around when focusing on nearby
objects.
2020-02-24 23:19:17 +00:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Jeff Young ea025a35e5 Change KUUID to KIID. 2020-02-21 22:20:42 +00:00
Jon Evans e8e3b4f11e Rename UUID to KUUID to fix MSVC build
Also add another newly-required boost flag
2020-02-20 22:07:17 -05:00
Jon Evans affdaa8c33 Fix one more warning 2020-02-20 19:38:32 -05:00
Jeff Young 81dd1d7a68 Timestamp-based paths were ugly. UUID-based ones are worse.
Show a human-readable path in the Edit Footprint dialog.
2020-02-20 21:29:52 +00:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jon Evans 1a216f3703 Change action plugin settings storage to preserve hidden buttons 2020-02-20 11:01:49 -05:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
jean-pierre charras 625249322e Pcbnew: regroup drc files to the already existing drc folder. 2020-02-19 10:31:32 +01:00
Ian McInerney 4fef513a3f Fix library table panel path adding and cleanup duplicate dialog
When adding a .pretty library, if the actual .pretty folder were
selected then no folder would be added to the list of libraries.
This led to an assert when normalizing paths, and the library
not being added.
2020-02-14 19:07:27 +00:00
jean-pierre charras 92af5531bc Fp editor: fix: Reference and Value default values aren't saved
in Footprint Editor preferences

Fixes #3889
https://gitlab.com/kicad/code/kicad/issues/3889
2020-02-11 16:19:00 +01:00
Alexander Shuklin 3d0b3a51f3 Eeschema: Adding back annotation
ADDED: Back annotation algorithm,
eeschema back annotation dialog

CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
2020-01-29 16:33:57 +00:00
jean-pierre charras 418dba440d Pcbnew: DIALOG_FOOTPRINT_BOARD_EDITOR: minor enhancement.
The footprint sheet path (unique ID) is now displayed in this dialog.
2020-01-29 10:00:56 +01:00
jean-pierre charras a98195f650 fix a minor compil warning 2020-01-24 10:15:55 +01:00
Ian McInerney 752bc5b7ba Update technical todo
Add a section mentioning C++20 and the new constexpr
std::string and std::vector that we can use.
2020-01-21 11:03:55 +00:00
Mark Roszko 10a862c458 Recursively add KiCad and GEDA libraries inside a folder
CHANGED: KiCad and GEDA libraries can now be added recursively by selecting a parent folder.
2020-01-21 10:39:07 +00:00
brian piccioni 8341398082 Save footprint errors in the DRC log
Fixes https://gitlab.com/kicad/code/kicad/issues/3754
2020-01-18 01:40:43 +00:00
Ian McInerney 81ee5edcaf Test dynamic_cast for safety from future changes 2020-01-13 15:22:26 +00:00
Ian McInerney e2853862e5 Cleanup redundant type casting 2020-01-13 14:00:45 +00:00
Ian McInerney 36f6b4a9b4 Clean up redundant dynamic casts 2020-01-13 01:39:08 +00:00
Jeff Young 8d0f31f6f4 Clean a bunch of legacy code out of the Filter Selection dialog. 2020-01-12 20:53:56 +00:00
Jeff Young 127c66285b Rename old DIALOG_BLOCK_OPTIONS to DIALOG_FILTER_SELECTION....
... which is what it has done for some time now.
2020-01-12 20:30:58 +00:00
Jeff Young 836c1ea56e Fix a bunch of un-caught boost::bad_pointer exceptions.
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.

Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
2020-01-12 19:55:00 +00:00
Ian McInerney b445ce6632 Clean up pointer casting
* Make note of when dynamic cast is actually needed
* Convert some to static cast when we know the type for sure
2020-01-12 19:45:37 +00:00
Ian McInerney 4ffbefb9dc Use the layer from the module item instead
They are both from the same argument, but this one make coverity happy.
2020-01-12 19:39:39 +00:00
Ian McInerney 3346f812a9 Cleanup error handling in VRML export (from coverity scan) 2020-01-12 17:18:08 +00:00
Ian McInerney f896043067 Fix comments for switch statement fall throughs
This cleans up all GCC warnings (-Wimplicit-fallthrough=2) about
implicitly falling through switch cases.
2020-01-11 19:16:32 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Ian McInerney 9dff31c2ac Remove unused DIALOG_FILE_DIR_PICKER
This class was replaced with native dialogs for choosing
the files and directories
2020-01-07 23:40:00 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Simon Richter 270aaec443 Rewrite FBP files generated with unreleased wxFB
These use a few features that are too new, causing errors when trying to
edit with a released version of wxFormBuilder.
2020-01-07 13:32:33 +00:00
Simon Richter b114dabbed Convert line endings in three FBP files 2020-01-07 13:32:33 +00:00
jean-pierre charras 86f9ed1dd9 Allows pad property only by the kicad_advanced feature.
pad property is allowed if "UsePadProperty=1" is found in kicad_advanced.
2020-01-06 18:11:01 +01:00
jean-pierre charras f2518a5120 ADDED: pad fabrication property, as required in latest Gerber file specification.
Property is a pad info used mainly for fabrication or test.
Currently, supported properties are:
BGA property (variant of SMD pad)
Fiducial (global to the board or local to the footprint)
Test Point
Heat sink
Castellated.
And are used in Gerber files (copper layers and drill files)

Increment BOARD_FILE_VERSION  to 20200104
2020-01-06 16:37:35 +01:00
Ian McInerney 4c1e64628e pcbnew: Modify IDs in panel_fp_lib_table
Move the IDs from the main enum to be local and use
the end of the main enum as the starting point.
2020-01-03 16:10:53 +00:00
Ian McInerney 5d46e721e5 pcbnew: Cleanup includes of pcbnew_id.h
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Mark Roszko 49db816c82 Pcbnew: improve add existing footprint library browser and button
CHANGED: Modify Add Existing Footprint Library button to us OS file/directory browsers
2020-01-03 15:09:26 +00:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Seth Hillbrand 9b7d4e2742 Recleaning DLIST from pcbnew
This was re-introduced by 5d3e6e3d44

The crash happened b/c we have to manage list containers in each element
and minor adjustments cause the rest of the list to be lost.  This
commit re-implements it using std::iterators and deque

Fixes #2623 | https://gitlab.com/kicad/code/kicad/issues/2623
2019-12-10 09:52:07 -08:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
jean-pierre charras 5cd7f3fdee DIALOG_DRC_CONTROL: fix a crash on wxWidgets 3.1.3, Windows,
Happens when right clicking on an item in displayed lists.
The crash was due to a bug in wxWidgets, and the fix is only a workaround

Also remove duplicate code.
2019-12-02 11:27:40 +01:00
Jeff Young 342c8941b5 More cleanup of dialog_find-base.fbp 2019-11-30 01:00:16 +00:00
Jeff Young 1e4437c6df Some cleanup for the Pcbnew search changes. 2019-11-29 21:38:18 +00:00
Fabien Corona 7297822423 pcbnew: search options
-Users can now search DRC markers with string filtering
-GUI changes for consistency with Eeschema

Fixes: lp:1845460
* https://bugs.launchpad.net/kicad/+bug/1845460
2019-11-29 17:58:05 +00:00
Fabien Corona 5d3e6e3d44 pcbnew: search options
-Add a "wrap" option->Search results implemented as a nested list.
-Allow to go back with a "Find previous" button
-Remove the marker search option
-Fix a DLIST issue
-Add a result counter ("eg: hit(s): 1/3")
-Search history limited to 10
-Fix the search history order
-User can include or exclude references/values/texts from results

Fixes: lp:1845460
* https://bugs.launchpad.net/kicad/+bug/1845460
2019-11-29 17:55:01 +00:00
Ian McInerney 9f9b48739c pcbnew: Adjust dimension display after updating units
Fixes: lp:1854167
* https://bugs.launchpad.net/kicad/+bug/1854167
2019-11-27 16:39:13 +00:00
jean-pierre charras 71cd8c57bf ADDED: Pcbnew, add "pin function" (pin name in eeschema) to pads.
The pin name defined in Eeschema is now available as pad info.
Useful for the board designer (the pin function is displayed in the message panel).
Needed for the Gerber P&P files.
2019-11-23 09:12:43 +01:00
jean-pierre charras 3be1862b0f Fix minor wxWidgets alert (with wxWidgets 3.1.3) 2019-11-20 17:53:38 +01:00
jean-pierre charras eadcb5de5e DIALOG_PAD_PROPERTIES: fix incorrect pad type for Aperture option.
The aperture option created a Connector pad only on the paste layer.
This is incorrect: the SMD type only is acceptable.
5connector is *only* for edge card connectors.
Moreover, The dialog did not even accept the setting defined by this dialog...
2019-11-17 18:20:19 +01:00
jean-pierre charras a4c9f961f7 Fix overzealous detection "Warning: No net for component".
- Previously a warning was generated even for not connectable pads
(pads not on copper layers or without pad name).
- The test is now optional and is disabled by default.
(pads without corresponding pin is schematics are a frequent case)

Fixes: lp:1852444
https://bugs.launchpad.net/kicad/+bug/1852444
2019-11-17 16:55:22 +01:00