Commit Graph

256 Commits

Author SHA1 Message Date
Jeff Young 32dec0127e Fix some issues with Eeschema's Shape Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/10140
2022-01-01 20:46:45 +00:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Marek Roszko 347e03363a Convert wxPoint/wxSize starting from EDA_RECT usages 2022-01-01 11:30:33 -05:00
Jeff Young 86cb57f4a7 Cherry-pick TEXT_ATTRIBUTES and EDA_ANGLE from rockola/kicad-strokefont 2021-12-28 22:15:20 +00:00
Jeff Young 889970a449 SCH_NETCLASS_FLAGs and SCH_FIELDs for labels.
ADDED: a new label type for netclass flags.
ADDED: the ability to define fields on labels.
2021-12-24 16:13:27 +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 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
Mikolaj Wielgus 10be483430 Make an exception for SCH_TEXT in SELECTION::GetCenter()
And undo the previous changes in SCH_TEXT::Rotate().

We continue hitting this with a wrench until it gets fixed or becomes
broken beyond any recognition.
2021-12-04 05:32:48 +01:00
Mikolaj Wielgus 3960c2441b Snap rotation center to half-grid, not grid 2021-12-01 17:53:42 +01: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
dsa-t 5750e38102 Re-enable and fix Move+Autoplace Fields
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9766
2021-11-29 20:48:16 +00:00
Mikolaj Wielgus 65af3a8568 Make sheet pin positions invariant to four rotations more often 2021-11-28 02:18:18 +01:00
Jeff Young 87e71072b1 Default line width to 0 in symbol editor.
Also removes some atrophied settings for repeated non-pins in
symbol editor (which only ever repeats pins).

Fixes https://gitlab.com/kicad/code/kicad/issues/9776
2021-11-27 11:53:38 +00:00
Seth Hillbrand 2159acc9ce Fix missing handler for multiple labels
This was intended to handle multiple labels but we missed the selection
condition.

Fixes https://gitlab.com/kicad/code/kicad/issues/9704
2021-11-20 14:37:18 -08:00
Jeff Young 996a5b85a6 Overhaul IsJunctionNeeded logic to support all the different cases.
Several clients were using this with different needs.  The API is
now more explicit (and there are more options under the hood).

Fixes https://gitlab.com/kicad/code/kicad/issues/9518
2021-11-04 12:57:16 +00:00
Jeff Young b8d193485d Respect selection reference point when set.
Fixes https://gitlab.com/kicad/code/kicad/issues/8520
2021-10-18 18:09:40 +01:00
Jeff Young b52529521e Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +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
Jeff Young f606679164 Proper numeric sorting for intersheet refs.
Also expunges the horrifically named std::remove and std::remove_if
(neither of which remove anything).
2021-10-01 18:29:21 +01:00
Jeff Young 9cf9abbd66 Don't allow Text Properties dialog on intersheets references field. 2021-09-29 16:04:36 +01:00
Seth Hillbrand 71602475eb Allow rotate/mirror even when dragging
Keeps the lines connected but doesn't solve the crossed-wire mixups.
This allows common usage (mirroring labels/rotating segments) and leaves
prevention of the crossed wires to the user.

We can't really prevent crossed wires when rotating e.g. a part with
wires connected to 4 sides and users will not expect that.  But we
should not disable useful features like mirroring multiple parallel
items to avoid a known impossible situation

Also provides an alternative solution to 345f506f0c that allows us to
rotate groups without destroying connections on hover

Fixes https://gitlab.com/kicad/code/kicad/issues/8403

Fixes https://gitlab.com/kicad/code/kicad/issues/8523
2021-09-23 14:47:49 -07:00
Seth Hillbrand 3b04b602d9 Don't walk text/labels when mirroring
We have a fixed bottom-align for the text and labels in eeschema.
Therefore, mirroring vertically needs to account for the text's offset
from the bounding box center.

Fixes https://gitlab.com/kicad/code/kicad/issues/9208
2021-09-22 09:24:16 -07:00
Jeff Young 2ec1c215cd Drop selection after hiding items.
Fixes https://gitlab.com/kicad/code/kicad/issues/8605
2021-09-21 17:02:34 +01:00
jean-pierre charras ca33ec05df Eeschema: fix incorrect rotation (CW versus CCW) of some items.
For some (not all) items and for blocks the rotation CCW was in fact a CW rot.
Fixes #9176
https://gitlab.com/kicad/code/kicad/issues/
2021-09-17 18:30:23 +02:00
Seth Hillbrand b0ba8b01c4 Update RTree when rotating components
Fixes https://gitlab.com/kicad/code/kicad/issues/9061
2021-08-31 16:36:38 -07:00
Seth Hillbrand 345f506f0c Ignore STARTPOINT/ENDPOINT in multiple item rot
Rotating multiple items does not allow for individual end points to be
selected.  This can happen when we narrowSelection by hovering on end
points.
2021-08-31 14:34:05 -07:00
Wayne Stambaugh 897269f33f Eeschema: schematic object context menu improvements.
Don't show the clean up sheet pins context menu entry when the selected
sheet doesn't have any pins to clean up.

Remove sheet has no pins to clean up nag dialog now that the context menu
entry isn't shown unless there are pins to clean up.
2021-08-30 11:52:40 -04:00
Jeff Young 6c16846b21 Remove unused lambda. 2021-08-30 13:44:28 +01:00
Jeff Young 9da8f04cb4 Cleanup sheet pins doesn't make any sense when drawing sheets.
Fixes https://gitlab.com/kicad/code/kicad/issues/9044
2021-08-30 13:11:37 +01:00
Jeff Young 6eb59b9d9e Dialog naming conventions. 2021-08-06 20:54:26 +01:00
Jeff Young c716548b29 Enable autoplace whenever sel contains at least 1 field owner.
Fixes https://gitlab.com/kicad/code/kicad/issues/8886
2021-07-29 20:23:56 +01:00
Jeff Young 539d14ce94 Fix hang-over from legacy canvas where we only looked at sel head.
Fixes https://gitlab.com/kicad/code/kicad/issues/8886
2021-07-29 16:52:22 +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
Jeff Young 4317848cfe Only title-caps "our" field names.
Fixes https://gitlab.com/kicad/code/kicad/issues/8803
2021-07-19 14:43:57 +01:00
Jeff Young 0b4bb9378b Use consistent terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/8777
2021-07-12 11:59:07 +01: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 d9cb5a3015 Make sure text gets rotated, not just position.
Fixes https://gitlab.com/kicad/code/kicad/issues/7964
2021-06-13 20:22:25 +01:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
david-beinder 64cd401bdb Delete Tool: Fix missing "Item Locked" popup
Fixes problem identified in https://gitlab.com/kicad/code/kicad/-/issues/8392
Removes same popup from schematic tool because SCH_ITEM can not be locked
2021-05-27 05:38:51 +00: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
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 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
Wayne Stambaugh 2b86b34124 Eeschema: split out SCH_SHEET_PIN declarations into separate header. 2021-04-06 17:15:49 -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 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 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00