Commit Graph

134 Commits

Author SHA1 Message Date
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Seth Hillbrand e6dbca051c Force realtime connectivity on
The pressure relief valve was not useful for common work patterns as it
forced the recalculation on many common actions such as bus expansion.
This caused it to actually feel slower than with the pressure relief
valve off.

For most schematics, realtime is now fast enough to not need the valve
and for those that are extremely complex, removing the valve helps this
run more predictably
2023-01-20 15:17:57 -08:00
Roberto Fernandez Bautista c7f33e21f8 Extract SCH_SCREEN::GetNeededJunctions from AddJunctionsIfNeeded 2023-01-15 19:17:39 +01:00
Roberto Fernandez Bautista 22cc861c9b Remove dead code in AddJunctionsIfNeeded 2023-01-15 19:17:39 +01:00
Roberto Fernandez Bautista 7332c0c54d Move SCH_EDIT_FRAME::GetSchematicConnections into SCH_SCREEN::GetConnections 2023-01-15 19:17:38 +01:00
Jeff Young 8dc7baad3d Cleanup actions should not activate tools. It causes all manner of side-effects.
Fixes https://gitlab.com/kicad/code/kicad/issues/13331
2023-01-06 22:15:20 +00:00
Jeff Young 933a5d45e1 Be more aggressive about clearing edit flags after operations.
Fixes https://gitlab.com/kicad/code/kicad/issues/13173

Fixes https://gitlab.com/kicad/code/kicad/issues/13385
2023-01-05 18:08:22 +00:00
Mike Williams 389f0655cd Schematic: re-enable old break wire functionality, add slice
Also fix break/slice wires for multiple wires. The shortcut and code
always allowed it, the context menu just didn't appear.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13163
2022-12-19 15:55:59 -05:00
Jeff Young 5aa8f9880e Honour aQuitOnDraw flag when cancelling a segment.
Fixes https://gitlab.com/kicad/code/kicad/issues/12832
2022-11-05 10:23:12 +00:00
Mike Williams 9304607624 TOOL_EVENT: make command string non-optional
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.

Removes all uses of GetCommandStr() and makes it private.
2022-09-19 10:23:09 -04:00
Jeff Young b2a29e08a4 Improve repeat-last-item to handle unfold-from-bus.
Fixes https://gitlab.com/kicad/code/kicad/issues/12018
2022-09-09 18:09:09 +01:00
Jeff Young c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Jeff Young 0c8787cbb9 Some more wxPoint/EDA_RECT yeeting. 2022-08-31 00:44:33 +01:00
Seth Hillbrand b736460e71 Move optional access from value() to *operator
`value()` throws.  Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Jeff Young aa2ad3b44c Move KICAD_T[] to std::initializer_list<KICAD_T>. 2022-08-20 10:28:11 +01:00
Jeff Young e122dc38bd Add context menu item for clearing net highlighting.
In selection tools, drawing tools, router tool, line_wire_bus tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/11920
2022-07-10 17:15:20 -06:00
Jeff Young bce1fd337b Second tool hotkey accepts action (ie: acts as click).
Fixes https://gitlab.com/kicad/code/kicad/issues/11729
2022-06-09 16:54:04 +01:00
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