Commit Graph

316 Commits

Author SHA1 Message Date
Jon Evans c1a724377f Fix AUI pane caption colors for dark mode 2020-10-10 14:55:32 -04:00
Jeff Young 04c4012ee6 Make track/via sizes UI more predictable and compatible with DRC.
Two main changes: netclass values need to go through the DRC engine
so they can interact with other rules.  They're also now dependent
on the layer being routed as well as the start object.

Also make the controls adjust to each other better.  For instance,
copy-track-width needs to turn off when you select a particular
track width, and a particular track width needs to zero out when
you choose copy-track-width.

Fixes https://gitlab.com/kicad/code/kicad/issues/5951
2020-10-10 19:32:30 +01:00
Ian McInerney 43c14face0 Switch to showing metric/imperial units in comboboxes and menus
This will always show 1 unit from each system, with the primary unit
being the current frame unit and the secondary unit being the
most recent unit used from the other system. These are saved in
the settings, so they are saved between runs.
2020-10-05 20:26:33 +01:00
Jon Evans 0eaf7bfd1f Ensure visible layers are synchronized properly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5873
2020-10-04 16:55:22 -04:00
Ian McInerney b1bd1f2a97 Introduce new action to switch to mils as a unit 2020-10-04 17:53:55 +01:00
jean-pierre charras 87a220b8e2 more cleanup about removing useless include 2020-10-02 14:51:11 +02:00
Ian McInerney 481026e901 Move microwave tools into a group on the main drawing toolbar
ADDED: Drawing group for microwave tools on main drawing toolbar
REMVOED: Microwave toolbar no longer exists
2020-10-01 19:47:55 +01:00
Jon Evans 6f54a9982c Remove PCB_LAYER_WIDGET 2020-09-30 19:12:26 -04:00
Jeff Young 6abe68fff0 Cleanup. No changes to execution. 2020-09-30 23:07:12 +01:00
Jon Evans 7c003f98d5 ADDED: Appearance panel for footprint editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5643
2020-09-30 17:46:58 -04:00
Jeff Young d70f812255 Fix some initialisation issues in the Python framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/5824
2020-09-29 14:11:32 +01:00
Jeff Young db1d3ea710 Update track, via and pad clearances for the current layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5797
2020-09-27 21:33:37 +01:00
Jeff Young 09ab269770 Support for 'L' in DRC expression language.
Also make layer testing work again against both canonical names and
user names.
2020-09-27 21:33:37 +01:00
Ian McInerney fc565edb33 Add a palette to the toolbars to display groups of actions
This adds a palette to toolbar items that displays groups
of actions when long-pressed on a button.
2020-09-27 01:00:44 +01:00
Jeff Young 7f33c229d8 Allow selection of nested items (ie: pads) inside an entered group.
Also moves some group-related functionality from BOARD to PCB_GROUP.
2020-09-26 20:35:52 +01:00
Jon Evans ff652d5375 Fix saving colors modified outside of preferences 2020-09-24 17:29:40 -04:00
Jeff Young dba42ebed0 ADDED Properties Dialog for groups.
ADDED memberOf() function for DRC rule expressions.

Also fixes a bug in several of the pickers where the event wasn't
being correctly passed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5647
2020-09-24 14:41:02 +01:00
Jon Evans acf13a1869 ADDED: Orthogonal dimension object 2020-09-21 23:55:02 -04:00
Jon Evans 18e17abd6a Rename "Keepout" to "Rule Area"
These objects can now be used in advanced DRC rules and
not just for keeping things out.  Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.
2020-09-21 23:55:02 -04:00
Ian McInerney d3dd1c45b6 Disable editing tools on the canvas when DRC is running 2020-09-21 20:39:46 +01:00
Jeff Young 865249c227 Handle two panels both referencing same colour theme.
Fixes https://gitlab.com/kicad/code/kicad/issues/5185
2020-09-21 11:59:27 +01:00
Jeff Young 81b523f9a4 Make sure the board itself is in the item map.
Also makes closing the DRC dialog a bit more foolproof.

Fixes https://gitlab.com/kicad/code/kicad/issues/5665
2020-09-18 00:53:14 +01:00
Seth Hillbrand 45ca1709bb Unify scripting dirs and open user-based
This consolidates python scripting in two locations: the system-wide
package-based location and the user configuration location.  It also
updates the "Show Scripting Folder" action to open the user
configuration location instead of the package-based one.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5115
2020-09-16 20:09:23 -07:00
Jon Evans e9b627bfd8 ADDED: Center marker dimension type 2020-09-16 20:55:11 -04:00
Jon Evans 4a25db599e ADDED: Deselect net action
You can now deselect nets and netclasses (i.e. remove them from the
active selection) via the context menus in the appearance panel
2020-09-16 19:10:12 -04:00
Jon Evans 75ffce1a0b ADDED: Leader dimension object
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5555
2020-09-15 23:37:38 -04:00
Jeff Young e2e229da96 Finish exorcising the old DRC system.
This moves the various BOARD_ITEM calls to the new system, and make
the DRC_ENGINE long-lived so that it can field those queries.
2020-09-15 20:15:46 +01:00
Jeff Young 514da2f886 Move DRC dialog to new DRC engine. 2020-09-14 22:39:36 +01:00
Jon Evans a80190e206 Make sure auto-unit dimensions are updated on board load 2020-09-12 11:52:59 -04: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
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
Mark Roszko 9f128f942c Move shutdown blocker to kiplatform 2020-09-01 10:14:51 +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 d0479eb92c Fix signed/unsigned comparison that was destined to fail. 2020-08-31 12:53:15 +01: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
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
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
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
Jeff Young fba6152709 Force wxWidgets to set widths smaller than BestWidth(). 2020-08-24 00:49:08 +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
Jon Evans 0fa755ebb8 Don't refresh appearance panel until after project is loaded 2020-08-22 15:40:43 -04:00
Jeff Young 80846dcbc7 Improve shutdown performance. 2020-08-21 19:12:51 +01: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
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
Jeff Young 6450ee2f2c Prevent crash if board doesn't have any layers in the layer preset. 2020-08-20 00:51:16 +01: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
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
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
Jon Evans 54682d39ff Remember width of right AUI panel in PcbNew 2020-08-16 14:33:40 -04:00
Jeff Young f83a9c0a22 Clean up some OSX issues in new appearance panel. 2020-08-15 23:26:58 +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 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
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
Ian McInerney dbede14ed2 Remove extra include accidentally added 2020-08-10 10:43:19 +01:00
jean-pierre charras 19602b0806 Pcbnew: do not include swig/python_scripting.h when compiling without python support.
Fixes #5132
https://gitlab.com/kicad/code/kicad/issues/5132
2020-08-10 11:35:52 +02:00
Jon Evans ec0d8dc5e5 Fix inadvertent change to license text 2020-08-09 16:09:26 -04:00
Ian McInerney c458b50fd9 Ensure the environment variables are synchronized between KiCad and Python
Before this, the environment variables inside Python wouldn't reflect
the updates to them made after the interpreter was started in Pcbnew.
This will call into Python and set the variables when they are changed,
since Python can't synchronize itself when running in an embedded
interpreter.

Fixes https://gitlab.com/kicad/code/kicad/issues/5071
2020-08-09 19:56:12 +01:00
Ian McInerney e57499fde9 Fix where the Python plugins are pointing to
This isn't truely correct, because it is pointing to the
main KiCad path, but it is more correct than pointing to
the system path. This should really be pointing to the
user path

(see https://gitlab.com/kicad/code/kicad/-/issues/5115)
2020-08-09 19:56:12 +01: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
Jon Evans 2d84092457 Fix build issue in c9925704 2020-08-09 12:43:05 -04:00
Jon Evans 43ab43ec9e Fix a few issues with Close Project
A new empty project needs to be reopened for now
Footprint info cache write only works with a project for now
2020-08-09 11:13:50 -04:00
Jeff Young c992570427 Add Open Python directory to menus.
Fixes https://gitlab.com/kicad/code/kicad/issues/5115
2020-08-09 15:39:51 +01:00
Jeff Young f2812773d4 Better handling of undefined values in Rule expressions.
This is particularly important to keep the user from having to
enter overly verbose statements such as:
A.Type == 'via' && A.Via_Type == 'buried'
when:
A.Via_Type == 'buried'
is perfectly clear.
2020-07-23 16:41:58 +01:00
Jeff Young 1790c536ef Allow user layer names to be used in DRC rules.
I imagine this will also fix the property inspector, once it
gets merged.
2020-07-20 23:28:54 +01: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
Jeff Young 3fd0a3f842 Update text variables even when they're changed from other binary.
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
Jon Evans d349b24f7a Unlink board from project before close
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4876
2020-07-13 20:48:18 -04: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
Jon Evans 72b08f2b18 ADDED: Hide ratsnest for specific nets
List of hidden nets stored in project local settings
Hide/Show actions in context menu only for now, will
add them to some more GUI places soon.

Ref https://gitlab.com/kicad/code/kicad/-/issues/1951
2020-07-10 21:06:17 -04:00
Jeff Young e66523586b Add Assign Netclass... to context menu.
ADDED Assign Netclass feature to EEschema.

Netclass assignments also now shown in status bar.

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-07 14:23:39 +01:00
Jeff Young 2819570d1e Push panel_setup_netclasses down into common. 2020-07-06 20:00:50 +01:00
Jon Evans 2a1550d1d2 Don't crash when failing to deserialize old exclusions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4820
2020-07-06 12:53:55 -04:00
Jon Evans fe5959b625 Remove the schematic and board backup file system
Per discussion on the developers list, this old system
no longer provides much value and is seen as annoying
by many users.  The new save logic should prevent any
cases of file corruption on save, which was a major
reason for the backup file system existing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2012
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 65f5ebd8f2 ADDED: Persistent selection filter UI for PcbNew 2020-06-28 15:12:47 +00: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
Seth Hillbrand 8c57821e9b pcbnew: Move ratsnest items to separate folder 2020-06-16 11:15:14 -07:00
Jeff Young c48f4272f3 Collapse a level out of the zoom settings.
The APP_SETTINGS_BASE now holds the list of zoom factors, and
the old legacy (screen-based) code has been removed.
2020-06-13 22:44:16 +01:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Wayne Stambaugh ee8cf01ff5 Pcbnew: fix issue when updating board from schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/4607
2020-06-10 14:21:46 -04:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +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
Ian McInerney fca7ade81f Move to the AUI version of the infobar
The sizer-based version had issues with the event processing
inside the GAL panel on Windows systems.

Fixes https://gitlab.com/kicad/code/kicad/issues/4501
2020-05-21 18:22:56 +01:00
Ian McInerney 73a1ce3e84 Move eeschema find notification to the infobar and improve the infobar widget
* Move it to a panel along with the canvas to have a better UI
* Allow the infobar to automatically close after a set time

CHANGED: The eeschema find notifications now use the infobar instead of
a popup window
2020-05-20 02:31:47 +01:00
Ian McInerney a2f027e063 Add an infobar widget to display information above the canvas
This widget allows for non-intrusive display of text
above the editing canvas. Currently, this is used
for displaying the read only status of the files.
2020-05-19 00:46:33 +01:00
Ian McInerney e662e33104 Store the current filename in the history on close 2020-05-17 00:12:49 +01:00
Jon Evans f2e003147e ADDED: Enable color themes for PcbNew printing 2020-05-16 13:19:43 -04:00
jean-pierre charras d5b4473830 PCB_EDIT_FRAME: when calling Eeschema from toolbar, use new .kicad_sch ext.
Fixes #4450
https://gitlab.com/kicad/code/kicad/issues/4450
2020-05-15 10:45:33 +02:00
jean-pierre charras c3b50d38dd Pcbnew: Update PCB from schematic: try to load .kicad_sch file instead of .sch file 2020-05-12 10:16:40 +02: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
Ian McInerney d006acecf4 More window sizing fixes
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
  so that we can then save it in the config if the
  window is maximized. Otherwise the config ends up
  with the maximized size saved, and weird behavior
  occurs when unmaximizing on the next opening.
2020-04-27 00:14:12 +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
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
Ian McInerney 3b67e3d0a4 Rewrite window positioning logic
Now only reposition a window if it is completely on a
disconnected display or if only one corner is on screen
and it is within a region close to the screen border.

CHANGED: Window position on startup should be preserved more
2020-04-18 00:47:38 +01:00