Jeff Young
0995433601
Map nets (if possible) from clipboard to destination.
...
Fixes: lp:1795057
* https://bugs.launchpad.net/kicad/+bug/1795057
2019-10-17 18:04:07 +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
10c25a2290
Update frame type enum to match current class names.
2019-09-06 23:38:20 +01:00
Jeff Young
6688e80131
Update description in footprint tree when it's edited.
...
Also implements a more useful message panel for Footprint Editor.
Fixes: lp:1842660
* https://bugs.launchpad.net/kicad/+bug/1842660
2019-09-04 17:19:25 +01:00
Jeff Young
a5a237ac32
Improve readability of flag checking.
2019-08-27 19:23:07 +01:00
Jeff Young
aaa44b7348
Honor the {0, 0} reference on the clipboard.
...
Fixes: lp:1840819
* https://bugs.launchpad.net/kicad/+bug/1840819
2019-08-20 19:57:36 +01:00
Jeff Young
3bf24fae7a
Set selection reference point to top-left item.
...
Fixes: lp:1771016
* https://bugs.launchpad.net/kicad/+bug/1771016
2019-08-12 22:21:09 +01:00
Michael Kavanagh
79b2ff7551
Refactor deleteTool ACTION removing duplicates
2019-08-12 13:49:55 -04:00
Jeff Young
987642eb8c
Apply selectable logic to delete tool.
...
Fixes: lp:1838191
* https://bugs.launchpad.net/kicad/+bug/1838191
2019-07-28 12:31:18 -06:00
Jeff Young
b858fa38c4
Fix crash bugs in picker tools.
2019-07-21 19:06:06 -06:00
Jeff Young
02eb1d2c62
Don't try and run drawing tools in ModEdit with no module selected.
...
Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673
2019-07-19 15:29:10 -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
bcd48d4bc2
Use common actions where possible.
2019-07-05 14:45:15 +01:00
Jeff Young
da71a51029
Cleanup.
2019-07-02 00:48:05 +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
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
f70ab6203b
Make all inner layers available for hotkey assignments.
...
Fixes: lp:1787073
* https://bugs.launchpad.net/kicad/+bug/1787073
2019-06-25 11:34:27 +01:00
Jeff Young
ba7cf09ad5
Add zone display mode toggle action.
...
Fixes: lp:1759574
* https://bugs.launchpad.net/kicad/+bug/1759574
2019-06-25 11:34:27 +01:00
Jeff Young
7dd247f1dc
Make better use of TOOL_EVENT parameters.
2019-06-18 20:24:15 +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
8f84c3ec4f
Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal.
2019-06-13 19:58:37 +01:00
Jeff Young
df08f9921f
Make place drill origin and place grid origin one-shot commands.
...
Fixes: lp:1751747
* https://bugs.launchpad.net/kicad/+bug/1751747
2019-06-13 15:51:32 +01:00
Seth Hillbrand
daad58e511
pcbnew: Add option to show ratsnest while moving
...
Re-works ratsnest display options in the configuration parameters rather
than the board file. Moves ratsnest options to central preferences
location.
Fixes: lp:1826440
* https://bugs.launchpad.net/kicad/+bug/1826440
Fixes: lp:1821183
* https://bugs.launchpad.net/kicad/+bug/1821183
2019-06-12 17:36:02 -07:00
Seth Hillbrand
60b98a8b4f
Suppress non-Mac warning
...
The return variable is unused, so passing the pointer to a null lambda
drops the warning without incurring compile penalty.
2019-06-11 10:12:00 -07:00
Seth Hillbrand
32052d953f
pcbnew: Fix STL blunder when deleting
...
Deleting objects from a container will invalidate the iterator that
contains the object. Correct deleting requires capturing the iterator
returned by the erase function.
Fixes: lp:1832331
* https://bugs.launchpad.net/kicad/+bug/1832331
2019-06-11 10:12:00 -07:00
Jeff Young
b36f982272
Fix typo introduced in DLIST erradication.
...
Fixes: lp:1832030
* https://bugs.launchpad.net/kicad/+bug/1832030
2019-06-11 01:00:43 +01:00
Jeff Young
e9017ce0b1
Update status bar when selected items are modified.
...
Fixes: lp:1831801
* https://bugs.launchpad.net/kicad/+bug/1831801
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
e606587ff6
Move remaining Symbol Tree ctx menu cmds to ACTIONS.
...
Also moves the various Player instantiators down into COMMON_TOOLS
for better sharing.
2019-06-10 23:46:00 +01:00
Jeff Young
1ea5b04e22
More ACTIONS work. Nearly done now.
2019-06-04 22:31:42 +01:00
Jeff Young
584ed9e204
Add files accidentally left out of last commit.
2019-06-04 00:51:16 +01:00
Jeff Young
59a01789ff
Show board info in status bar when seleciton isn't a single object.
...
Fixes: lp:1831402
* https://bugs.launchpad.net/kicad/+bug/1831402
2019-06-03 21:52:59 +01:00
jean-pierre charras
be54f357eb
Better tooltip, more easy to translate
2019-06-03 18:27:17 +02:00
Seth Hillbrand
1f30d0c803
pcbnew: remove the last dlist components from pcbnew
2019-06-02 20:06:11 -07:00
Jeff Young
da4fe27447
More ACTIONS work.
2019-06-02 21:10:56 +01:00
Jeff Young
33773bad4d
Yet more command conversions to ACTIONs.
2019-06-02 21:10:56 +01:00
Jeff Young
6ac273264d
Move Show3DViewer to common action.
2019-06-02 16:21:44 +01:00
Seth Hillbrand
6a45446496
pcbnew: Remove the last dlist from modules/pcbnew
2019-06-01 20:55:32 -07:00
Seth Hillbrand
9163ac543a
pcbnew: Move pads to std::deque
2019-06-01 16:23:54 -07:00
Seth Hillbrand
888c01d11b
pcbnew: Move tracks to std::deque
2019-06-01 09:53:23 -07:00
Seth Hillbrand
d1877d7c1b
Moving modules from DLIST to std::deque
2019-06-01 09:53:23 -07:00
Seth Hillbrand
961b22d603
pcbnew: Changing drawings from dlist to std::deque
2019-06-01 09:51:57 -07:00
Jeff Young
1e9da7f57b
Remove CurItem() architecture and legacy routers and drawing code.
2019-05-29 00:26:30 +01:00
Jeff Young
0260b32125
Push resetLocalCoords down into COMMON_TOOLS.
...
Fixes: lp:1830693
* https://bugs.launchpad.net/kicad/+bug/1830693
2019-05-29 00:26:29 +01:00
Jeff Young
6936effaa7
Implement undo for Page Settings in PlEditor, Eeschema and PCBNew.
...
Fixes: lp:1820059
* https://bugs.launchpad.net/kicad/+bug/1820059
2019-05-27 11:58:55 +01:00
Jon Evans
638ac3838c
PcbNew: Fix layer alpha overrides being overwritten by color changes
...
Fixes: lp:1827518
* https://bugs.launchpad.net/kicad/+bug/1827518
(cherry picked from commit cb3edf2607
)
2019-05-26 20:20:53 -04:00
Jeff Young
323bb0f8e1
Moving PageLayout editor to GAL canvas and modern toolset.
2019-05-24 19:49:09 +01:00
Jeff Young
b90b454ada
Remove legacy block operations.
2019-05-18 00:21:49 +01:00
Jeff Young
1a3d0492f5
Push polar coords down into COMMON_TOOLS.
2019-05-18 00:21:49 +01:00
Jeff Young
fbb807f3bb
Move some more menu & toolbar items to modern toolset.
2019-05-16 19:57:06 +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
eb3a201d39
Move some PCBNew and GerbView actions to their COMMON equivalents.
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
c1539ae014
Naming changes to reflect sharing between SchEdit and LibEdit.
2019-05-10 19:56:20 +01:00
Jeff Young
1a007c3e4b
Implement SCH_SELECTION_TOOL (but still with legacy semantics).
2019-04-22 22:08:18 +01:00
Jeff Young
b63fab92cf
Move Eeschema net highlighting to modern toolset.
2019-04-14 12:10:48 +01:00
MaPePeR
e7d32c54b9
pcbnew: Draw Ratsnest with arcs to avoid overlap
...
Adds a toggle button that allows switching between straight lines and
curves for the ratsnest lines.
Fixes: lp:1766597
* https://bugs.launchpad.net/kicad/+bug/1766597
2019-04-12 00:28:58 +01:00
Seth Hillbrand
4460313104
pcbnew: Separating connectivity to subdir
2018-10-12 16:31:09 -07:00
John Beard
445a9fa963
Put cursor and pan control in libcommon/tool, enable in Gerbview
...
Put the cursor and pan control TOOL_ACTIONs in ACTION,
and refer to them in that way.
The handlers are currently identical in Pcbnew and Cvpcb,
and Gerbview (and all canvases) can benefit from them as well
if they are in libcommon. Also saves duplicated code.
Fixes: lp:1795855
* https://bugs.launchpad.net/kicad/+bug/1795855
2018-10-04 11:41:06 +02:00
Jeff Young
37f7faf433
Move lock checks to CLIENT_SELECTION_FILTER.
...
Also checks render item visibility as well as layer visibility
when making selections.
Fixes: lp:1066220
* https://bugs.launchpad.net/kicad/+bug/1066220
Fixes: lp:1541756
* https://bugs.launchpad.net/kicad/+bug/1541756
2018-09-25 17:56:38 +01:00
Jeff Young
5974899fa5
Clean up file locations and names.
2018-09-22 16:23:13 +01:00
Jeff Young
c91e51f688
Don't inadventently clear selection reference point.
...
New algorithm more targetted and just clears the items. This
also obviates the need for the aQuietMode flags.
Only fixes one part of the bug, but the "fixes" line is the
easiest way to get a link in the bug to the commit.
Fixes: lp:1786727
* https://bugs.launchpad.net/kicad/+bug/1786727
2018-08-22 15:11:58 +01:00
Jeff Young
5ce0f8ba54
Kill off a few more g_UserUnit references.
...
(cherry picked from commit 452b1a7)
2018-07-17 15:12:07 +01:00
Jeff Young
05ef6f05d1
Move SanitizePads to CLIENT_SELECTION_FILTER architecture.
...
This not only reduces the number of different mechanisms, but
will also reduce (yet again) the number of Clarify Selection
pop-ups (because the CLIENT_SELECTION_FILTER runs before the
pop-up, while SanitizePads ran after it).
Fixes: lp:1710451
* https://bugs.launchpad.net/kicad/+bug/1710451
(cherry picked from commit e50a993)
2018-07-17 15:10:18 +01:00
Maciej Suminski
94b6f848bb
pcbnew_control.cpp: change C-style asserts to wxCHECK/wxFAIL
2018-06-15 17:11:32 +02:00
Maciej Suminski
eb97634bdf
Enable 'Delete Item' toolbar icon in the Footprint Editor when the tool is active
2018-06-15 17:10:12 +02:00
Maciej Suminski
7d66dc0cc3
Fixed an assert on pasting items in the Footprint Library Editor
...
The assert in the title line verifies that an item does not belong to
any DLIST when it is being added to one. Items in clipboard are already
owned by DLISTs, therefore they need to be removed from the original
DLISTs before being added to new ones.
2018-06-15 14:35:55 +02:00
jean-pierre charras
2832f997c5
PcbNew; fix crash on copy/paste
...
Due to a bug introduced by commit ba1e0efda
that tried to fix an other bug.
Fixes: lp:1771003
https://bugs.launchpad.net/kicad/+bug/1771003
2018-05-13 21:50:59 +02:00
jean-pierre charras
ba1e0efdad
Pcbnew, GAL mode: Fix incorrect management of zones in append board and copy from Paste from clipboard.
...
Fixes: lp:1770855
https://bugs.launchpad.net/kicad/+bug/1770855
2018-05-12 20:48:50 +02:00
Maciej Suminski
471e3de5a7
Fixed board append function, broken in 046e73ec
...
The previous implementation cleared all DLISTs, but has not added
everything back on append.
2018-05-08 11:21:55 +02:00
Maciej Suminski
8cb3aa79f2
pcbnew_control.cpp code formatting
2018-05-08 10:40:33 +02:00
Maciej Suminski
046e73ecac
Clear the source DLIST when pasting items to a BOARD
...
Fixes the assert triggering when items already belonging to a list are
added to another one.
2018-05-08 10:40:33 +02:00
Maciej Suminski
143d580596
Fixed relative coordinates reset when a tool forces the cursor position
...
Fixes: lp:1759044
* https://bugs.launchpad.net/kicad/+bug/1759044
2018-04-24 12:56:19 +02:00
Maciej Suminski
dce0743ddb
Removed nagging dialog in the delete tool.
2018-04-19 15:35:10 +02:00
Maciej Suminski
ab37801489
Do not define hotkeys for copy/cut/paste to avoid double action execution
...
CTRL+{X,C,V} used to be handled both by the legacy hotkey system that
generated ID_EDIT_{CUT,COPY,PASTE} wxCommandEvent, and the Tool Framework
hotkey system.
Fixes: lp:1749549
* https://bugs.launchpad.net/kicad/+bug/1749549
2018-03-12 16:53:17 +01:00
Jon Evans
be8bb24390
Make all new hotkeys editable; label some GAL-only hotkeys
...
Fixes: lp:1751183
* https://bugs.launchpad.net/kicad/+bug/1751183
2018-02-25 17:57:36 -05:00
Jeff Young
d043ef5bb6
Address inc/decAlpha bug fix code review comments.
...
Change menu names to reference Opacity instead of Brighness.
Implement a bottom-stop at 20%.
2018-02-23 14:14:56 +01:00
Jeff Young
4dda8a39fe
Add inc/dec current layer alpha to menus.
...
Also adds indicators in layers palette for feedback.
Also generates sized images for all indicators instead of using
scaled bitmaps (which didn't look great).
Also fixes a completely unrelated typo in a UI string.
2018-02-22 17:48:14 +01:00
Michael
3b085f0d03
Pcbnew new menubar structure
2018-02-18 11:27:52 -05:00
Jeff Young
ce0d1aca8d
Draw the grid and the grid origin in the grid colour.
...
Fixes: lp:1749564
* https://bugs.launchpad.net/kicad/+bug/1749564
2018-02-15 18:29:56 -05:00
jean-pierre charras
8552f3fedf
fix code after renaming files
2018-01-29 22:00:44 +01:00
jean-pierre charras
d0754acf00
Fix code after renaming files
2018-01-29 11:37:29 +01:00
Jeff Young
7a28f3d4cf
Implement undo/redo for origins in legacy
...
PICKED_ITEMS_LIST knows the architecture of the undo commands so
that it can delete those ITEMs which it owns. This represents poor
encapsulation so instead of adding yet another case, I added a
UR_TRANSIENT item flag which is set by callers whenever they create
new objects to “give to” the undo/redo stack. This allowed some
cleanup of other code, but cleaning up UR_DELETE and UR_WIRE_IMAGE
will be a bigger task and have to wait for another day.
Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:51:44 -05:00
Jeff Young
4784ee7fe4
Implement undo/redo for drill and grid origins.
...
The undo/redo operations are essentially the same as for
UR_CHANGED: we store both the origin marker item and a copy
of it and flip back and forth between the two. This also
required the implementation of clone() for the markers.
The ORIGIN_VIEWMARKER is moved from being a subclass of
EDA_ITEM to BOARD_ITEM to facilitate the use of a UR_CHANGE-
like implementation without having to know the internals
of the ORIGIN_VIEWMARKER.
In the command processors, the setting of the origins is
broken into two parts: one for UI-level access which includes
setting up undo, and one for low-level access which does not.
The undo/redo code itself of course uses the lower level.
Fixes: lp:1542018
* https://bugs.launchpad.net/kicad/+bug/1542018
2018-01-27 19:40:51 -05:00
Tomasz Włostowski
b76a6210c5
pcbnew: fixed stuck cursor when ForceCursorPosition() is active and cursor is moved by keyboard arrows
...
Fixes: lp:1729301
* https://bugs.launchpad.net/kicad/+bug/1729301
2017-11-16 00:43:23 +01:00
Tomasz Włostowski
00ad8f24a0
pcbnew: Minor changes in CONNECTIVITY_DATA interface:
...
- renamed connectivity.[h|cpp] to connectivity_data [.h|.cpp] so that the file name matches the main class name.
- GetNetItems() now returns a vector instead of a list
2017-11-15 18:34:08 +01:00
jean-pierre charras
661bab7220
Fix crash when appending a board in pcbnew.
...
Fixes: lp:1731539
https://bugs.launchpad.net/kicad/+bug/1731539
2017-11-11 09:09:24 +01:00
Tomasz Włostowski
8a09a1d329
refactoring: derive PCB-specific PCB_VIEW from VIEW with the intention of moving PCB_EDIT_FRAME entries used by the tools (e.g. GetActiveLayer) there
2017-11-03 20:02:06 +01:00
Tomasz Włostowski
81d1e17f02
refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS
2017-11-03 20:02:06 +01:00
Tomasz Włostowski
c6a0ad895b
pcbnew: code formatting, removed previous module editor copy/paste functions
2017-09-30 14:28:54 +02:00
Tomasz Włostowski
5731000135
pcbnew/copy&paste: multiple improvements:
...
- fixed netcode propagation bug
- factored out EDIT_TOOL::m_offset, now selection offset is stored in SELECTION class
- added VECTOR2I-based Move/Flip/Rotate methods in BOARD_ITEM
2017-09-30 14:28:54 +02:00
Tomasz Włostowski
f573a2e685
wip
2017-09-30 14:28:54 +02:00
Tomasz Włostowski
3fb926a8f2
Fix snapping to anchors in PICKER_TOOL & highlighting of pasted items
2017-09-30 14:28:54 +02:00
Tomasz Włostowski
931a1ccaff
Improved copy/paste functionality by Kristoffer:
...
- added selection of reference point
- added snapping when pasting
- some minor code refactoring
- disabled pasting between footprint and pcb editors due to model incompatibility
2017-09-30 14:28:54 +02:00
Kristoffer Ödmark
4ce38abce2
renamed copypasta functions, fixed a paste_module error
2017-09-30 14:28:53 +02:00