Commit Graph

40 Commits

Author SHA1 Message Date
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
Michael Kavanagh 79b2ff7551 Refactor deleteTool ACTION removing duplicates 2019-08-12 13:49:55 -04:00
Jeff Young c5fb8518d2 Redraw pins when placing when they are modified.
Fixes: lp:1839363
* https://bugs.launchpad.net/kicad/+bug/1839363
2019-08-08 14:09:42 +01:00
Jeff Young c624ee9cff Re-parent new objects on duplicate.
Fixes: lp:1838269
* https://bugs.launchpad.net/kicad/+bug/1838269
2019-08-01 21:40:18 -06:00
Jeff Young 03a33b6b56 Selection fixes for multi-part lib items.
1) Don't select pins from other units/conversions
2) Don't delete pins from other units/conversions

Fixes: lp:1838511
* https://bugs.launchpad.net/kicad/+bug/1838511
2019-07-31 22:34:24 -06:00
Jeff Young 815602d1af Fix missing AF_ACTIVATE flags on some tools.
Fixes: lp:1813659
* https://bugs.launchpad.net/kicad/+bug/1813659
2019-07-26 12:21:24 -06:00
Jeff Young 0b08e4dcd2 Deactivate other tools when running one based on a PICKER.
In particular, if the last one was a PICKER tool, then we're going
to assert on "click-handler-already-set".

Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673
2019-07-19 15:29:10 -06:00
Jeff Young e816a0c29d Push Eeschema & PLEditor PICKER_TOOLs down into common.
Also implements a more robust push/pop tool strategy for pickers.
2019-07-16 00:44:01 +01: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 36f1d023f0 Make sure Push/PopTool() go in the right order.
Because the pickers are called with an Activate()/Wait() pair, any
usurping tool gets in between the picker handling the cancel (due
to activation) and the picker client doing a PopTool().  The new
tool is therefore pushed before the old tool is popped.

Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907
2019-07-09 15:03:23 +01:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00
jean-pierre charras 5ed8ba5bf3 Libedit: fix a bug in edit graphic item properties:
When changing the common to units and/or common to convert options, the item properties were not updated.
2019-07-01 12:36:46 +02:00
Jeff Young d88bddad7e Respect m_DrawSpecificUnit and m_DrawSpecificConvert when pasting.
Fixes: lp:1834719
* https://bugs.launchpad.net/kicad/+bug/1834719
2019-06-29 22:20:40 +01:00
Jeff Young 232e21cb37 Restore selection properly after an undo. 2019-06-29 20:03:08 +01:00
Jeff Young 2ed3bf47bb Improve hittesting for Eeschema and LibEdit delete tools. 2019-06-28 22:18:30 +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 89d1d3d299 Real-time highlighting for PlEditor delete tool. 2019-06-25 21:10:21 +01:00
Jeff Young 4eaba20cd3 Real-time highlighting for Pcbnew and ModEdit delete tools. 2019-06-25 21:10:21 +01:00
Jeff Young f9702aab87 Immediate actions for PlEditor, PcbNew, etc. 2019-06-25 11:34:28 +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 19aba615c2 Remove selection condition from conditional menu separators.
We don't allow duplicate separators anyway so all they really do
is complicate the code.
2019-06-15 20:43:51 +01:00
Jeff Young 5610261dce Immediate-action hotkeys (and context menu actions) for eeschema. 2019-06-15 20:43:51 +01:00
Jeff Young 09a3c5b280 Update pasted items' parent pointers.
Fixes crashes when trying to manipulate the item after the paste,
and weird redraw behaviour with pins.

Fixes: lp:1832178
* https://bugs.launchpad.net/kicad/+bug/1832178
2019-06-11 09:22:56 +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 dfc2fe3929 Don't try to post-process an empty clipboard paste.
Fixes: lp:1831364
* https://bugs.launchpad.net/kicad/+bug/1831364
2019-06-02 16:21:44 +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 800cc1a11c Fix intial drag point for paste in LibEdit. 2019-05-27 11:58:56 +01:00
Tomasz Włostowski 2b38b23a5e eemodern: fixed use-after-free crash in LIB_EDIT_TOOL::DoDelete() 2019-05-22 21:35:03 +02:00
Jeff Young 68224e0fcd Don't double-add pins to parent part when pasting.
Also adds undo to paste operations in LibEdit.

Fixes: lp:1829355
* https://bugs.launchpad.net/kicad/+bug/1829355
2019-05-16 23:53:11 +01:00
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.
2019-05-15 17:50:52 +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 c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young 7da2631b27 Check item before concluding that ConvertText has run.
Otherwise we set item from nullptr back to the selection, and then
we think we're dragging again which causes all kinds of grief.

Fixes: lp:1828067
* https://bugs.launchpad.net/kicad/+bug/1828067
2019-05-10 16:11:57 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00