Mike Williams
8d51b6b6d3
Schematic: Add icons for Any/90/45 angle modes
...
Also add a dark mode icon for existing 45hv icon.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11332
2022-06-03 15:04:52 +00:00
Jeff Young
67f352717e
Fix dodgy type-cast and init line-widths to "inherit".
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11535
2022-05-03 13:39:14 +01:00
jean-pierre charras
be6379a8f6
Fix minor Coverity and compil warnings.
2022-04-01 20:43:21 +02:00
Mike Williams
2a726a882f
Schematic: new feature, force 45 degree lines
...
* New modes to force 45 deg angle at beginning or end of line
* Backspace will undo most recent segment added
* / will toggle posture of 90 and 45 degree lines
* Added alg::signbit for convenience
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10869
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9175
2022-03-28 16:07:23 -04:00
Jeff Young
05bca282f7
Re-entrancy blocker for line/wire/bus tool.
...
Also clear infobar messages after a cancelInteractive.
Fixes https://gitlab.com/kicad/code/kicad/issues/11155
2022-03-17 15:27:33 +00:00
jean-pierre charras
dbfdd3fb56
Fix some Coverity warnings.
2022-03-06 09:48:33 +01:00
Mike Williams
e35c3f2b99
Schematic: handle switching h/v mode better while drawing lines
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10859
2022-02-21 17:03:43 +00:00
Jeff Young
a2772b3363
Don't crash on highight net during drag.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10866
2022-02-21 13:30:15 +00:00
Seth Hillbrand
d1a4daefbb
wxPoint->VECTOR2I correction for master
2022-02-19 19:14:41 -08:00
Seth Hillbrand
24ac516135
Trim wires based on how many pins they intersect
...
If a wire intersects more than 2 pins from the same symbol, we don't
trim connections. If the wire intersects exactly two pins from a single
symbol, we remove the wire between the pins.
We avoided doing this before because we didn't have a good metric for
trimming vs. not. But the per-symbol calculation feels like the least
surprising option.
Fixes https://gitlab.com/kicad/code/kicad/issues/10909
Fixes https://gitlab.com/kicad/code/kicad/issues/1857
(cherry picked from commit 75a4036e45
)
2022-02-19 16:54:45 -08:00
Jeff Young
c6a8100d46
Schematic and symbol text boxes.
...
Also fixes some plot bugs with arcs.
Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5017
2022-01-28 21:38:15 +00:00
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
Mike Williams
ecb32b1fb0
Eeschema: hover start from wire end should copy wire properties
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10128
2022-01-27 17:17:45 +00:00
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
2022-01-01 11:55:51 -05: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
Mikolaj Wielgus
9bb370e6b4
SCH_SHEET_PIN: Rename GetEdge, SetEdge to GetSide, SetSide
2021-11-28 20:07:06 +01:00
Jeff Young
228edd4121
Don't generate duplicate IDs in line/wire/bus tool.
...
Also cleans up existing duplicate IDs when reading.
Fixes https://gitlab.com/kicad/code/kicad/issues/9749
2021-11-24 13:20:44 +00: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
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
4b3490a2b9
Intercept rotate command when drawing wires.
...
If unfolding from bus rotate the label; otherwise beep.
Fixes https://gitlab.com/kicad/code/kicad/issues/9178
2021-09-17 22:01:17 +01:00
Jeff Young
fdfecf5932
Don't push view control settings to the previous active tool.
...
See further comments in bug report.
Fixes https://gitlab.com/kicad/code/kicad/issues/9147
2021-09-13 13:28:05 +01:00
Jeff Young
f221220fe2
Rename layer ids file.
...
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh
8fd83cbb95
Pass wxPoint objects by reference instead of on the stack.
2021-07-26 15:35:33 -04:00
Mike Williams
13a03f77d3
Eeschema: Fix for delete key in wire tool
...
Delete key was not working for items selected with wire tool active.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8841
2021-07-25 15:17:49 -04:00
Jeff Young
b72545a432
Implement more aggressive re-entrancy blocking for drawing tools.
...
A similar strategy was already implemented in Eeschema.
Also adds some safety around clearing of autopan and mouse capture.
Fixes https://gitlab.com/kicad/code/kicad/issues/6909
2021-06-20 11:09:55 +01:00
Wayne Stambaugh
fbc135e69f
Rename SCH_COMPONENT to SCH_SYMBOL.
2021-06-10 10:34:49 -04:00
Jeff Young
0598c82972
Terminology (use present tense for flags).
2021-05-31 12:26:44 +01:00
Marek Roszko
3ac5aa5369
enum class SHEET_SIDE
2021-05-30 21:23:46 -04: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
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
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
Jeff Young
14e73d24dc
Naming conventions.
2021-03-29 11:46:05 +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
Jeff Young
573dd36515
Handle <delete> in move and drawing tools.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7924
2021-03-15 14:23:54 +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
Jon Evans
375cd12258
Eeschema: never replace event position in wire drawing tool
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7745
2021-03-01 12:17:18 -05:00
Jeff Young
a30ae6a237
Pass un-pretty-printed bus names through menu help text.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7412
2021-02-10 15:03:06 +00:00
Jeff Young
d70cebcd62
Allow clicking on terminal point to finish a bus unfold.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7413
2021-02-07 00:31:00 +00:00
Seth Hillbrand
238aa2b5b0
Snap to eeschema lines
...
Allows easier snapping to lines when drawing in eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/7378
2021-02-02 19:33:18 -08:00
Seth Hillbrand
ea6dc0d730
Make auto-wire use snapping behavior
...
Forcing grid snap for the kick-start behavior loses snaps to pins that
may be desired. This also adds force-snapping in select mode to match
the user's auto-start preferences
Fixes https://gitlab.com/kicad/code/kicad/issues/7293
2021-01-29 14:09:33 -08:00
Seth Hillbrand
02954dfaa1
Fix another instance of modifying iterators
...
We cannot modify the ee_rtree while iterating over it without
invalidating the iterators
Fixes https://gitlab.com/kicad/code/kicad/issues/7331
2021-01-29 08:33:44 -08:00
Jon Evans
ac1f7f93a2
Save context menu position for bus unfold
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6378
2020-12-27 13:07:16 -05:00
Jeff Young
c0e5e8eeee
Formatting.
2020-12-27 13:17:03 +00:00
Jeff Young
e882753ebf
Grid snapping fixes.
...
1) Uniformly honour the GAL grid snap settings
2) Make more uniform use of GRID_HELPERs
3) Smarten EDIT_LINE for mid-point snapping
Fixes https://gitlab.com/kicad/code/kicad/issues/6558
2020-12-03 19:55:58 +00:00
Jeff Young
a19028a396
Hook up EE_GRID_HELPER to some more tools.
...
Also implements EE_GRID_HELPER layers so that connectable things
snap to connectable things and graphics snap to graphics.
Fixes https://gitlab.com/kicad/code/kicad/issues/5641
2020-12-03 15:16:34 +00:00
Jeff Young
dd60fd47b2
Cleanup and formatting.
2020-11-23 01:10:08 +00:00
Jeff Young
9e9946628a
Go back to arrow cursor on a cancel (or finish).
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2020-11-19 20:09:28 +00:00
Jeff Young
a207bd97bb
Naming conventions.
2020-11-17 16:05:49 +00:00