Commit Graph

216 Commits

Author SHA1 Message Date
Jeff Young fec0c235d9 Hook up Footprint Text Line Mode action to handler. 2020-04-27 00:24:57 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young 4990d1e7b2 Variable substitution framework.
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00
Jeff Young 3b97993daf Another attempt to fix offset issues when pasting board items to ModEdit.
Fixes https://gitlab.com/kicad/code/kicad/issues/4032
2020-03-16 18:45:55 +00:00
Jeff Young 51b9944667 Fix pasting of items from board to Footprint Editor.
In particular, map the netlist info to the orphaned item, and
adjust the position of module graphic items to no longer be
module-relative.

Fixes https://gitlab.com/kicad/code/kicad/issues/4032
2020-03-10 23:07:01 +00:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
jean-pierre charras d12e8479f2 Pcbnew: fix crash when trying to select the previous copper layer.
The function that calculates the previous layer id was using a illegal value
in some cases.

Fixes #3805
https://gitlab.com/kicad/code/kicad/issues/3805
2020-01-24 10:13:18 +01:00
Ian McInerney 34bc0a4e96 pcbnew_control: Replace C casts with C++ casting 2020-01-13 14:19:44 +00:00
Ian McInerney e2853862e5 Cleanup redundant type casting 2020-01-13 14:00:45 +00:00
Jeff Young 94f8aafec5 Fix missing variable initialization. 2020-01-13 00:18:49 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Ian McInerney 5d46e721e5 pcbnew: Cleanup includes of pcbnew_id.h
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Fabien Corona 496f3d49e4 pcbnew: When using '+' and '-' hotkeys, skip non-visible layers
CHANGED: pcbnew: When using '+' and '-' hotkeys, skip non-visible layers

Fixes https://gitlab.com/kicad/code/kicad/issues/3443
2019-12-29 23:37:25 +00:00
jean-pierre charras a12b803af5 Add missing option to show footprint texts in fill or sketch (line) mode.
This option is settable in stable version, but not in master.
So, this option set from the stable version could be modified in master version.
2019-12-23 18:11:45 +01:00
Seth Hillbrand 6625d0721e Implement Get/Set display options
The pointer passing for display options is deprecated.  This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.

In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
2019-11-07 08:26:44 -08:00
Jeff Young 872826085a Filter PCBNew contents when pasting into Footprint Editor.
Fixes: lp:1850724
* https://bugs.launchpad.net/kicad/+bug/1850724
2019-11-05 17:22:51 +00:00
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