Commit Graph

263 Commits

Author SHA1 Message Date
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