Commit Graph

151 Commits

Author SHA1 Message Date
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