Commit Graph

10098 Commits

Author SHA1 Message Date
Jeff Young e7ee6e1f26 Modified flags are handled by SCH_COMMIT. 2023-06-25 16:01:35 +01:00
Jeff Young 9854acd9e6 Don't set IS_CHANGED on symbol when modifying LIB_PINs for painting. 2023-06-25 16:01:35 +01:00
Ian McInerney 118b815824 Get proper LINE_MODE type from tool event.
Properly fix https://gitlab.com/kicad/code/kicad/-/issues/15053
2023-06-25 13:43:32 +01:00
Ian McInerney b00361d136 Revert "Don't use TOOL_EVENT parameters for line modes."
This reverts commit 84a63f7daa.
2023-06-25 13:37:58 +01:00
Jeff Young 84a63f7daa Don't use TOOL_EVENT parameters for line modes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15053
2023-06-25 11:10:07 +01:00
Jeff Young 493828cc6b Eradicate a bunch of calls to dyn_cast.
Also deletes PAD::GetParent() which fails to look for parent footprint
through groups.
2023-06-25 11:10:07 +01:00
Jeff Young 300a60e88e Eradicate a bunch of calls to dyn_cast. 2023-06-25 11:10:05 +01:00
Jon Evans d4b7144448 Properties: expose symbol attributes
Flip polarity of exclude-from-BOM and -board for symbols
to match that of footprints and match the GUI display.
2023-06-24 22:03:06 -04:00
Jon Evans f0d8edae1e Move sch properties panel to using default AUI pane info struct 2023-06-24 20:09:07 -04:00
Jon Evans bf2e9f8261 Properties for SCH_LINE
Also rename an incongruous setter
2023-06-24 20:08:42 -04:00
Jeff Young 1c1849ec1a Clear IS_MOVING (as well as IS_NEW) in SCH_COMMIT::Push().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15051
2023-06-24 17:15:43 +01:00
jean-pierre charras 1094cc5331 Fix issues related to the splash screen when no config file found:
- do not show it before the application is actually started.
- hide the splash screen before displaying dialogs.
Fixes #15047
https://gitlab.com/kicad/code/kicad/-/issues/15047
2023-06-24 18:09:43 +02:00
Alex Shvartzkop bce643feae Don't draw LIB_PIN and SCH_LINE on OP layers when OP is empty.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15041
2023-06-24 16:01:58 +03:00
Jeff Young 4764606a9d Sheet pins are owned by their parents, so the parent must go in the SCH_COMMIT.
Also collapses a bunch of duplicated code.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15044
2023-06-24 12:35:48 +01:00
jean-pierre charras 830b67ead7 Eeschema: SaveSettings() : save visibility of Properties Panel in config. 2023-06-24 08:44:34 +02:00
Jeff Young a901247cbd Rebuilding connectivity must be done after changes are committed.
It also needs to be done after undo and redo.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15028
2023-06-23 22:10:17 +01:00
Jeff Young 237cc7eee1 Move TestDanglingEnds() to SCH_COMMIT.
Also fixes a bug where Convert Symbol wasn't undoable.

Also cleans up some SetModified() call no longer needed with SCH_COMMIT.

Also fixes bug where revert of a modification didn't update the screen's
RTree.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15030
2023-06-23 19:59:46 +01:00
jean-pierre charras db8201717d SCH_FIELD::GetCanonicalName() : the name must be the not translated name,
previously, it returned the translated string, by definition not the
canonical name
2023-06-23 17:48:19 +02:00
Jeff Young aa6d9ad69a Clear IS_NEW flags on commit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15037
2023-06-23 15:30:09 +01:00
Jeff Young 1c13f5a0db Fix selection shadown drawing for global labels.
(The border should get shadowed, and the shape should get filled if
m_Selection.fill_shapes is set.)
2023-06-23 15:30:09 +01:00
Jon Evans 7804c2177c Do not force focus on dataview in RC dialogs
On GTK, this causes the first item to be selected, firing the
selection handler and causing unwanted side effects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11925
2023-06-23 08:09:53 -04:00
jean-pierre charras 1698fb6608 Refinement of commit 355575e4 (drawing shadow texts of RULER_ITEM and pin names)
Also handle non Kicad fonts (that do not use shadow texts)
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-06-23 10:32:23 +02:00
Jon Evans 3a0f8214fa ADDED: Properties panel for schematic editor
Initial infrastructure work; follow-ons will add more
properties for schematic items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6351
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14105
2023-06-22 22:32:24 -04:00
Jon Evans 39a5929f33 Database libraries performance improvements
Rework caching system and optimize queries
2023-06-22 18:49:37 -04:00
Erik Agsjö bc0da92703 Fixes after merge request feedback 2023-06-22 16:20:05 +00:00
Erik Agsjö 2651d7ff5b Fixes crash in wire property dialog
Fixes crash when changes are applied with the style combo in the
indeterminate state.
2023-06-22 16:20:05 +00:00
Jeff Young f892194be4 Don't reset page unless we have to.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15033
2023-06-22 16:56:52 +01:00
jean-pierre charras 355575e477 Fix some (minor) issues when drawing shadow texts of RULER_ITEM and pin names.
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-06-22 13:28:43 +02:00
Jeff Young 7138e8a62e Don't double-create pins when migrating old models. 2023-06-21 16:34:35 +01:00
Mike Williams 043ed0b148 Schematic: fix up more field ID parsing to fix QA 2023-06-21 10:51:28 -04:00
Ian McInerney 19f5c16708 Ensure const-ness matches across draw wire event parameters 2023-06-21 14:06:25 +01:00
Ian McInerney a2bd7192c0 Add default empty symbol to place symbols/power actions 2023-06-21 13:42:21 +01:00
Mike Williams 5b4ddaba89 Schematic: fix field parsing when some mandatory fields are missing 2023-06-20 22:05:03 -04:00
Ian McInerney 480223f67c More RunAction specialization 2023-06-20 21:52:50 +01:00
Ian McInerney b04e54dbea Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
2023-06-20 21:52:50 +01:00
Mike Williams 1d26b454f4 SCH -> PCB Fields: bump file versions 2023-06-20 18:34:52 +00:00
Mike Williams a24c55affe PCB Fields: fix up python, API
Remove SetFields from both symbol and footprint, it doesn't handle
mandatory fields and is unlikely to ever be safe.
2023-06-20 18:34:52 +00:00
Mike Williams 85f889bc19 Fields: Description now mandatory
Propagate from symbols to footprints, footprints keep a library
description, too. (GetLibDescription())
2023-06-20 18:34:52 +00:00
Mike Williams 7d84fa2a9d Validators: drop unused is m_isLibEditor 2023-06-20 18:34:52 +00:00
Mike Williams ddafa2e75d Common: move SCH_FIELD_VALIDATORS to FIELD_VALIDATORS
Fields are now common across PCB/SCH
2023-06-20 18:34:52 +00:00
Mike Williams 941d9c957d Netlist: export fields in its own section 2023-06-20 18:34:52 +00:00
jean-pierre charras a9fff82664 spice_library_parser: catch an exception thrown when a spice model cannot be built.
Fixes #15012
https://gitlab.com/kicad/code/kicad/-/issues/15012
2023-06-20 10:26:42 +02:00
Jeff Young b1cdcca9e6 Use hypertext link for Edit Ingored Tests in both ERC and DRC.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15010
2023-06-19 23:53:42 +01:00
Jeff Young 5b12b5d031 Cleanup. 2023-06-19 23:03:01 +01:00
Jeff Young 0b58fdb910 Use KIUI to specify the simulation plot axis fonts.
Also fixes a bug in generating the x-axis for the first trace.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14997
2023-06-19 22:53:08 +01:00
Jeff Young 30336b2fe3 Unify go-back-one-step processing for drawing tools (and router).
Also warps mouse on all go-back-one-step operations for better feedback.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14981

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9985
2023-06-19 17:14:32 +01:00
Jeff Young e9046076a6 Fine-tune SCH_COMMIT handling of child objects.
While a SCH_SHEET does indeed have a SCH_SHEET parent, it's not one of
the children that gets added as a CHT_MODIFY of its parent.

Also fixes a bug where the newly drawn sheet gets removed from the
preview before running the dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14976
2023-06-18 16:52:11 +01:00
Jeff Young 9199d7a781 Update simulation results as the sim runs.
Also adds a time axis which grows by 2X at a time rather than to the
size of the current data.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11255
2023-06-18 16:52:11 +01:00
jean-pierre charras 9447c3d455 symbol editor: fix issue after loading a symbol from a library.
Selected items become invisible.
(similar to the issue fixed by commit b622e3a3f7)
Fixes #14151
https://gitlab.com/kicad/code/kicad/issues/14151
2023-06-18 17:17:16 +02:00
Jon Evans fc69939190 ADDED: GUI feedback when grid setting is changed by hotkey
Can be extended to other cyclical hotkey settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-06-17 23:18:50 -04:00
Jeff Young b1d5da3da3 Allow ngspice to run in the background.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14085
2023-06-17 23:54:33 +01:00
Jeff Young e3eb0abc5f Recompute intersheet refs while printing.
Also fixes a bug where the schematic offset wasn't being added to
intersheet refs when printing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14978
2023-06-17 18:12:13 +01:00
Mike Williams f9d4b75726 Symbol Fields Table: performance optimizations
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14972
2023-06-17 12:56:00 -04:00
Jeff Young cf4f0723f8 Select first unassigned symbol when running CvPCB.
Also cleans up some dead code, and makes more use of sharing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9938
2023-06-17 12:44:59 +01:00
Jeff Young ef6866757e Treat undo as backspace and/or escape when drawing. Ignore redo.
Undo == backspace when drawing a polygon or chained lines.  Otherwise
it's an escape.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14961
2023-06-16 22:08:21 +01:00
Alex Shvartzkop d3be62f644 Adapt panels to PAGED_DIALOG sizing algorithm.
Also some cosmetic fixes (GTK).
2023-06-16 19:12:37 +03:00
Alex Shvartzkop caf0bb6baa Cosmetic fixes in schematic formatting panel (GTK) 2023-06-16 19:12:37 +03:00
Alex Shvartzkop f5da58e17d PAGED_DIALOG: allow setting initial size in ctor. 2023-06-16 18:53:00 +03:00
Jeff Young b44c547aa6 Don't let selection VIEW_GROUP get lost from VIEW.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14969
2023-06-16 16:03:37 +01:00
Jeff Young 8259091ca1 Fix typo in new SCH_COMMIT architecture for shape drawing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14976
2023-06-16 15:50:51 +01:00
Jeff Young 75e78f9088 Move bitmap2cmp and pcb_calculator to tool framework.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1939

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7561
2023-06-16 15:37:58 +01:00
Ian McInerney 4761815f36 Fix reversed arguments in ltspice importer 2023-06-15 23:01:39 +01:00
Ian McInerney b73cc7db4a Fix a few accidental copies in loop iterators 2023-06-15 22:57:05 +01:00
Jeff Young 150e2b8a19 Separate BITMAP2CMP_PANEL from BITMAP2CMP_FRAME.
This is primarily to allow wxFormBuilder to create the panel without
the dangerous hack of passing a wxWindow ID into KIWAY_PLAYER's ctor.
2023-06-15 17:39:10 +01:00
Jeff Young abc0c19d64 Separate SIMULATOR_PANEL from SIMULATOR_FRAME.
This is primarily to allow wxFormBuilder to create the panel without
the dangerous hack of passing a wxWindow ID into KIWAY_PLAYER's ctor.
2023-06-15 17:39:10 +01:00
Jeff Young 5c4ca9f092 Renaming to support potential future usage of SIMULATOR_PANEL as a panel within SIMULATOR_FRAME. 2023-06-15 17:39:10 +01:00
Wayne Stambaugh fc1d540036 Fix a Coverity issue in the net navigator code. 2023-06-15 08:00:08 -04:00
Ian McInerney 1f5719ef3a Pass proper parent to symbol viewer frame when changing symbols
Fixes sentry KICAD-1Z9
Fixes sentry KICAD-22J
2023-06-14 21:25:06 +01:00
Wayne Stambaugh 4ccbbde54a Net navigator bug fixes and improvements.
Note: This changes the net highlight tool behavior.  When clicking on an
      already highlighted net, the net highlighting is no longer toggled
      off.  This prevents the net navigator panel from being cleared.
2023-06-14 09:57:55 -04:00
Jeff Young 46564055f4 More protection around an exceedingly dangerous hack.
The API is needed for wxFormBuilder, and I couldn't figure out any
way around it, but we can at least reduce the risk of someone calling
it accidentally (again).
2023-06-14 12:52:49 +01:00
Kuba Sunderland-Ober e852d04043 Ensure the bitmap exported to the clipboard is valid.
Fixes #14808
https://gitlab.com/kicad/code/kicad/-/issues/14808
2023-06-13 20:47:06 +00:00
Wayne Stambaugh 5a7f95e8da Allow for library symbols to derived from derived symbols.
This change allows for infinite inheritance depth so internally there is
no limit to deriving library symbols from other derived symbols.  Please
note that the Flatten() method now recurses until a symbol with no parent
is found.  The user interface is not hooked up at this time.
2023-06-13 15:52:42 -04:00
Jeff Young 20d2568f0c Move where we fire EDA_EVT_SCHEMATIC_CHANGED again.
The location in HARD_REDRAW got called everytime we change schematic
pages, which is not what we want.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14945
2023-06-13 16:36:05 +01:00
Jeff Young 4f39cb0789 Fix SCH_COMMIT handling in TwoClickPlace. 2023-06-13 13:21:11 +01:00
Marek Roszko a87fada9e5 Minor tweaks to support wx3.3 2023-06-12 20:52:47 -04:00
Ian McInerney d96580c651 Properly handle improper symbols when pasting in symbol editor
Before, an improper symbol (one without the starting toekn) weren't
detected and reported to the user properly and would instead assert. Now
properly detect these and pass the error up the stack to the tool.

(Sentry issue KICAD-21J).
2023-06-12 23:14:56 +01:00
Jeff Young 28075e6efe Don't crash on empty selection in search list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14931
2023-06-12 23:07:27 +01:00
Jeff Young 782c73300b Move drawing sheet datastructures to EDA_IU_SCALE.
Or mostly, at least.  Plotters still define their own mils-to-iu scale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14934
2023-06-12 22:34:25 +01:00
Seth Hillbrand 62f24aca1e Fix Connectivity Asserts in new COMMIT structure
The connection graph should only be updated within the commit structure
because this is the only time the connectivity should be changed.  We
want any connectivity changes to be included in the commit as well, so
this should be stored prior to the undo/redo list mods
2023-06-12 13:35:06 -07:00
Jeff Young 286716a1ff Retire AddItemToCommitAndScreen()
It duplicates a bunch of stuff in SCH_COMMIT and isn't really
compatible with it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14933
2023-06-12 19:34:23 +01:00
jean-pierre charras a29f261d31 dialog_sim_model: ensure the Model panel is always correctly built.
Fixes #14904
https://gitlab.com/kicad/code/kicad/-/issues/14904
2023-06-12 16:41:21 +02:00
Jeff Young 451b9e20a1 Tighten up layer handling for LIB_SYMBOL.
We have to draw the parent symbol on the union of all layers that
its children might reside on, but we only want to draw each child
on its layers.

And we need to make sure LAYER_PRIVATE_NOTES gets into the layers
order list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13943
2023-06-12 15:38:56 +01:00
Jeff Young a3f62cc8de Don't presume a sheet-path while reading files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14920
2023-06-12 13:42:15 +01:00
Jeff Young b7f0aae006 Nullptr safety for UI Conditions.
We don't really control when these are called, so best not to assume
we've finished initialization of the frame/screen/document/whatever.

Possible fix for KICAD-KY.
2023-06-12 12:38:50 +01:00
Jeff Young 6502787c7a Formatting.
It's annoying to keep searching for "LIB_FIELD*" and come up empty....
2023-06-12 10:48:39 +01:00
CraftedNightmare aa667bea0f eeschema: Fix Search pane not remembering docking sizes and positions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14120 for eeschema
Fixes that Show Search Panel Checkbox can get out of sync when restarting
eeschema while the search pane is active
2023-06-11 20:23:24 +00:00
Jeff Young 96073402ce Don't accidentally add NULL ptrs to the LibSymbols cache.
Operator[] will add a blank element if it isn't found in the map.

Probably Sentry KICAD-23Y.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14927
2023-06-11 15:50:24 +01:00
Roberto Fernandez Bautista 3d1b96d6ca Cleanup jobs handlers (+Fix build) 2023-06-11 00:12:53 +02:00
Jeff Young 61493b8489 Return all results with an empty search pane filter.
Also moves the EDA_EVT_SCHEMATIC_CHANGED event so it fires after the
schematic has been loaded.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14871
2023-06-10 23:05:57 +01:00
Roberto Fernandez Bautista 3f758711fd Use external REPORTER for EESCHEMA_JOBS_HANDLER / PCB_JOBS_HANDLER 2023-06-10 23:35:32 +02:00
Jeff Young 180c820678 More changes for SCH_COMMIT independence from frames.
Also fixes some bugs in Symbol Editor SCH_COMMIT::Revert().
2023-06-10 20:53:44 +01:00
Wayne Stambaugh a46657d802 Remove net navigator debugging code. 2023-06-10 14:04:02 -04:00
Jeff Young 5aa51bc967 Allow SCH_COMMIT to operate without a frame.
We'll want this at some point (presumably) for plugins.
2023-06-10 18:35:59 +01:00
Jeff Young f66b9f75a3 Allow EDA_COMBINED_MATCHER use in KiCad find architecture.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12532
2023-06-10 14:50:06 +01:00
Jeff Young 53be16f409 Stop confusing Covertiy. 2023-06-10 13:36:17 +01:00
Jeff Young 8f1b9119bf Upgrade some symbol editor stuff to SCHEMATIC_COMMIT.
Also renames SCHEMATIC_COMMIT to SCH_COMMIT since it's not schematic-specifc.
2023-06-09 22:41:47 +01:00
Jeff Young e698156975 Upgrade many editing actions to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01:00
Jeff Young 73b653c276 Upgrade more dialogs to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01:00
Jeff Young dcfd426333 Upgrade some dialogs to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01:00
Wayne Stambaugh e9dc00cda3 Minor schematic net navigator improvements.
- Expand tree and highlight object selected with net highlight tool.
- Expand tree and highlight object that are currently highlighted with the
  selection tool.
- Use more descriptive object text rather than menu entry text for tree
  strings.
- Rebuild tree on unit changes.
2023-06-09 14:34:54 -04:00