Commit Graph

590 Commits

Author SHA1 Message Date
Jeff Young 6e72f609f0 Make sure router and via tools update when sizes change.
Also adds a size menu to the context menu for the Via tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/5321
2020-08-31 23:33:02 +01:00
Jeff Young 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 38a4e4ad5a Remove the last bits of the old netlist system 2020-08-30 16:30:04 -04:00
Jon Evans cf17a675b4 Port simulator probing to new connectivity info 2020-08-30 16:05:16 -04:00
Jeff Young 1bd7290309 Repair broken logic in ForceKeepAnnotations.
Fixes https://gitlab.com/kicad/code/kicad/issues/5382
2020-08-29 18:18:23 +01:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
jean-pierre charras a97f2fb22a Eeschema: cosmetic enhancement: add 2 missing icons 2020-08-26 13:00:46 +02:00
Jeff Young 1138c32bf3 Don't pass Cancel event where there was a specific action cancelled.
For instance, if during a move the user hits ESC they only want the
move cancelled, not (for instance) the selection dropped.

Fixes https://gitlab.com/kicad/code/kicad/issues/5356
2020-08-25 12:54:40 +01:00
Ian McInerney 2f7094b352 Cleanup some unused variables
* Make the app progress indicator only have the indeterminate state
  when the taskbar indicator is used (causes an uused variable warning
  on wx<3.1)
* Remove unused dry run variable in pcb_netlist.h
* Remove unused forceDropAnnotations from the paste special dialog
  since the dialog only controls keeping them.
2020-08-24 01:51:23 +01:00
Jeff Young 97c34e2516 ADDED alternate pin definitions and assignments.
Fixes https://gitlab.com/kicad/code/kicad/issues/2002
2020-08-21 18:29:36 +01:00
Seth Hillbrand 7565a08396 eeschema: Add select all to schematic and library editor
Fixes https://gitlab.com/kicad/code/kicad/issues/2497
2020-08-20 16:07:10 -07:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Marek Roszko 1905a23ba1 libedit: fix double msg_panel refresh and use new move event 2020-08-18 13:11:48 +00:00
Marek Roszko 3674064b9e Fix double msgpanel refresh and use the new moved event 2020-08-18 13:11:48 +00:00
Ian McInerney 3b05d7cddd Move more frames to the new UI condition framework
* Frames moved: cvpcb, cvpcb footprints frame, gerbview, pagelayout editor

This also introduces new EDITOR_CONDITIONS that are used to set the
conditions of very common editor settings.

Also, some IDs were converted to tools in the pagelayout editor.
2020-08-16 19:10:25 +00:00
Jeff Young 2b0b7a5153 Clear pin net-name-driving cache when changing annotation.
Also update connectivity after clear annotation, annotate or back
annotate.

Also update status bar for highlighted nets.

Fixes https://gitlab.com/kicad/code/kicad/issues/5170
2020-08-14 12:41:20 +01:00
Wayne Stambaugh 0bb175a028 Eeschema: Add change and update symbol from library support.
ADDED: Add support to to Eeschema to change and update symbols from a
symbol library.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4565
2020-08-13 13:53:49 -04:00
Jeff Young f4ab14f32d Performance improvements for SchematicCleanup().
Fixes https://gitlab.com/kicad/code/kicad/issues/4563
2020-08-10 12:41:52 +01:00
Jeff Young e910dc0092 Make sure lines/wires/busses get default widths if not spec'ed.
Fixes https://gitlab.com/kicad/code/kicad/issues/4854
2020-08-09 21:52:36 +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
Jeff Young dcd02539e3 Remove linked-pin processing from LIB_PIN's setters.
It belongs in the tool layer (specifically LIB_PIN_TOOL).
2020-08-03 22:21:35 +01:00
Jeff Young 5f3fd43b29 Fix uninitialized variable.
Fixes https://gitlab.com/kicad/code/kicad/issues/4948
2020-07-31 17:19:21 +01:00
jean-pierre charras f00c59c446 Fix a few Coverity warnings. 2020-07-29 09:26:57 +02:00
Jeff Young 8a9fa53cd7 Clear annotations by default on copy/paste.
Folks didn't seem to like the "only clear when there are collisions"
behaviour.  Paste Special remains available to "force keep".

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4744
2020-07-27 19:53:42 +01:00
Mark Roszko 7bdb98f961 libedit: Make context menu follow context 2020-07-26 20:16:38 +00:00
Jeff Young 864087890b Fix typo assuming new field value was always the name.
Fixes https://gitlab.com/kicad/code/kicad/issues/4936
2020-07-22 15:10:54 +01:00
Ian McInerney ae45c08ce4 Fix label creation for new netname driven from a pin
LIB_PIN is never used in the connectivity calculation,
so it should use SCH_PIN instead. Additionally, the label
orientation should take into account the orientation of
the component to ensure they don't overlap.
2020-07-19 01:52:34 +01:00
Jeff Young 944c9eac7c Allow Update Schematic from PCB to re-link based on refdes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4306
2020-07-16 18:32:49 +01:00
Jeff Young 11ca21039a Clear new flag when creating image pins.
Otherwise if you then move it we'll think it needs to be inserted
and end up with a circular drawings list.

Fixes https://gitlab.com/kicad/code/kicad/issues/4622
2020-07-16 01:39:29 +01:00
Jeff Young e8079bf655 Make sure UI gets adjusted for Symbol property changes.
For instance, if the number of units is changed from 1 to not-1
or vice versa then we need to rebuild the units selector.

Fixes https://gitlab.com/kicad/code/kicad/issues/4622
2020-07-16 01:39:29 +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 9b92b275de Remove vestiages of old open-PCB-for-settings hack.
We used to have to open a PCB_EDIT_FRAME to get the settings for
the footprint editor and footprint viewer.  This necessitated some
special processing when opening a PCB_EDIT_FRAME to actually edit
a board as it might already be open but unloaded.

Since the new settings architecture allows the footprint editor and
footprint viewer to init themselves we no longer need the special-
case code.
2020-07-11 21:19:49 +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
Jon Evans 4a5792cb87 Fix bus unfolding in the wake of bus entry changes
Since bus entry shape is not a thing anymore,
unfolding routine can be simplified to just use size

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4853
2020-07-09 18:51:42 -04:00
Wayne Stambaugh 4c383c51fa Eeschema: add update symbol from library command to context menu.
Rather than displaying dialog that has every update option possible like
updating footprints in the board editor, this change updates the library
symbol immediately using the symbol library identifier and requires no
additional input from the user.

ADDED: Context menu entry for schematic symbols to update the symbol from
the symbol library using the existing library identifier.
2020-07-08 10:15:24 -04:00
Seth Hillbrand 7cea4b23f1 ADDED: Expand selection in context menu
Break out the context menu with heuristically limited choices being
appended to the main list rather than re-selecting

Fixes https://gitlab.com/kicad/code/kicad/issues/4799
2020-07-07 14:18:35 -07:00
Jeff Young 358cccfd73 A bit of safety if realtime connection updating isn't on. 2020-07-07 14:45:14 +01: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 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
Jon Evans e9b99cc8b7 Fix grabbing connections from power components 2020-07-04 20:59:35 -04:00
Jon Evans b94e29e3b1 Persist ERC pin table in project settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2066

Also a partial fix for https://gitlab.com/kicad/code/kicad/-/issues/4577
2020-07-03 17:11:42 -04:00
Ian McInerney bb1afb747a Remove bus entry shape
The shape isn't needed anymore, since bus entries can be rotated
and mirrored like other items.

Fixes https://gitlab.com/kicad/code/kicad/issues/4588
2020-06-30 02:09:33 +01:00
Jeff Young 6acd35c981 Cleanup. 2020-06-27 20:07:26 +01:00
Wayne Stambaugh 2078e629c5 Eeschema: allow editing of junction properties diameter and color.
Add missing plot and print changes for the new bus entry properties.

ADDED: Junction properties diameter and color can now be edited.

Fixes: https://gitlab.com/kicad/code/kicad/issues/4593
2020-06-24 13:36:17 -04:00
Wayne Stambaugh 853cf2c9b9 Eeschema: make bus wire entry properties editable.
CHANGED: Bus to wire entry object properties line color, width, and style
can now be edited.

Fixes: https://gitlab.com/kicad/code/kicad/issues/4591
2020-06-24 13:36:17 -04: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
jean-pierre charras eef81e84b2 Avoid marking a default name translatable: after translation the result
can be unexpected and broken.
2020-06-06 20:51:50 +02:00
Ian McInerney 4357c1d3b3 Coverity and compiler warning fixes
* Initialize variables
* Test dynamic casts

Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
Jon Evans ae852e17f9 Re-add null component checking in UpdateNetHighlighting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4606
2020-06-03 20:36:30 -04:00
Jeff Young c01046c12f Give new sheets an initial name and filepath.
Fixes https://gitlab.com/kicad/code/kicad/issues/4516
2020-06-02 20:28:20 +01:00
Jeff Young aadc926740 Coverity fixes and "auto" removal. 2020-06-02 17:22:23 +01:00
Wayne Stambaugh 52078a4b1b Allow setting mandatory derived symbol field properties.
CHANGED: All mandatory fields in derived symbols can be edited.  This
not only includes the field value but also all text properties.

Kill the dual datasheet variable storage which caused many datasheet
bugs over the years.  The datasheet is now always stored in the data
sheet field.
2020-06-02 14:21:11 +00:00
Michael Kavanagh 9414f65a3f Eeschema: allow Properties... in wire context menu
Seems to have been forgotten from 91fd0635
2020-05-30 14:29:53 +00:00
Wayne Stambaugh 91fd063585 Eeschema: allow editing of wire and bus properties.
CHANGED: Wire and bus lines properties (color, line width, and line type)
can be edited the same as graphical lines.
2020-05-29 14:33:27 +00:00
Jeff Young f3e4e61fa7 Push some more editing code out to the tool framework. 2020-05-27 23:29:51 +01:00
Jon Evans 1792479ca5 Fix sheet pin import after SelectPoint API change
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4552
2020-05-27 11:21:59 -04:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +01:00
Mikołaj Wielgus ecec7192fc Add "Select All" in schematic & layout disambiguation popup menu
ADDED: "Select All" in schematic editor disambiguation menu
ADDED: "Select All" in layout edtor disambiguation menu

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3877
2020-05-24 23:35:04 +00:00
Jon Evans 77a6550ba9 Fix bus unfolding with prefixes 2020-05-24 19:17:01 -04:00
Jon Evans 699985cd97 Check for nested buses when highlighting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4531
2020-05-24 16:15:22 -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
Jon Evans 1e69f592f6 Rework net highlighting to use connections instead of strings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1933
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3921
2020-05-24 10:46:05 -04:00
Jon Evans a63df2fbf0 Remove BuildNetListBase from netlisting paths 2020-05-23 13:14:05 -04:00
Jeff Young d61b6f965e Flatten some settings and remove some more globals. 2020-05-23 16:50:33 +01:00
Jeff Young 70fb5cac96 Flatten one level of showElectricalTypes settings. 2020-05-23 16:50:33 +01:00
jean-pierre charras 4cfff6b35d Libedit: fix crash when right clicking.
Fixes #4511
https://gitlab.com/kicad/code/kicad/issues/4511
2020-05-22 09:01:29 +02:00
Jon Evans 7c7b7f41da Move SCH_SCREEN project access to SCHEMATIC
SCH_SCREEN no longer needs to be a KIWAY_HOLDER
2020-05-20 22:27:48 -04:00
Ian McInerney c4142a5842 Remaining part of code forgotten by 73a1ce3e 2020-05-20 11:43:50 +01:00
Jon Evans fbc42a8cb5 Move schematic defaults to SCHEMATIC and add some missing settings entries 2020-05-20 00:03:23 -04:00
Jon Evans e1476dea58 Fix build 2020-05-19 23:57:53 -04:00
Jon Evans 4e2e280bf4 Fix part adding 2020-05-19 13:24:57 -04:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Wayne Stambaugh 980aefea4b Eeschema: fix copy and paste bug.
Add required library symbols to new file formatter and parser when copying
schematic symbols to prevent missing library symbol when pasting into a
different schematic which may not have the same library symbol available.

Fix a minor bug where the default schematic symbol reference was not set
by the parser when loading.

Fixes https://gitlab.com/kicad/code/kicad/issues/4442
2020-05-15 15:53:59 -04:00
Wayne Stambaugh ad88874adf Use new file formats for copy and paste in schematic and symbol editors. 2020-05-13 18:56:19 -04:00
Jeff Young 4a1ee40058 Pretty print bus definitions to the menus. 2020-05-13 16:26:53 +01:00
Jeff Young ba301c292a Check for single item seletion for most property dialogs. 2020-05-13 13:42:23 +01:00
Jeff Young ec5f7b35a9 Attempt to fix crash with RMB on un-selected graphic line.
Fixes https://gitlab.com/kicad/code/kicad/issues/4414
2020-05-12 19:48:59 +01:00
Jeff Young 724c669434 Move a few more commands to tool framework. 2020-05-12 18:12:38 +01:00
jean-pierre charras b29f55c1ca Cosmetic minor changes for 2 icons.
Avoid using the same icon for 2 different actions in the same screen or menu.
2020-05-09 16:22:29 +02:00
Wayne Stambaugh 1840fe351e Eeschema: fix assertion when duplicating a sheet.
The duplicate sheet code path assigned a SCH_SCREEN object instead of a
SCH_SHEET object as a parent.  A recently added assertion to check for
this did it's job.

Fixes https://gitlab.com/kicad/code/kicad/issues/4369
2020-05-08 14:57:44 -04:00
Jeff Young 73e1496b25 Change attached-label algorithm.
Rather than try and keep moving with other items, calculate nearest
point on current line to original label at each step.

Fixes https://gitlab.com/kicad/code/kicad/issues/4347
2020-05-07 18:59:47 +01:00
Jeff Young 51e72ed9ba Finish the collect-attached-labels rewrite.
Fixes https://gitlab.com/kicad/code/kicad/issues/4341
2020-05-06 20:38:12 +01:00
Jeff Young f6d1aa1f42 Fix some failures to drop hover selections after executing a command.
Fixes https://gitlab.com/kicad/code/kicad/issues/4330
2020-05-06 19:02:21 +01:00
Jeff Young 0f34fc2e5f Simplify the "pick up attached labels" logic.
This should vastly reduce the number of side-effects we were seeing.

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4320
2020-05-06 15:48:58 +01:00
Wayne Stambaugh 590a101a88 Eeschema: fix update schematic symbol library link bugs. 2020-05-05 18:06:43 -04:00
Wayne Stambaugh 9c99286385 Fix a few Coverity warnings. 2020-05-05 16:42:59 -04:00
Wayne Stambaugh 7183e9f97e Make the new schematic and symbol library file formats the default.
This is a very large and potentially disruptive change so this will be an
unusually long and detailed commit message.

The new file formats are now the default in both the schematic and symbol
library editors.  Existing symbol libraries will be saved in their current
format until new features are added to library symbols.  Once this happens,
both the legacy schematic and symbol file formats will be no longer be
savable and existing libraries will have to be converted.  Saving to the
legacy file formats is still available for round robin testing and should
not be used for normal editing.

When loading the legacy schematic file, it is imperative that the schematic
library symbols are rescued and/or remapped to valid library identifiers.
Otherwise, there will be no way to link to the original library symbol and
the user will be required manually set the library identifier.  The cached
symbol will be saved in the schematic file so the last library symbol in
the cache will still be used but there will be no way to update it from the
original library.

The next save after loading a legacy schematic file will be converted to
the s-expression file format.  Schematics with hierarchical sheets will
automatically have all sheet file name extensions changed to .kicad_sym
and saved to the new format as well.

Appending schematics requires that the schematic to append has already been
converted to the new file format.  This is required to ensure that library
symbols are guaranteed to be valid for the appended schematic.

The schematic symbol library symbol link resolution has been moved out of
the SCH_COMPONENT object and move into the SCH_SCREEN object that owns the
symbol.  This was done to ensure that there is a single place where the
library symbol links get resolved rather than the dozen or so different
code paths that previously existed.  It also removes the necessity of the
SCH_COMPONENT object of requiring any knowledge of the symbol library table
and/or the cache library.

When opening an s-expression schematic, the legacy cache library is not
loaded so any library symbols not rescued cannot be loaded.  Broken library
symbol links will have to be manually resolved by adding the cache library
to the symbol library table and changing the links in the schematic symbol.

Now that the library symbols are embedded in the schematic file, the
SCH_SCREEN object maintains the list of library symbols for the schematic
automatically.  No external manipulation of this library cache should ever
occur.

ADDED: S-expression schematic and symbol library file formats.
2020-05-04 12:40:03 +00:00
Jeff Young 5bed201a23 Don't collect connected labels on a paste.
Fixes https://gitlab.com/kicad/code/kicad/issues/4311
2020-05-03 21:47:53 +01:00
Jeff Young 199bb2ffb0 Add hittesting for worksheets in Pcbnew and Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/4282
2020-05-03 00:07:38 +01:00
Wayne Stambaugh fa57c8a570 Eeschema: fix sheet bug in schematic editor drawing tool.
SCH_SHEET objects can only have another SCH_SHEET object as a parent
or nullptr for the root sheet so overload EDA_ITEM::SetParent() to
prevent the parent from being set to another type of object and add
some checks to the root sheet code just in case someone gets clever
and attempts to bypass the overloaded SetParent() call.
2020-04-26 14:27:51 -04: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
Jeff Young 7308099852 Add an icon and put Schematic Setup in the toolbar. 2020-04-24 14:46:22 +01:00
Ian McInerney facf40d3ce libedit: Add drag to move behavior
ADDED: Drag to move behavior in the symbol editor

Fixes https://gitlab.com/kicad/code/kicad/issues/1904
2020-04-23 23:58:33 +01:00
Jeff Young f113370e1e Edit worksheet properties when no other selection is available.
Fixes https://gitlab.com/kicad/code/kicad/issues/4044
2020-04-21 21:17:59 +01:00
Jeff Young a286cb5a8f Keep labels on dragged wires.
Fixes https://gitlab.com/kicad/code/kicad/issues/2107
2020-04-19 18:24:39 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Jeff Young 42cd604c3c Expose Show Hidden Fields to GUI.
Fixes https://gitlab.com/kicad/code/kicad/issues/2010
2020-04-18 16:36:51 +01:00
Jeff Young d7d1cb6f78 A bunch of fixes to Eeschema Find/Replace. 2020-04-18 14:43:08 +01:00