Commit Graph

336 Commits

Author SHA1 Message Date
Jeff Young 3409783d9f Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
2022-01-28 21:38:15 +00:00
dsa-t bc1ff6756f Cross-probing/selection for multiple items (SCH->PCB) 2022-01-16 20:29:03 +00:00
Roberto Fernandez Bautista 2d3624a016 Rename ComparePageNumAndName -> ComparePageNum 2022-01-02 23:20:17 +00:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Jeff Young af13533b42 Add show/hide controls for ERC markers.
ADDED show/hide controls for ERC warnings, ERC errors and ERC exclusions.

Fixes https://gitlab.com/kicad/code/kicad/issues/7270
2021-12-24 17:38:50 +00:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
ADDED arc, circle and rectangle shapes for schematic.  Shapes support
line styles and fill colors.

CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).

Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Wayne Stambaugh b7af66e3f9 Eeschema: fix broken page numbers when renaming a sheet file name.
Always use full sheet paths when storing sheet instances.  Partial sheet
paths cannot be full resolved resulting in lost page numbers when renaming
sheet file name.

Fixes #9782
2021-12-09 12:56:03 +00:00
Jeff Young 73b39e836d Set modify bit when editing page layout.
Fixes https://gitlab.com/kicad/code/kicad/issues/9891
2021-12-06 23:08:33 +00:00
Wayne Stambaugh a03e6e4926 Revert "Eeschema: fix broken page numbers when renaming a sheet file name."
This reverts commit a468a79948.
2021-12-06 07:47:18 -05:00
Wayne Stambaugh a468a79948 Eeschema: fix broken page numbers when renaming a sheet file name.
Remove duplicate instance data saved in both root SCH_SCREEN and SCH_SHEET
objects that was causing them to be out of sync.  All sheet instance data
is stored in the SCH_SHEET object itself and rebuilt on the fly so it is
always current.

Remove Get/SetPageNumber from SCH_SHEET_PATH object so it doesn't obfuscate
where the actual sheet page number information exists.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9782
2021-11-30 08:11:24 -05:00
Jeff Young 75d750a3cb Copy lastResolved stuff when pasting.
This of course assumes the paste came from the same document.  If not
then pasted items will get default lastResolved stuff.
2021-11-28 17:09:24 +00:00
Jeff Young f23cd9c9e5 Clearer naming. 2021-11-28 17:09:24 +00:00
Jeff Young 5863bc0937 Put Repair Schematic behind Advanced Config. 2021-11-25 12:56:46 +00:00
Jeff Young 7fc04c3cf2 Fixes for realtime connectivity being off.
Fixes https://gitlab.com/kicad/code/kicad/issues/9628
2021-11-24 13:20:44 +00:00
Jeff Young 9e999f4de4 ADDED Repair Schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/9749
2021-11-24 13:20:44 +00:00
Roberto Fernandez Bautista 04a30638f0 eeschema: Pasted items are moving as soon as they are pasted
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9539
2021-11-07 15:14:11 +00:00
Roberto Fernandez Bautista b572781a8a eeschema: Update anchor position of pasted items after initial move
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9534
2021-11-06 16:03:41 +00:00
Jeff Young f345eacf13 Be more careful with undo, and don't re-merge a bus over a bus entry.
Fixes https://gitlab.com/kicad/code/kicad/issues/9475
2021-10-30 19:58:09 +01:00
Seth Hillbrand 18318c73b5 Fix swapped parameters 2021-10-27 08:59:39 -07:00
Seth Hillbrand dd99b2dc2f Add action to edit symbol from Library
Analog of ea4e06124e for symbol editor.  Allows scripting to open
library symbol
2021-10-26 12:59:59 -07:00
jean-pierre charras 29756278e0 eeschema: fix crash when the simulator frame is open and the Tune tool is actived.
In some cases when the Tune tool is actived and a symbol is selected, if the tool
is deactivated from the right toolbar in Eeschema, Eeschema crashes.
2021-10-22 20:00:14 +02:00
Jeff Young c5e5d8e0d4 Fix multi-sheet find/replace issues.
1) When replacing symbol fields, make sure we do it for all sheets
2) Honour "find on current sheet only"

Fixes https://gitlab.com/kicad/code/kicad/issues/9431
2021-10-20 18:28:57 +01:00
Seth Hillbrand 854472d550 Prevent automatic RTree recaching
Calling UpdateItem() may be performed by in a common loop, e.g. for(
SCH_ITEM* item : GetScreen()->Items() ) or similar.  We cannot call
GetScreen()->Update( SCH_ITEM* ) in this routine as it will remove and
re-add the item to the RTree, invalidating iterators.  If needed, the
items need to be cached to an external container before updating

Fixes https://gitlab.com/kicad/code/kicad/issues/9318
2021-10-05 20:13:15 -07:00
jean-pierre charras d362cbc530 EEschema: change Save Copy As... to Save Current Sheet Copy As...
Save Copy As did not work with hierarchies (was not able to manage subsheets)
Fixes #9245
https://gitlab.com/kicad/code/kicad/issues/9245
2021-09-27 18:23:11 +02:00
Jeff Young 9ea6b44ee8 Formatting. 2021-09-23 23:59:20 +01:00
Marek Roszko 064ab933dd Always update the hierarchy navigator when setting the current sheet in the frame
Fix #9221
2021-09-23 18:14:44 -04:00
Marek Roszko e7814915db Call UpdateHierarchyNavigator on find jump in schematic in case we cross pages
Fix #8971
2021-09-19 08:35:51 -04:00
Jeff Young 5c07441e24 Remove Setup Dialog assignment of netclasses to buses.
Also removes the message bar display of assigned netclass for
buses and bus-to-bus entries.

Also fixes a bug where assigning a netclass via the canvas only
looked at the first level of bus members (and not any nested
members).

Also fixes a bug where the bus name validator tried to validate
a vector bus first -- which doesn't work as a vector bus may be
nested in a group bus.

Also fixes a bug where we were failing to check for illegal
chars in bus definitions which otherwise passed the bus parsers.

See additional comments in the bug report.

Fixes https://gitlab.com/kicad/code/kicad/issues/9160
2021-09-17 22:01:17 +01:00
Jeff Young cc14dfe3ca Make canvas netclass assignment mirror Setup Dialog assignment.
While it would make more sense to have them both use the old canvas
algorithm (of only assigning to the members), I'd be *very* hesitant
to change the Setup Dialog and underlying machinery this late in the
6.0 release.

Fixes https://gitlab.com/kicad/code/kicad/issues/9160
2021-09-17 14:40:12 +01:00
Jon Evans ed342d0cc0 Do not clear highlighting on a cancel event
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9035
2021-09-12 17:35:44 -04:00
Wayne Stambaugh 451f8eefc0 Eeschema: fix broken project symbol rescue bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9111
2021-09-09 10:21:09 -04:00
Wayne Stambaugh 4ee0b28ffc Coverity issue fixes.
Fix Coverity issues 338623, 338716, and 338717.
2021-09-07 13:38:56 -04:00
Marek Roszko 74b8f14ec3 Don't find when the dialog isn't open or the search is blank (which resulted in full highlighting)
Fix #9056
2021-09-04 23:48:06 -04:00
Roberto Fernandez Bautista 3e32c2e5a7 eeschema: Make pasted text left aligned so that it is editable
Previously it was pasted as centre aligned, which is not supported in
the GUI.
2021-08-31 20:02:20 +01:00
Seth Hillbrand 871bdbc952 Search sheets in hierarchy-order
Also fixes an issue where multiple sub-sheets were skipped in certain
cases

Fixes https://gitlab.com/kicad/code/kicad/issues/8972
2021-08-27 13:03:18 -07:00
Mike Williams d18d993eac Eeschema: find next key shouldn't launch find dialog
Adds some general cleanups of overridden find functions while I'm in there.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8967
2021-08-27 18:15:36 +00:00
Jon Evans 0463fc4c2b Fix several bugs and refactor schematic saving
Having the logic split between three different paths was
a bit much, this should hopefully be a bit easier to
maintain.  All save logic now goes through SaveProject;
individual file writing is now a private function.

Also change Save As to Save Copy As in project manager
mode, as we don't want to change projects from inside
the editor in project manager mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9015
2021-08-23 23:01:08 -04:00
Seth Hillbrand 75e4fa9b75 Handle multiple annotation in search
New schematic format needs to search client screen paths instead of
maintaining multiple copies in a flat format.
2021-08-20 10:24:08 -07:00
Seth Hillbrand 729ba1e301 Ensure deterministic Find/Replace ordering
Sorts first by x and then by y when returning search order

Fixes https://gitlab.com/kicad/code/kicad/issues/8972
2021-08-20 08:42:06 -07:00
Jeff Young 95b87ba29a Freshen microwave polygon dialog and remove a bunch of dead code. 2021-08-03 01:11:11 +01:00
Jeff Young d40712d9d6 Formatting and message consistency. 2021-08-01 21:31:23 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Mike Williams 2c766bdb2b Eeschema: fix assigning netclass to buses
Buses with at least one member can use assign netclass functionality to
set all members to that netclass.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8743
2021-07-27 20:48:25 +00:00
Jeff Young 46701c1195 Don't allow undo record to get pushed during an undo.
When doing a schematic cleanup, for instance, we were breaking wires
and pushing undo records on to the stack.  Needless to say, this was
pretty unexpected for the rest of the undo framework and caused all
kinds of mayhem (including crashes in some cases).

Fixes https://gitlab.com/kicad/code/kicad/issues/8704
2021-07-08 19:43:15 +01:00
Mikolaj Wielgus 1c28ea0577 Do not create selection with simulator probe tool 2021-07-08 03:15:15 +00:00
Jeff Young f46486bc3e Naming conventions. 2021-07-03 21:43:57 +01:00
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Roberto Fernandez Bautista 466536d509 Make sure hierarchy is up to date before checking duplicate sheet names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8654
2021-06-22 21:41:50 +01:00
Wayne Stambaugh ff099453c8 Rename class_library.[h|cpp] to symbol_library.[h|cpp]. 2021-06-15 09:24:55 -04:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Jeff Young bcdec0dea7 Move '~' pin name processing to LIB_PIN and SCH_PIN.
This will also allow us to do variable processing in the future if
desired.
2021-06-12 19:54:34 +01:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
luz paz 5f1e9bc8a7 Fix typos in source code 2021-06-10 01:24:15 +00:00
Seth Hillbrand c7d188a8d0 Centralizing SCRIPTING class 2021-06-01 20:18:24 +00:00
Jeff Young c4cabb38d5 More worksheet -> drawing sheet cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8516
2021-05-31 12:26:44 +01:00
Jeff Young 0598c82972 Terminology (use present tense for flags). 2021-05-31 12:26:44 +01:00
Jeff Young 42eae27551 Rebuild selection after heavy lifting.
Undo does some fairly major redraws (including setting the current
screen), all of which drop the selection and cancel interactive tools.
Make sure the selection is re-built *after* all those run.

Fixes https://gitlab.com/kicad/code/kicad/issues/8492
2021-05-27 14:25:37 +01:00
Roberto Fernandez Bautista 5cf3e6d31a eeschema: Duplicate() is a Copy() followed by a Paste()
The only subtle difference is that Duplicate() does not modify the
clipboard contents so we need to keep a local variable in which to
store the result of a Copy()
2021-05-21 22:52:34 +01:00
Jeff Young 7356f9568d Move grid disable modifier from ALT to CTRL.
Also had to move the H/V/45 disable modifier from CTRL to SHIFT.

Fixes https://gitlab.com/kicad/code/kicad/issues/8124
2021-05-09 20:17:40 +01:00
Ian McInerney 5378cacee3 Don't make a copy when looping 2021-05-06 21:56:21 +01:00
Roberto Fernandez Bautista f2677340f2 Access the new paste behaviour via a new Paste Special... dialog
ADDED Paste Special... action in pcbnew

CHANGED Additional options for Paste Special... in eeschema, including
"Assign unique reference designators to pasted instance"
2021-05-03 19:38:32 +01:00
Roberto Fernandez Bautista 98c8f43320 eeschema and pcbnew paste: consistent paste behaviour
Duplicates are reannotated on paste in the same way in pcbnew and
eeschema such that when copying and pasting the same block in the
pcb and schematic, the reference designators will match.
2021-05-03 19:38:32 +01:00
Roberto Fernandez Bautista 5822cd85c4 Fix eeschema copy/paste: save and load sheet and symbol instances
Save sheet and symbol instance information to the clipboard on copy

Load sheet and symbol instance information from the clipboard on paste
and renumber page numbers after loading.

Correctly handle pasting in a multiple hierarchy by ensuring symbol and
sheet instances are updated for all instances of the destination sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8207
2021-05-03 19:38:31 +01:00
Jeff Young 1ed54d2314 Make sure find/replace respects different values in the hierarchy.
Fixes https://gitlab.com/kicad/code/kicad/issues/8328
2021-04-30 18:39:21 +01:00
Jon Evans afe0c79a1e Sheet pins need new UUIDs, too 2021-04-18 22:14:15 -04:00
Jon Evans 1e52f0a180 Make sure pasted symbols get new pin UUIDs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8218
2021-04-18 21:53:38 -04:00
Wayne Stambaugh 2b86b34124 Eeschema: split out SCH_SHEET_PIN declarations into separate header. 2021-04-06 17:15:49 -04:00
Jeff Young 14e73d24dc Naming conventions. 2021-03-29 11:46:05 +01:00
Roberto Fernandez Bautista be51be22a7 Update Page Number when Duplicating or Pasting sheets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7872

Also, update hierarchy before renaming pasted sheets
Avoids duplicate sheet names when pasting multiple sheets
2021-03-23 02:48:07 +00:00
Jeff Young e34734c230 Make sure pasted sheet instances get added.
Fixes https://gitlab.com/kicad/code/kicad/issues/7872
2021-03-13 16:34:30 +00:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Marek Roszko 907e282347 Silence some msvc warnings
- exception variables that were unused
- RAYSEG2D improperly foward declared with class instead of struct
- unused vars
2021-02-20 11:58:55 -05:00
Jeff Young 2c4d53d994 Minor cleanup. 2021-02-16 21:11:36 +00:00
Jeff Young cf42d692bf Remove some dead code. A little bit of comment cleanup as well. 2021-02-15 14:13:43 +00:00
Jeff Young ec20121114 Make sure schematic symbol fields get transferred to symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/7501
2021-02-14 18:30:14 +00:00
Jon Evans abf0a46dce Refactor PICKER_TOOL and push up snapping disable functionality
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7348
2021-01-31 09:50:41 -05:00
Jon Evans 1d12f3fe4a Fix logic in selecting power symbols for net highlighting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7339
2021-01-30 10:28:26 -05:00
david-beinder 2e21489acf Copy unit numbers to symbol instances when pasting sheets
Fixes https://gitlab.com/kicad/code/kicad/issues/5898 (B)
2021-01-26 18:12:49 +00:00
david-beinder 4bcd56b1f6 Always include unit number when copying to clipboard
Fixes https://gitlab.com/kicad/code/kicad/issues/5898 (A)
2021-01-26 18:12:49 +00:00
Jeff Young 360953ba98 "comp" -> "symbol". 2021-01-19 23:50:40 +00:00
jean-pierre charras e10025db64 Hierarchy navigation: keep the last used zoom level in a sheet when go back to this sheet.
Fixes #7107
https://gitlab.com/kicad/code/kicad/issues/7107
2021-01-17 09:41:49 +01:00
jean-pierre charras 77f651639d Eeschema: fix crash using tune/probe function in spice simulator.
Fixes #6875
https://gitlab.com/kicad/code/kicad/issues/6875
2020-12-29 13:13:58 +01:00
Jeff Young 8a720ef305 Update naming. 2020-12-25 23:37:01 +00:00
Marek Roszko 9b0a137d6c Stop bludgeoncompiling dialog_page_settings
Through the power of OOP!
Needs some more cleanup though
2020-12-19 10:40:37 -05:00
Jeff Young 91ab540d18 Naming conventions. 2020-12-18 00:30:26 +00:00
Jeff Young 9c7c05c161 Mostly formatting cleanup but a few type-casting cleanups too. 2020-11-24 22:16:41 +00:00
Jeff Young dd60fd47b2 Cleanup and formatting. 2020-11-23 01:10:08 +00:00
jean-pierre charras 64636601b8 Eeschema: fix a Unicode/UTF8 management when pasting items from Clipboard.
Copy to clipboard save items (using S expr description) using wide strings
(not UTF8 encoding).
But Paste from clipboard was not converting the wide string to UTF8 string
when getting the stored data to send it as std::string to the S expr reader.

Fixes #6449
https://gitlab.com/kicad/code/kicad/issues/6449
2020-11-21 10:59:25 +01:00
Jeff Young 8c5c902fa3 Re-write IntersheetRefs on top of SCH_FIELDs and textVars.
1) Generalize SCH_ITEM owners (SCH_COMPONENT, SCH_SHEET, and now
SCH_GLOBALLABEL)
2) Generalize hypertext items
3) Use SCH_FIELD autoplace infrastructure for placing intersheet
references
4) Use textVar infrastructure for buildin intersheet references.

As an important side-effect this also fixes the undo issues with
intersheet refs.
2020-11-17 16:05:49 +00:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young 6e6e0aa644 Naming conventions (including some component -> symbol). 2020-11-15 20:23:15 +00:00
Jeff Young f0d0e17aab Prepare for MODULE -> FOOTPRINT. 2020-11-13 15:16:24 +00:00
Jeff Young bddc97df30 LibEdit -> SymbolEditor 2020-10-31 10:28:21 +00:00
Jeff Young c5a86126d2 Be more clever about making sheet names unique.
Fixes https://gitlab.com/kicad/code/kicad/issues/6123
2020-10-23 23:55:45 +01:00
Seth Hillbrand 4085757aeb Remove beginning/ending spaces in translations
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
Wayne Stambaugh 8ff51d8899 Eeschema: add schematic sheet page number.
The groundwork has now been laid for per sheet instance data.  Initially
this only supports sheet page numbers but could be expanded to include
other per sheet instance information.

ADDED: Support for user defined schematic page numbers.
2020-10-19 14:05:45 -04:00
Marek Roszko a2c3bdec0d Remove kicad_string.h from netlist_exporter.h 2020-10-15 18:48:53 -04:00