Commit Graph

47 Commits

Author SHA1 Message Date
Jeff Young b6e267b78d Naming conventions. 2020-12-12 03:43:41 +00:00
Jeff Young 9c7c05c161 Mostly formatting cleanup but a few type-casting cleanups too. 2020-11-24 22:16:41 +00:00
Wayne Stambaugh e91a5b3f81 Symbol editor: prevent derived symbol elements from being moved. 2020-11-23 15:46:03 -05:00
Jeff Young dd60fd47b2 Cleanup and formatting. 2020-11-23 01:10:08 +00:00
Jeff Young 6e6e0aa644 Naming conventions (including some component -> symbol). 2020-11-15 20:23:15 +00:00
Jeff Young bddc97df30 LibEdit -> SymbolEditor 2020-10-31 10:28:21 +00:00
Jeff Young 9065908859 Update SCH_SCREEN's RTree when moving items.
Or when modifying geometric shape/properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/5922
2020-10-30 15:26:07 +00:00
Jeff Young 128910c602 Pass unhandled command events from Symbol Editor move tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/6015
2020-10-15 18:43:23 +01:00
Marek Roszko b2e9f6987d Split base_struct into eda_item and eda_rect 2020-10-13 21:24:50 -04:00
Mark Roszko d9485129c8 Implement more context specific cursors using both stock and custom cursors. 2020-10-08 00:50:28 +00:00
Seth Hillbrand f493e270ea ADDED: Menu option to enable/disable snap to grid
You can now enable and disable snap to grid when drawing/editing across
all apps.  You can also tie snap to grid to the visibility of the grid
to allow rapid enable/disable via grid display.
2020-09-10 20:09:30 -07:00
Seth Hillbrand 4026904cc4 Make grid snapping depend on grid visibility
Turning the grid view on enables snapping to the grid.  Turning it off
removes the snap and allows free draw
2020-09-09 10:18:15 -07:00
Seth Hillbrand 173b4ff588 Add snapping to eeschema
This generalizes both the SetPosition() function and ORIGIN_VIEWITEM
class away from the pcbnew-centric.
2020-09-09 10:18:15 -07:00
Mark Roszko 1082402b33 Convert UNDO_REDO_T to an enum class 2020-08-26 18:04:32 +00:00
Jeff Young 1138c32bf3 Don't pass Cancel event where there was a specific action cancelled.
For instance, if during a move the user hits ESC they only want the
move cancelled, not (for instance) the selection dropped.

Fixes https://gitlab.com/kicad/code/kicad/issues/5356
2020-08-25 12:54:40 +01:00
Marek Roszko 1905a23ba1 libedit: fix double msg_panel refresh and use new move event 2020-08-18 13:11:48 +00:00
Ian McInerney facf40d3ce libedit: Add drag to move behavior
ADDED: Drag to move behavior in the symbol editor

Fixes https://gitlab.com/kicad/code/kicad/issues/1904
2020-04-23 23:58:33 +01:00
Jeff Young 44a1cf9f1b Implement quiet-mode for selection clearing.
Also adds comments for exising quiet-mode calls.

Fixes: lp:1843177
* https://bugs.launchpad.net/kicad/+bug/1843177
2019-09-08 19:45:35 +01:00
Jeff Young a5a237ac32 Improve readability of flag checking. 2019-08-27 19:23:07 +01:00
Ian McInerney 49dd5d838c libedit: Fix inverted Y axis on move command
Also clean up some code formatting issues
2019-08-15 20:13:18 +01:00
Jeff Young 29af26565d Fix re-entrancy issue in LibEdit move tool. 2019-08-15 15:51:27 +01:00
Jeff Young 3cdf88f2c6 CERN copyrights for work packages. 2019-08-14 09:35:15 +01:00
Michael Kavanagh b414cbfada Cleanup doDelete ACTIONs 2019-08-12 13:49:55 -04:00
Jeff Young 039bd92ea5 Make LibEdit respect the Move-warps-cursor setting. 2019-08-10 11:58:05 +01:00
Jeff Young 77334628c4 Change default tool behaviour to skip unhandled events.
The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation
properly.  wxEVT_CHAR does, but we only get to that if we skip the
event at the end of the tool’s event processing loop, which most tools
don’t do.  (Selection tools, point editors, pickers, and a couple of
others do skip, which is probably why this didn’t get reported earlier.)

I played around with a couple of ways to fix wxEVT_CHAR_HOOK.  Most of
them don’t work, and the few egregious hacks I tried weren't cross-
platform.

So I’m changing it so that most tools now skip at the end of their
event loops.  I left out a couple that I felt were high risk (length
tuning, for instance).  But there’s still enough risk that I’m 100%
sure it will break something, I just haven’t a clue what.

Fixes: lp:1836903
* https://bugs.launchpad.net/kicad/+bug/1836903
2019-07-26 12:21:24 -06:00
Jeff Young 58ca5b71a9 A more robust fix for 36f1d023f0.
This one also handles when the events get out-of-order due to them
starting out in the Simulation window and not getting dispatched until
the mouse goes over the Schematic window.

Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907

Fixes: lp:1836544
* https://bugs.launchpad.net/kicad/+bug/1836544
2019-07-15 14:15:24 +01:00
Jeff Young a9c66e15ea Common-ize EE_ACTIONS::refreshPreview and use it after cursor actions.
Fixes: lp:1818667
* https://bugs.launchpad.net/kicad/+bug/1818667
2019-07-05 14:45:15 +01:00
Jeff Young 9effd24f3a Allow move tool to run on top of other tools.
Fixes: lp:1784480
* https://bugs.launchpad.net/kicad/+bug/1784480
2019-07-01 22:15:25 +01:00
Jeff Young 981072598b Overhaul cursor code for new tool/action framework.
Includes the addition of an onSetCursor() handler which must be called
from both the GAL canvas AND the GAL backend (at least on OSX) to prevent
cursor flickering between (for instance) pencil and arrow.

Also includes new architecture for point editors which allows them to
coordiate cursors with the editing tools (so we can switch to an arrow
when over a point).
2019-06-27 22:37:11 +01:00
Jeff Young 7208ef481f Don't confuse a pasted pin with being synchronized.
It's only at the same location because it was copied from there.

Fixes: lp:1834377
* https://bugs.launchpad.net/kicad/+bug/1834377
2019-06-27 00:24:42 +01:00
Jeff Young dcbd897a95 Push/pop tools even when selected from the toolbar. 2019-06-18 20:24:15 +01:00
Jeff Young 1f35ec5521 Beware of copying events and losing the m_passEvent flag.
Fixes: lp:1833031
* https://bugs.launchpad.net/kicad/+bug/1833031
2019-06-17 14:44:39 +01:00
Jeff Young 5610261dce Immediate-action hotkeys (and context menu actions) for eeschema. 2019-06-15 20:43:51 +01:00
Jeff Young a568e70b99 Follow naming conventions. 2019-06-10 23:46:01 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young 765606012f Convert separate-compilation of selection.cpp to polymorphism. 2019-06-10 23:46:00 +01:00
Jeff Young db90e97d0b fixup! Implement undo for Page Settings in PlEditor, Eeschema and PCBNew. 2019-05-27 14:12:20 +01:00
Jeff Young d24a2afaca Fix duplicate to work like paste to keep pins from getting duplicated.
Also fixes the post-duplicate move to start at the cursor pos.
Also fixes the fact that duplicate wasn't getting its hotkey.

Fixes: lp:1830596
* https://bugs.launchpad.net/kicad/+bug/1830596
2019-05-27 11:58:56 +01:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Jeff Young ef5c69167a Start moving some LibEdit and SchEdit menubar menus to actions.
Also includes a bunch of bug fixes that got intermingled.

Fixes: lp:1828826
* https://bugs.launchpad.net/kicad/+bug/1828826

Fixes: lp:1828826
* https://bugs.launchpad.net/kicad/+bug/1828826

Fixes: lp:1828793
* https://bugs.launchpad.net/kicad/+bug/1828793
2019-05-13 21:44:29 +01:00
Jeff Young 924a5e68f0 Fix missing superclass call. 2019-05-12 18:20:41 +01:00
Jeff Young f602ccd814 Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL. 2019-05-12 13:47:08 +01:00
Jeff Young 5c39521149 Move Symbol Properties and Pin Table to actions.
Fixes: lp:1804273
* https://bugs.launchpad.net/kicad/+bug/1804273
2019-05-11 15:38:49 +01:00
Jeff Young 7995b5cc3c Restore selection on abort and undo/redo.
Also includes a related bug fix to not create an undo record for
the initial schematic cleanup.

Fixes: lp:1825975
* https://bugs.launchpad.net/kicad/+bug/1825975
2019-05-11 15:38:49 +01:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young f6e07f575a Rename for clarity.
SetOffset() didn't set anything; it performed an action.
Move() suggests a delta, when it in fact does a SetPosition().
2019-05-10 16:11:57 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00