Commit Graph

889 Commits

Author SHA1 Message Date
Wayne Stambaugh ebd53cd45c Eeschema: fix text justification terminology.
Use justification instead of orientation relative to the anchor point when
describing text direction and alignment.  This seems to be the preferred
method by most users so hopefully this will eliminate some confusion.

Fix a bug in the s-expression schematic parser that failed to take into
account how graphical text alignment is defined for graphic text objects
compared to label text objects.

Fixes https://gitlab.com/kicad/code/kicad/issues/6489
2021-05-14 13:44:17 -04:00
Jeff Young 2a856890e6 Allow connections between sheet (pins) and symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/8305
2021-05-12 00:07:17 +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
Jeff Young 7c66a0a594 Selection routines should never be snapped. 2021-05-09 18:14:41 +01:00
Jeff Young f03152a548 Add some more tools to the "don't allow tool loop interruption" set.
See also b78ba12739.

Fixes https://gitlab.com/kicad/code/kicad/issues/8071
2021-05-09 17:30:32 +01:00
Jeff Young b78ba12739 Don't allow activation of other tools in the middle of a move.
Fixes https://gitlab.com/kicad/code/kicad/issues/8116
2021-05-08 20:49:51 +01:00
david-beinder 063f26531c Make LIB_PART::GetPins() return data for derived symbols
https://gitlab.com/kicad/code/kicad/-/issues/8212
2021-05-06 22:00:06 +00:00
Ian McInerney 5378cacee3 Don't make a copy when looping 2021-05-06 21:56:21 +01:00
Jeff Young 2e3860de6f Naming conventions. 2021-05-05 22:58:40 +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
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02: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
Roberto Fernandez Bautista 9b35757e18 Refactor AppendSymbol and AppendMultiUnitSymbol 2021-04-30 11:03:21 +00:00
Roberto Fernandez Bautista 0c91bea751 Fix eeschema reannotation: ensure no duplicate references are created
Also implements reannotation of a selection

ADDED: Ability to reannotate a selection in eeschema

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2209
2021-04-30 11:03:21 +00:00
Wayne Stambaugh 54e18f6b1f Pcbnew: remove update schematic option for geographical annotation dialog.
REMOVED: Update schematic option from geographical annotation dialog due
to potential issues with incomplete and/or broken updates.  Use "Update
Schematic from PCB" tool to update reference designation changes.

Forcing the footprint reference designator changes back to the schematic
without checking any other board changes in the schematic could leave the
schematic in a undefined state.  The update schematic from board tool is
the correct method to sync any changes from the board.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8042
2021-04-22 12:45:59 -04:00
Jeff Young 620aa315f6 Show infobar error when asking for empty datasheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/8260
2021-04-21 15:40:59 +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
jean-pierre charras 15353e3c33 Eeschema: when placing a new symbol or image, avoid starting the autopan.
When activate the new symbol placement, the mouse cursor is outside the canvas.
Therefore a autopan was started and not so easy to stop.
Now the mouse cursor (and the graphic cursor) are moved to a better location inside the canvas.
Fixes #8156
https://gitlab.com/kicad/code/kicad/issues/8156
2021-04-11 18:01:25 +02:00
Jeff Young cc956695ae Hit test for worksheet before adding Properties to menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/8171
2021-04-11 14:18:35 +01:00
Jeff Young 21d4197eab Apply SPECIAL_CASE_LABEL_INFO architecture to one-ended-drag.
We've been doing this for some time to wires that are attached to
the moving block (and therefore have the other end anchored).  However
we also need to apply it when dragging a single end of a wire.

Fixes https://gitlab.com/kicad/code/kicad/issues/7807
2021-04-07 14:40:07 +01:00
Jeff Young 30a073c2bb Cleanup. 2021-04-07 14:40:07 +01:00
Jeff Young 895f3de455 Formatting. 2021-04-07 14:40:07 +01:00
Wayne Stambaugh 2b86b34124 Eeschema: split out SCH_SHEET_PIN declarations into separate header. 2021-04-06 17:15:49 -04:00
Roberto Fernandez Bautista 7d9ee76f64 Don't iterate through m_selection if deleting items from it
Use the copied container saved_selection instead

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8126
2021-04-05 18:40:40 +00:00
Ian McInerney e08387ce3d Make the GAL responsible for the native cursor management
The native cursor must be set on the GAL canvas wx object,
not its frame (otherwise on GTK the cursor is only set
when we get a request for it from the WM and not immediately).

Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2021-04-05 02:36:12 +01:00
Jeff Young 329577cc5c Add new text items/labels to the selection so rotate/mirror/etc. work.
Also clears the selection after finding the sheet in the sheet pin
case so that the sheet itself doesn't get rotated/mirrored/etc.

Fixes https://gitlab.com/kicad/code/kicad/issues/8108
2021-04-03 19:41:24 +01:00
Jeff Young 32e8a17cc0 Fix nullptr error.
Fixes https://gitlab.com/kicad/code/kicad/issues/8102
2021-04-03 11:15:11 +01:00
Ian McInerney bb95761642 Remove unused variable
item is already an SCH_ITEM, so the static cast is pointless.
2021-04-02 19:26:22 +01:00
Jeff Young c7d689a022 Show field children when creating new labels.
And in particular, show reasonable intersheet reference facsimiles.
2021-04-02 15:15:07 +01:00
Ian McInerney 0a0935e0f3 Remove ACTIONS::TranslateLegacyId and TOOL_DISPATCHER::DispatchWxCommand
After commit 9535153f9e there were no more IDs inside the legacy ID
system. Therefore the entire system for dispatching and looking up
the legacy ideas and handling those events can now be removed and
the tool dispatcher simplified (it no longer needs to know about
the ACTIONS class).
2021-03-30 23:20:22 +00:00
Jeff Young f2e68e68d0 Add "Hide Tree" context menu options when tree has no selection.
Also cleans up some other code to be more consistent between symbol
editor and footprint editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/8052
2021-03-29 12:02:00 +01:00
Jeff Young 14e73d24dc Naming conventions. 2021-03-29 11:46:05 +01:00
Jeff Young 455e7dc3a8 Reorder for better readability and consistency. 2021-03-29 11:04:06 +01:00
Jeff Young 1b163c5dd3 Don't eat delete event when there's no item being drawn.
Fixes https://gitlab.com/kicad/code/kicad/issues/8061
2021-03-29 10:59:45 +01:00
Jeff Young 0561ce903e Don't remove IS_MOVED flag too early.
Fixes https://gitlab.com/kicad/code/kicad/issues/8056
2021-03-28 20:05:41 +01:00
Jeff Young c32932a311 Naming conventions. 2021-03-28 20:05:41 +01:00
Ian McInerney 42c6af4bd8 Cleanup ACTION_MENU creation in some places
The ACTION_MENU constructor now takes the tool as an argument,
so the call to SetTool() immediately following it can be removed
and the tool just passed into the constructor.
2021-03-27 19:16:58 +00:00
jean-pierre charras bbd7b4ca8c Eeschema, selection tool: uniformize the cursor shape and the actual modifiers.
SHIFT, CTRL, ALT modifier keys were handled in 2 different codes, one for
the selection tool and another to modify the mouse cursor shape, with 2
different configs.
Now the modifiers are managed from only one function.
Pcbnew: group also SHIFT, CTRL, ALT modifier keys management to a specific function.
Fixes #8021
https://gitlab.com/kicad/code/kicad/issues/8021
2021-03-25 10:28:20 +01:00
Wayne Stambaugh b37b7d53b4 Fix geographic annotation bug when back annotating to schematic.
For some reason, the footprint UUID was being prefixed to the sheet path
which caused the symbol look up by sheet path to fail.  An option was
added to not do this when the geographical back annotation to the schematic
is performed.
2021-03-24 09:57:36 -04: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 cf4cbea8a1 Use a more robust storage of items added to drag.
We kept having various issues of the pointer list going stale.  This
will prevent all permutations of that.

Also while I was in there I fixed the double-move thing (see bug
number).

Fixes https://gitlab.com/kicad/code/kicad/issues/7910
2021-03-22 13:51:10 +00:00
Jon Evans c5c348538e Fix some STL asserts in EE_SELECTION_TOOL 2021-03-21 22:01:45 -04:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Jeff Young f0e6f812ff Edit One Field improvements.
1) Accept <enter> as OK if the multiline textbox isn't shown.
2) Focus and select all in first control if multiline textbox isn't shown.
3) Make title be title caps ("Edit Sheet name Field" looked dorky).

Fixes https://gitlab.com/kicad/code/kicad/issues/7940
2021-03-20 00:41:09 +00:00
Jeff Young 2e129d9b47 Naming conventions and other cleanup. 2021-03-19 23:06:19 +00:00
Jon Evans 4b46c0c954 Make sure nested settings get released in dtor
Also fix a crash if sim window can't be created because
ngspice shared library could not be found

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7969
2021-03-19 19:04:27 -04:00
Jeff Young e206a9d39a Naming conventions. 2021-03-18 12:28:24 +00:00