Commit Graph

48 Commits

Author SHA1 Message Date
Ian McInerney 4eaa0242ca Collapse schematic/symbol graphics import to single action
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16463
2023-12-29 02:57:21 +00:00
Mike Williams 2795fa9ca3 EE/PCB_Actions: convert to generic Finish
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16079
2023-12-06 10:33:17 -05:00
Jeff Young df83e24eb7 Cleanup.
It's been a long time since line style was specific to plotting.
2023-11-25 13:12:45 +00:00
Alex Shvartzkop 60d069757a ADDED: Import vector graphics into Symbol editor (SVG, DXF). 2023-10-09 07:04:50 +03:00
Marek Roszko 22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04:00
Mike Williams a44dd4d88f Symbol Editor: support grid overrides 2023-08-23 10:12:21 -04:00
Jeff Young 7f3839a179 Minor cleanup. 2023-07-16 14:43:29 +01:00
Ian McInerney c3674e6858 Fix incorrect parameter passing in symbol editor drawing
The text box used a different enum than the shapes, so this leads to a
possibility of clashing. The new action framework flagged this problem,
so modify the tool to handle the shape types properly.

Fixes KICAD-2CJ
2023-06-29 00:17:12 +01:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Ian McInerney 480223f67c More RunAction specialization 2023-06-20 21:52:50 +01:00
Jeff Young 8f1b9119bf Upgrade some symbol editor stuff to SCHEMATIC_COMMIT.
Also renames SCHEMATIC_COMMIT to SCH_COMMIT since it's not schematic-specifc.
2023-06-09 22:41:47 +01:00
Jeff Young 4a62cc6edd Separate symbol editor polyline and polygon tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/14695
2023-05-07 14:58:44 +01:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Seth Hillbrand 6fa2eedb4b Avoid the obsolete GetNextPin() call
This iterated over all pins to find the pin after a given item.  Because
out pattern is consistently to iterate in the outer loop, this means
that we were an O(n^2) loop for the pins just to find their names.  This
affected very large parts (e.g. FPGAs) when switching sheets to display
2023-01-20 14:12:15 -08:00
Jeff Young 98f0959f39 Default common-to-all-units based on last-used setting.
(Or whether or not the symbol has interchangeable units when a new
symbol is loaded.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13391
2023-01-06 00:34:16 +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
Marek Roszko 61e11d6896 Strip out Mils2Iu 2022-09-16 21:09:27 -04: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 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
Jeff Young 718bb461d2 Textbox defaults for libedit.
Fixes https://gitlab.com/kicad/code/kicad/issues/11739
2022-06-04 21:25:37 +01:00
Jeff Young 23fb4c7433 Uniformly use a single facility for location-less prime events.
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.

Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-05-16 23:43:00 +01:00
Jeff Young f2fc78f380 Don't copy modifiers to prime events.
The modifiers go with the hotkey, not with the action.

Fixes https://gitlab.com/kicad/code/kicad/issues/11618
2022-05-16 13:51:40 +01:00
Jeff Young 79a0ce9137 Unset forced cursor before leaving two-click place.
Fixes https://gitlab.com/kicad/code/kicad/issues/11607
2022-05-14 22:38:54 +01:00
Jeff Young a54457386c Enable immediate mode for pin tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/10156
2022-03-26 21:07:10 +00: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
Jeff Young 1f745b000d Special-case synthetic click after tool selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-03-07 20:30:50 +00: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 e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
Seth Hillbrand 88a8ad2ca1 Keep symbol synced with edit tool
Undo/Redo can change the symbol referenced by the symbol drawing tool.
This updates the current symbol before important steps to keep the
system synced

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

(cherry picked from commit b8a7a66a0a)
2022-01-05 16:52:02 -08: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 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
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
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 6eb59b9d9e Dialog naming conventions. 2021-08-06 20:54:26 +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 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 ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Jeff Young 0598c82972 Terminology (use present tense for flags). 2021-05-31 12:26:44 +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
Mikolaj Wielgus ee4bc8b1d0 Fix default line width for symbol editor graphic items, add validation
There was a mils to iu conversion missing for line width (the default
values are in mils).

Fixes https://gitlab.com/kicad/code/kicad/issues/7813
2021-03-16 13:50:41 +00:00
Seth Hillbrand 0bab025832 Fixup toolchaining for immediate mode
The move tool can stack on others, so when we re-enter the previous tool
this caused another immediate action.  We flag re-entry in the tool
stack to check for this and avoid unexpected tool starts
2021-02-24 10:44:54 -08:00
Jeff Young ff7742c6b8 File naming and include cleanup. 2021-01-28 11:35:18 +00:00
Jeff Young fb7ac450d9 Read-only dialogs for symbols in legacy libraries.
Fixes https://gitlab.com/kicad/code/kicad/issues/5211
2020-12-22 12:16:27 +00:00
Wayne Stambaugh f311831c27 Coverity fixes.
280252, 314742, 314745, 314747, 314755, 314756, 314757, 314758,
314935, 314936
2020-12-20 13:24:47 -05:00
Jeff Young 22a6b36257 Don't allow dbl-click to leak through to other tools.
This only applies if the tool doesn't handle properties (which also
handles double-click events).

Fixes https://gitlab.com/kicad/code/kicad/issues/6735
2020-12-14 22:15:43 +00:00
Jeff Young b6e267b78d Naming conventions. 2020-12-12 03:43:41 +00:00
Renamed from eeschema/tools/lib_drawing_tools.cpp (Browse further)