Jeff Young
2ed3bf47bb
Improve hittesting for Eeschema and LibEdit delete tools.
6 years ago
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).
6 years ago
Jeff Young
2f23aa9556
Implement a more robust tool stacking architecture.
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop. (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)
The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
6 years ago
Jeff Young
7292ce6a8b
Improve eeschema selection disambiguation logic.
6 years ago
jean-pierre charras
70ff2e14a5
Eeschema: avoid crashes when the tool highlight or delete is activated and clicking in a empty schematic.
Was a nullptr not tested.
6 years ago
Jeff Young
b0c1c1ad2b
Select both ends of wires in block select.
Fixes: lp:1830717
* https://bugs.launchpad.net/kicad/+bug/1830717
6 years ago
Jeff Young
dcbd897a95
Push/pop tools even when selected from the toolbar.
6 years ago
Jeff Young
1f35ec5521
Beware of copying events and losing the m_passEvent flag.
Fixes: lp:1833031
* https://bugs.launchpad.net/kicad/+bug/1833031
6 years ago
Jeff Young
e6d5110ccf
Implement I18N for ACTIONs.
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro. We do still want it in the
code, however, because the string harvesting is based off of it.
Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
6 years ago
Jeff Young
c7bfa9857e
Use more reflective naming of what the tool does.
6 years ago
Jeff Young
e4fbd003e0
Make m_passEvent event-specific rather than global.
If a tool called something like clearSelection while processing a
MOUSE_CLICK, the SELECTION_TOOL will pass the clearSelection
COMMAND_EVENT because it handles it as a transition, not as an
event. Because m_passEvent is effectively global, the tool manager
would then interpret that as passing the MOUSE_CLICK and we'd end
up processing the click by multiple tools.
7 years ago
Jeff Young
19aba615c2
Remove selection condition from conditional menu separators.
We don't allow duplicate separators anyway so all they really do
is complicate the code.
7 years ago
Jeff Young
5610261dce
Immediate-action hotkeys (and context menu actions) for eeschema.
7 years ago
Maciej Suminski
7d69a917b9
Fixed a crash in EE_SELECTION_TOOL::SelectPoint()
The for loop is continued after an item removal, so the removed item
is not accessed anymore.
7 years ago
Jeff Young
8cc1e2b5e7
Fix breakage in wire moving/dragging/etc.
Fixes: lp:1832750
* https://bugs.launchpad.net/kicad/+bug/1832750
7 years ago
Jeff Young
8f84c3ec4f
Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal.
7 years ago
Jeff Young
c0e1f7a17a
Add dragging of wire ends, corners and junctions.
Fixes: lp:1830007
* https://bugs.launchpad.net/kicad/+bug/1830007
7 years ago
Jeff Young
7726b039b2
Re-jigger standard submenus so they both link AND work.
7 years ago
Jeff Young
5e49517781
Move hotkeys to ACTION architecture.
7 years ago
Jeff Young
765606012f
Convert separate-compilation of selection.cpp to polymorphism.
7 years ago
Jeff Young
2d40425e4d
Move footprint & symbol tree context menus to tool infrastructure.
Fixes: lp:1831692
* https://bugs.launchpad.net/kicad/+bug/1831692
7 years ago
Jeff Young
9f1e2e34b7
Move some dupicated tools to common tools.
7 years ago
Jeff Young
d7774b94fc
Fix regression with switching between drag and move operation.
7 years ago
Jeff Young
0260b32125
Push resetLocalCoords down into COMMON_TOOLS.
Fixes: lp:1830693
* https://bugs.launchpad.net/kicad/+bug/1830693
7 years ago
jean-pierre charras
b8e2054b23
Activate context menu in LIB_VIEW_FRAME canvas.
7 years ago
Jeff Young
1636405b66
Set a reference point for all selection sizes.
Fixes: lp:1829833
* https://bugs.launchpad.net/kicad/+bug/1829833
7 years ago
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
7 years ago
Seth Hillbrand
e1373d70ae
libedit: Ensure proper dereference in shared tools
Fixes: lp:1829826
* https://bugs.launchpad.net/kicad/+bug/1829826
7 years ago
Tomasz Włostowski
bc52f0a03b
eemodern: clean printf debug gibberish, implement inline drag, move & cursor warp/reference point options
7 years ago
Tomasz Włostowski
034669bf30
eemodern: implement drag-related settings in the Preferences window
7 years ago
Tomasz Włostowski
5ea46e8b78
eemodern: initial attempt at inline drag/move actions
7 years ago
Jeff Young
813de6a1f3
Implement brightening for Eeschema Find/Replace.
7 years ago
Jeff Young
952108dd43
Implement SCH_SHEET_PIN selection, rotation and mirroring.
Fixes: lp:1829521
* https://bugs.launchpad.net/kicad/+bug/1829521
7 years ago
Jeff Young
7c25001622
Implement immediate actions for adding and importing sheet pins.
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
7 years ago
Jeff Young
6b3fe33d6f
Improve selection logic for sloppy selections.
7 years ago
Jeff Young
5dd71b5563
Disable pin table and part properties when there's no part.
Fixes: lp:1828962
* https://bugs.launchpad.net/kicad/+bug/1828962
7 years ago
Jeff Young
eba892009d
Improve hit-test logic by gradually increasing threshold.
Fixes: lp:1828222
* https://bugs.launchpad.net/kicad/+bug/1828222
7 years ago
Jeff Young
69afa27a5f
Implement ACTION_TOOLBAR and update some of the menus to ACTION_MENU.
This gives us better separation of MVC in line with the design of
the modern toolset. It also reduces a whole bunch of duplicated
data.
7 years ago
Jeff Young
f9e4ee1fc9
CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.)
7 years ago
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
7 years ago
Jeff Young
5c39521149
Move Symbol Properties and Pin Table to actions.
Fixes: lp:1804273
* https://bugs.launchpad.net/kicad/+bug/1804273
7 years ago
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
7 years ago
Jeff Young
792c4328aa
Cleanup.
7 years ago
Jeff Young
a9f663d5ef
Soften hit-testing in SchEdit and LibEdit a bit.
Old threshold was 0; new is 5 pixels.
7 years ago
Jeff Young
0c2ba94b16
More sharing between SchEdit and LibEdit.
7 years ago
Jeff Young
86d1592777
Fix bug with re-enting selection main loop.
7 years ago
Jeff Young
c1539ae014
Naming changes to reflect sharing between SchEdit and LibEdit.
7 years ago
Jeff Young
ea0941cab3
Implement modern tools for LibEdit.
7 years ago
Seth Hillbrand
589a37bfe8
eeschema: Don't segfault on empty drawlist
7 years ago
Jeff Young
f40408187e
A couple of temp hacks for LibEdit <esc> processing while in transition.
Fixes: lp:1828004
* https://bugs.launchpad.net/kicad/+bug/1828004
7 years ago