Commit Graph

27 Commits

Author SHA1 Message Date
jean-pierre charras 6b031d9b9e Symbol editor: fix an issue when editing LIB_RECTANGLE graphic items.
The point editor expects rectangles with a height and width > 0.
Previously, this constraint did not exist,
so some LIB_RECTANGLE graphic items can create issues when trying to move a corner.
Now, the LIB_RECTANGLE graphic item is normalized before trying to move a corner.
2019-07-26 10:40:40 +02:00
Jeff Young 7d10b29592 Cleanup unused includes. 2019-07-16 01:15:33 +01:00
Jeff Young 3069fd5974 Exit point editor after an <esc> while dragging.
Fixes: lp:1836652
* https://bugs.launchpad.net/kicad/+bug/1836652
2019-07-16 01:09:49 +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 09b07cd387 Minor adjustments to arc editing algorithms.
1) Don't snap center since it will be re-computed (most likely
off-grid) anyway.
2) Don't flip shape during initial drawing.
2019-06-29 20:03:08 +01:00
Jeff Young a498d7e9c5 Try out a new arc-editing paradigm for LibEdit.
This is based on the notion that in Kicad the start and end-points
are far more important (as they usually connect to other segments)
than the center is.
2019-06-29 16:10:58 +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 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)
2019-06-27 17:01:31 +01:00
Jeff Young 3a0256aade Add handle-based editing for eeschema bitmaps.
Also cleans out a bunch of duplicated functionality from the image
editor dialog.

Fixes: lp:1828722
* https://bugs.launchpad.net/kicad/+bug/1828722
2019-06-19 18:35:17 +01:00
Jeff Young dcbd897a95 Push/pop tools even when selected from the toolbar. 2019-06-18 20:24:15 +01:00
Jeff Young 7cfe19d9fd Cleanup. 2019-06-17 22:15:20 +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 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
2019-06-17 10:45:23 +01:00
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.
2019-06-16 12:06:49 +01:00
Jeff Young 0f4bdbd184 Tighten down the POINT_EDITORs a bit more. 2019-06-16 01:33: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 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
jean-pierre charras 568d4e2b19 Avoid including id.h in a lot of files that do not use it. 2019-05-26 08:14:25 +02:00
Jeff Young 85f984ccd9 Add point-editor activation for immediate-mode drawing. 2019-05-24 19:49:09 +01:00
Jeff Young 67f7571f04 Don't call VIEW::Redraw() from within the tool.
Fixes: lp:1828824
* https://bugs.launchpad.net/kicad/+bug/1828824
2019-05-22 21:48:04 +01:00
Jeff Young 952108dd43 Implement SCH_SHEET_PIN selection, rotation and mirroring.
Fixes: lp:1829521
* https://bugs.launchpad.net/kicad/+bug/1829521
2019-05-18 00:23:12 +01:00
Jeff Young 6630a7227d Constrain SHEET_PIN movement, and keep them attached when resizing SHEET.
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-05-16 22:36:19 +01:00
Jeff Young d290154dd3 Fix rectangle resizing in LibEdit.
Fixes: lp:1828791
* https://bugs.launchpad.net/kicad/+bug/1828791
2019-05-13 21:44:29 +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
jean-pierre charras 0a308c4584 Fix minor compil warnings 2019-05-11 11:12:39 +02:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Renamed from eeschema/tools/point_editor.cpp (Browse further)