102 Commits

Author SHA1 Message Date
Jeff Young
1faa9800dc Row height consistency.
Rats.  Also got tangled up in another commit which
removes some dead code.
2025-06-19 14:29:37 +01:00
Jeff Young
a1cc6403bd Remove selection before notifying grid of deletion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20747
2025-05-29 17:55:02 +01:00
Jeff Young
2b33a03954 Make Edit Text & Graphics dialogs more similar.
Also a bunch of cleanup for dialog heading
format and info sizes.

Also fixups for consistency of syntax help
(should be a link, not a button)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20790
2025-04-27 17:34:18 +01:00
Jeff Young
b01fef5ca8 Update visibility flag when adding fields.
Also removes extra c'tor which fails to set the
ordinal.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20556
2025-04-26 16:37:36 +01:00
Jeff Young
be4a851186 Allow embedded files to come from components
as well as parent containers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20530
2025-04-23 15:14:58 +01:00
jean-pierre charras
ddcf3f9855 Fix compil warning and issue. 2025-02-24 14:35:10 +01:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Wayne Stambaugh
09f54c6b94 Restore previous screen and sheet filename when canceling a failed load.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19881

(cherry picked from commit 4ed1954b4bfaec035b404501648c86b79e366580)
2025-02-10 08:19:18 -05:00
Jeff Young
4fe05bfe47 Remove some more usages of MANDATORY_FIELDS. 2025-01-21 23:38:55 +00:00
Jeff Young
a0dd0485e9 Pull a little harder on the MANDATORY_FIELDs string.
We still conflate the fieldID, the position in the
array of fields, and whether or not that means the
field is mandatory.  But this attempts to clean up
*some* of that, without introducing too much risk.
2025-01-21 16:48:13 +00:00
Jeff Young
d50b69f1ae Reconcile divergence of MANDATORY_FIELDS between symbols and footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19697
2025-01-21 13:28:28 +00:00
Wayne Stambaugh
d53ed205f2 CvPcb and Eeschema part 1 housekeeping. 2025-01-18 14:31:15 -05: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
Jeff Young
61dc54cae2 Don't run lib checks after renaming (an existing) sheet.
(Particularly as this step always happens when creating a new
sheet from a Design Block.)
2024-12-27 18:59:22 +00: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
Jeff Young
eee28aa06a Clean up fields autoplacement control architecture.
Also adds a mode for AUTOADDED fields.

Also fixes a couple of bugs where a manual-level autoplaced
symbol would get reset back to auto-level when autoplaced.
2024-12-23 14:30:17 +00:00
Mike Williams
508169e335 eeschema: don't crash on new sheet
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19122
2024-11-12 09:29:06 -05:00
Mike Williams
018d02eb02 design blocks: copy sheet to project dir instead of linking 2024-11-06 13:39:38 -05:00
jean-pierre charras
82ff2c0e0f eeschema, DIALOG_SHEET_PROPERTIES: add test for valid sheet filename
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18981
2024-10-25 11:44:29 +02:00
Wayne Stambaugh
a6923b3de3 Cache full schematic sheet list sorted by sheet page number.
The sheet list is returned as a copy of the cached list rather than a
reference to prevent external code from changing the list.  While not as
performant, it eliminates the risk of the sheet list being altered in
ways that could break the schematic.  The sheet list should only be
updated by calling SCHEMATIC::RefreshHierarchy() when any appropriate
sheet changes are made.

Note to developers: there is something inherently different about how the
QA tests are loading and handling schematics versus the schematic editor.
Using the cached sheet list for the SCHEMATIC object will cause some QA
test to fail.  This is why SCHEMATIC::Hierarchy() has not replaced
SCHEMATIC::BuildSheetListSortedByPageNumbers() everywhere.
2024-10-09 09:58:50 -04:00
John Beard
df5fe44839 sch_symbol.h doesn't need sch_lib_table.h
It doesn't even use the forward-declared
SYMBOL_LIB_TABLE.

Including this pulls in the whole richio system,
and sch_symbol.h is a very-included header.

Quite a few things do use SYMBOL_LIB_TABLE, but nowhere
near as many as use SYMBOL.
2024-10-04 18:06:18 +01:00
Mike Williams
2c99bc6c6d new feature: Schematic Design Blocks
Added to advanced config, default to off.
EnableDesignBlocks=1 in kicad_advanced to test

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2263
2024-09-05 08:35:49 -04:00
Seth Hillbrand
77797103f7 Add ability to embed files in various elements
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures.  File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.

kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document.  Embeds are allowed in schematics, boards,
symbols and footprints.  Currently supported embeddings are Datasheets,
3D Models and drawingsheets

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
2024-07-15 16:06:55 -07:00
Jeff Young
edc7603d2a Make it clear that GetSheets() is heavy.
Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
2024-06-06 18:00:59 +01:00
Mike Williams
32289ffce7 schematic: fix broken undo of sheets, new and changed
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11855
2024-06-03 13:45:52 -04:00
Jeff Young
aee7680a6c ADDED: support for DNP & friends at the sheet level.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14387
2024-06-02 22:41:22 +01:00
Seth Hillbrand
ba4974749c Fix renaming sheet check
If we are renaming a sheet that exists only once in the schematic, then
we don't need to warn about case sensitivity.  If the sheet exists
multiple times, we do.  We can't check this using SCREENS because the
screens don't maintain full state information about where they are used.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17901
2024-05-03 13:23:03 -07:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Wayne Stambaugh
5d99aaf0a4 Use correct project name when adding new symbol instances.
When adding a sheet using a schematic from another project, set the
project name for the new symbol instance data to the current project
rather than the project name from the copied instance data.
2024-04-19 14:33:22 -04:00
Wayne Stambaugh
17bcc27ff6 Fix missing instance data when reusing an already loaded schematic.
Remove duplicate sheet instance page numbering.  It's already done when
the sheet is loaded from an exiting file or an already loaded schematic.
Remove the unnecessary page update code from the drawing tool.
2024-04-18 15:47:47 -04:00
Jeff Young
d77eae3e7e Collapse LIB_FIELD into SCH_FIELD. 2024-04-13 15:42:13 +01:00
Wayne Stambaugh
ec310ac3ed Update hierarchy navigator when undoing or redoing sheet name changes.
Use new schematic commit object in the edit sheet properties dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17721
2024-04-11 10:11:02 -04: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
Wayne Stambaugh
27911d9b5a Fix crash when changing sheet file name that contains a highlighted net.
Performing a full connectivity rebuild after changing a sheet file name
ensures that there are no stale connectivity object pointers laying around.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17011
2024-02-17 08:50:22 -05:00
Ian McInerney
f2702b223c Introduce base IO_MGR class and unify RELEASER objects
The IO_RELEASER is a thin-wrapper around a std::unique_ptr, but done
this way to allow easier addition of a custom deleter in the future if
something needs to call back into the IO_MGR.
2023-12-29 00:37:38 +00:00
Marek Roszko
9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Ian McInerney
d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Jon Evans
eb5b3db063 Add bitmap bundle support to BITMAP_SCALE
Change a bunch of buttons and toolbars to use it

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14119
2023-10-22 14:02:06 -04:00
Seth Hillbrand
485db8bccd Remove extra nag/grid assertion
When editing the properties, if you accidentally make an extra line, you
should be able to remove the data and have it ignored.
2023-09-14 14:39:51 -07:00
Alex Shvartzkop
e128896ba6 Schematic plugins refactoring, fixes for PCB plugins.
- Move PLUGIN_FILE_DESC to common.
- SCH_PLUGIN: rename Load -> LoadSchematicFile, Save -> SaveSchematicFile.
- Use PLUGIN_FILE_DESC and CanRead* in schematic plugins.
- Return none/unknown types from Find/GuessPluginType functions.
- Iterate over file types for file wildcards.
- Clean-up header checking in IO plugins.
- Use PCB plugin list in IO_MGR::GuessPluginTypeFromLibPath.
2023-08-31 05:08:03 +03: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
8e29a054f3 Performance improvement for GetShownColumns.
(This needs to be fast as it's called from OnUpdateUI events.)
2023-04-13 13:45:22 +01:00
Jeff Young
ef0d561a5c Less nagging. (If we need a field name, then create one.)
Also cleans up empty fields when exiting the dialog.
2023-03-19 20:43:18 +00:00
Jeff Young
c4ef08bead Exercise more caution with user filenames.
In particular, don't assume "1" is an extension in "Schematic_1.1".

Fixes https://gitlab.com/kicad/code/kicad/issues/14263
2023-03-12 15:52:45 +00:00
Jeff Young
f41f04b301 Hook up AddField handler to GRID_TRICKS for SCH dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/git/14153
2023-03-02 18:17:41 +00:00
Marek Roszko
aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
aris-kimi
b72cc23a00 Change one translatable "eeschema" string to "Schematic Editor" 2023-01-27 16:14:09 +00:00
Wayne Stambaugh
78e2f0fd4d Sheet instance handling improvements. 2022-12-26 08:30:03 -05:00
Jeff Young
13b73ed6b4 Remember dialog sizes for dialogs that might have lots of fields.
This is mainly for simulation testing where the dialog has to be
grown every time you restart the app, but it might as well be applied
to the similar dialogs.

Fixes https://gitlab.com/kicad/code/kicad/issues/12887
2022-12-24 22:20:03 +00:00
Jeff Young
09302296f4 Use SCH_SHEET_PATH interface to get page numbers.
Fixes https://gitlab.com/kicad/code/kicad/issues/13021
2022-12-16 22:49:42 +00:00