24 Commits

Author SHA1 Message Date
Jeff Young
1968d67bf3 Prefer const& to passing by value. 2025-06-06 18:28:39 +01:00
Jeff Young
5996cffabc EE -> SCH (no functional changes) 2025-03-13 13:15:47 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Seth Hillbrand
2e93fb7a24 Prevent crash when importing over existing project
If the hierarchy navigator is open and expanded, we have references to
the existing sheets.  These need to be cleared when importing a new
sheet over top

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20004
2025-02-21 10:34:25 -08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Wayne Stambaugh
75365e8b71 Schematic hierarchical sheet improvements.
* Ensure hierarchy navigator history iterator is valid before removing
  history list entries.  This fix prevented a crash in the 8.0 branch.

* Purge consecutive duplicate hierarchy navigator history entries.
  Navigating to the same sheet path doesn't make sense.

* Don't rebuild hierarchy navigator tree twice when creating new sheet.

* Remove unused sheet property dialog commit code.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18778
2024-12-24 09:50:10 -05:00
Wayne Stambaugh
c4e2c0d3ec Save schematic symbol field and unit by ordinal sheet instance.
Use the ordinal symbol reference and unit when saving schematics to
prevent file changes instead of the first instance.  The first instance
would change when sheets were moved and the hierarchy order changed.
The ordinal instance is defined as the first sheet instance when the
hierarchy sorted by page number.
2024-12-19 09:19:35 -05:00
Dhinesh
2a153599d5 Remove Context Menu in Empty Space of Hierarchy Navigator
Previously, a single RMB-click at empty space had no effect, while a
double-click opened the context menu. As per the @sethhillbrand suggestion,
instead of fixing this, no context menus should appear in empty space, as
it is not necessary. To address this, the wxEVT_RIGHT_UP event binding has
been removed by unbinding it from both the constructor and destructor.
Additionally, the onRightClick(wxMouseEvent& aEvent) method has been
removed, as it is linked to wxEVT_RIGHT_UP and is no longer necessary.

Fixes #17962
2024-09-16 22:26:06 +00:00
Jeff Young
a484ac0249 Cleanup. 2024-08-15 20:37:08 -06:00
Miklós Márton
61be2ea048 eeschema: Add option for renaming sheets in the Hierarchy tree view 2024-04-24 12:36:34 +00:00
Wayne Stambaugh
797ab998cc Maintain hierarchy navigator expansion state between edits.
Prevent the hierarchy navigator from being rebuilt unless there are actual
sheet changes that would cause a change to the tree.

Save the tree expansion state before rebuilding the tree and then restore
the expansion state to the previous state sans edits.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16635
2024-03-17 09:02:26 -04:00
Jon Evans
1988aac2b3 Update a few more list/tree views for macOS 2024-03-05 08:38:46 -05:00
Jeff Young
c8d2a9340b ADDED: ExpandAll/CollapseAll for hierarchy pane. 2024-02-24 20:05:51 +00:00
jean-pierre charras
2e760483b0 HIERARCHY_PANE: Update tree labels when editing a sheet name or number
Fixes #16650
https://gitlab.com/kicad/code/kicad/-/issues/16650
2024-01-25 18:22:41 +01:00
jean-pierre charras
8d2784b822 Eeschema, hierarchy navigator: right click on an item must select the corresponding
sheet, not the currently opened sheet.
Fixes #16670
https://gitlab.com/kicad/code/kicad/-/issues/16670
2024-01-23 18:13:03 +01:00
Jeff Young
5c4313587b Attempt to fix hierarchy tree selection issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16670
2024-01-20 19:25:18 +00:00
Wayne Stambaugh
50cad558cf Do not update tree to selected sheet in schematic hierarchy navigator.
This was causing unwanted tree expansions when descending a sheet hierarchy
in editor.

Also fixed an issue with the tree highlighting when changing sheets in the
schematic editor.
2024-01-06 12:25:39 -05:00
Wayne Stambaugh
a310c0a05a Do not expand the entire schematic hierarchy navigator tree by default.
The new behavior is to only expand to the first child of the root sheet
level.  On very complex hierarchies, this makes the navigator far more
useful.

Do not update schematic hierarchy navigator on every edit.  Now only
sheet changes will trigger a rebuild of the tree.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16371
2024-01-06 07:56:16 -05:00
Mike Williams
58cc0e2d1e Schematic: correctly resolve SHEETNAME for root sheet 2023-11-27 13:45:12 -05:00
Ian McInerney
2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Ian McInerney
480223f67c More RunAction specialization 2023-06-20 21:52:50 +01:00
Jeff Young
b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Jeff Young
5849458476 The screen for undo is the screen that *owns* the SCH_SHEET...
... not the screen the SCH_SHEET owns.

Fixes https://gitlab.com/kicad/code/kicad/issues/14099
2023-03-03 00:23:06 +00:00
Jeff Young
c7603372b5 Use consistent naming. 2022-12-12 12:54:34 +00:00