Commit Graph

3963 Commits

Author SHA1 Message Date
Jeff Young 3bd38ec245 Improve zoom-to-extents for footprints with long text.
Fixes: lp:1820540
* https://bugs.launchpad.net/kicad/+bug/1820540
2019-09-05 21:02:29 +01:00
Ian McInerney 8d86d94a4d wxWidgets compatibility fixes
* Remove unneeded check
* Fix WX_GRID since upstream renamed a variable in 3.1.3
2019-09-05 08:11:44 -04:00
Seth Hillbrand 857355d537 Fix return mixup in previous commit 2019-09-04 16:15:46 -07:00
Seth Hillbrand ac0df06312 Fix compile issue with wx inline asm
The wxAssert compile path on msw includes inline assembly which is
illegal for constexpr routines.  This replaces the wxAssert with
wxLogDebug as suggested by Ian
2019-09-04 15:37:21 -07:00
Seth Hillbrand c8a6878eb8 pcbnew: Allow tuning length to be longer than INT_MAX
The INT_MAX limit for most elements makes sense only for single-segment,
straight line elements.  For elements that accumulate lengths, we should
utilize the long long int (64 bits) to allow for greater lengths.

Fixes: lp:1842367
* https://bugs.launchpad.net/kicad/+bug/1842367
2019-09-03 16:41:09 -07:00
Jeff Young 54255cffeb Cleanup to make implementation names consistent with what they now do.
Fixes: lp:1842477
* https://bugs.launchpad.net/kicad/+bug/1842477
2019-09-03 19:29:30 +01:00
Jeff Young fc50ddda64 Implement Paste Special for eeschema.
Also changes the normal paste behaviour to only clear annotations
when a collision is found.

Fixes: lp:1837002
* https://bugs.launchpad.net/kicad/+bug/1837002
2019-09-02 19:24:29 +01:00
Jeff Young 5e353e8967 Fix another case of selection getting out of sync with dragged items.
Use a big hammer this time.

Fixes: lp:1839780
* https://bugs.launchpad.net/kicad/+bug/1839780
2019-08-31 20:23:06 +01:00
Jeff Young e269b5d1b9 Workaround an issue where a throw terminates (even when there's a catch for it).
You can trigger it before this fix by running Cvpcb when a .kicad_mod file is
incorrectly set as "Legacy" in your footprint table.
2019-08-31 15:18:27 +01:00
Seth Hillbrand ccc3b812b8 Make dialogs look more like frames
We use DIALOG_SHIM to display many items that should behave more like
frames with the ability to min/max/resize.  This changes the default
custom dialog behavior to the frame-type.

Fixes: lp:1829950
* https://bugs.launchpad.net/kicad/+bug/1829950
2019-08-30 09:24:50 -07:00
Jeff Young bc450853ae More robust solution for adding dragged items to selection.
Fixes: lp:1839780
* https://bugs.launchpad.net/kicad/+bug/1839780
2019-08-29 23:56:16 +01:00
Jeff Young 2274895acf Add print preflight so the menu item is only shown when we can print.
Fixes: lp:1836473
* https://bugs.launchpad.net/kicad/+bug/1836473
2019-08-29 23:56:16 +01:00
Seth Hillbrand c3e07a5886 Cleaning Cairo GAL
Removed extra allocations that were not used.
Removed unneeded shared pointer
Corrected storage type from RGB to ARGB
2019-08-28 19:29:47 -07:00
Jeff Young 360a52399a Add printing to RMB project items.
Fixes: lp:1836473
* https://bugs.launchpad.net/kicad/+bug/1836473
2019-08-28 17:32:08 +01:00
Jeff Young a5a237ac32 Improve readability of flag checking. 2019-08-27 19:23:07 +01:00
Seth Hillbrand b3615b36bb pcbnew: Retain 45° constraint
This also finishes the polygon with 45° lines when chosen as a create
option.

Fixes: lp:1833673
* https://bugs.launchpad.net/kicad/+bug/1833673

(cherry picked from commit fccce265aa)
2019-08-26 14:36:23 -07:00
Jeff Young 6b6e9eddee Return control of Symbol and Footprint chooser col widths to user.
The auto-calculation wasn't working out and even with it some users
wanted control.

Fixes: lp:1796774
* https://bugs.launchpad.net/kicad/+bug/1796774
2019-08-26 18:27:49 +01:00
Steven A. Falco e997f4a7f4 Revert part of commit 6cab769f41
Commit 6cab769f41 breaks compilation on ppc64le, because the gcc
compiler defines both _ARCH_PPC and _ARCH_PPC64.
2019-08-26 08:22:48 -07:00
Ian McInerney 1bbd944277 pcbnew: Add ability to reset layer/item colors to defaults 2019-08-26 09:20:08 -04:00
Jeff Young c85d1fa00c Try out our own tabbing logic.
Fixes: lp:1840991
* https://bugs.launchpad.net/kicad/+bug/1840991
2019-08-22 21:18:24 +01:00
Jeff Young a6b7d4f7f6 Support 9 comments in the page setting GUI.
Fixes: lp:1793148
* https://bugs.launchpad.net/kicad/+bug/1793148
2019-08-21 20:34:01 +01:00
Jeff Young bfb8806682 Upgrade Cvpcb filtering to use a multi-term combined matcher.
Fixes: lp:1827135
* https://bugs.launchpad.net/kicad/+bug/1827135
2019-08-21 15:35:02 +01:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Seth Hillbrand 46feb76aba Allow EDA_RECT to properly be uninitialized
The base initialization of EDA_RECT sets a 0/0/0/0 rectangle that
prevents merging properly with valid EDA_RECT.  This sets the default to
be uninitialized until the internal data are set.
2019-08-16 10:54:16 -07:00
Seth Hillbrand fbc19ab893 Make coroutines stack size configurable
This allows rapid debugging of the coroutine memory issues.  It moves
the default stack size to 256 * 4096 = 2^20, which will utilize full
pages on all architectures.
2019-08-15 09:25:13 -07:00
Jeff Young 8ba7d4570c Move warp-mouse-on-move setting from Eeschema settings to common settings.
It's also used by the Symbol Editor, and will likely be used by
Pcbnew and friends in the future.
2019-08-15 12:53:04 +01:00
Jeff Young fb0fd825ba Don't try and be too smart about scaling and worksheets.
Fixes: lp:1815586
* https://bugs.launchpad.net/kicad/+bug/1815586
2019-08-14 11:37:10 +01:00
Jeff Young 3cdf88f2c6 CERN copyrights for work packages. 2019-08-14 09:35:15 +01:00
Ian McInerney 8493daf9ff Unify menu item creation for closing a window
* Push a function into CONDITIONAL_MENU that adds the item
* Modify the tooltip for close and exit items to have the
  program name

Fixes: lp:1835454
* https://bugs.launchpad.net/kicad/+bug/1835454
2019-08-14 09:35:15 +01:00
Jeff Young c2d77a7300 Add some defensive code to prevent re-entrant printing.
Fixes: lp:1765965
* https://bugs.launchpad.net/kicad/+bug/1765965
2019-08-13 18:00:09 +01:00
Jeff Young a33d67f6b4 Push shift/cmd+<enter> processing down into dialog shim.
This will make them more uniform rather than only supported when
something else is using <enter>.

Fixes: lp:1838353
* https://bugs.launchpad.net/kicad/+bug/1838353
2019-08-13 16:53:40 +01:00
Ian McInerney 95430e131e cvpcb: cleanup include statements 2019-08-12 14:19:01 -04:00
Ian McInerney 9fda86e261 cvpcb: Move file extension to common and deprecate a header 2019-08-12 14:19:01 -04:00
Michael Kavanagh 79b2ff7551 Refactor deleteTool ACTION removing duplicates 2019-08-12 13:49:55 -04:00
Seth Hillbrand 0b80c00678 Add Valgrind stack instrumentation
Our coroutine system can make debugging memory issues harder by not
following a standard stack allocation system.  We can get around this by
using valgrind's built-in stack instrumentation.  Each coroutine
registers a stack allocation allowing memcheck to recognize when
accesses are bounded.
2019-08-10 08:28:25 -07:00
Jeff Young 3a2c39b0f8 Remove disappearing-preferences hack in favour of fix in wxWidgets.
This has been patched in our local OSX wxWidgets branch.
2019-08-10 11:58:05 +01:00
Jeff Young 17b5a3750b Move preferences-lost hack down into EDA_DRAW_FRAME.
I've now seen it in Eeschema as well as Pcbnew.

Fixes: lp:1839148
* https://bugs.launchpad.net/kicad/+bug/1839148
2019-08-09 21:22:56 +01:00
Jeff Young 8db8119564 Redraw selection halos after zooming.
Fixes: lp:1838869
* https://bugs.launchpad.net/kicad/+bug/1838869
2019-08-08 13:51:23 +01:00
Seth Hillbrand 5151cd0bfe C++14: Remove unused make_unique.h
Also removes header references now that we are in C++14, this is
built-in to the std
2019-08-07 09:27:31 -07:00
Seth Hillbrand 5facd37376 GAL: Use cursor enum
Not all platforms define the WXWIN_COMPATIBILITY_2_8 so an int isn't
properly cast.
2019-08-06 18:33:42 -07:00
Seth Hillbrand e985e10eec gerber: Fracture footprint polygons before exporting
Footprint polygons can be degenerate and need
to be simplified before exporting
2019-08-06 17:00:27 -07:00
Ian McInerney 920120864f Fix initialization of COLOR4D statics
Just declaring as static const would give an initialization order
fiasco since they were being used to initialize other statics.
2019-08-06 10:06:10 -07:00
Ian McInerney b6f6fc3d65 Return handled status for actions run from hotkeys 2019-08-05 20:46:05 -06:00
Jeff Young 1a68d7c200 Cleanup no-longer-used variable. 2019-08-05 16:48:18 -06:00
Jeff Young 97d70d7844 Fix cursor bugs in simulation.
1) cancel simProbe or simTune when simulator window closed
2) handle non-stock cursors through SetCurrentCursor()

Fixes: lp:1833583
* https://bugs.launchpad.net/kicad/+bug/1833583
2019-08-04 16:25:36 -06:00
Jeff Young 5503727d3d Fix some placement bugs with selection haloes on text.
Fixes: lp:1838841
* https://bugs.launchpad.net/kicad/+bug/1838841
2019-08-03 17:20:54 -06:00
Jeff Young cc82e59003 Push the Quit/Close menu logic down into common. 2019-08-02 14:32:49 -06:00
Jeff Young 937e3c2d48 Make m_Text private so we don't keep getting bugs where m_shown_text fails to get updated.
Fixes: lp:1838655
* https://bugs.launchpad.net/kicad/+bug/1838655
2019-08-01 20:36:59 -06:00
Ian McInerney bea74c27e5 Add log trace for tool handling 2019-07-31 21:56:53 -06:00
Jeff Young 6bf1ac45e3 New selection highlighting model for eeschema. 2019-07-29 19:57:41 -06:00
Jeff Young 3904d7ccfc Push some search stuff down into EDA_DRAW_FRAME so it can be shared.
Also rewrites the PCBNew Find dialog to make use of the above, including:
1) searching in user-defined footprint fields
2) searching in pcb text
3) a history list in the search popup
4) case sensitive searching
5) word sensitive searching
6) the ability to turn wildcard searching on/off
7) better placement of the result when the dialog obscures part of the
window

Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
2019-07-26 17:53:32 -06:00
Jeff Young 460b03372d Implement preference for immediate actions.
Also pushes prefer-selection-to-dragging to common.
2019-07-25 20:41:22 -06:00
jean-pierre charras dd702cd53d Remove pads not on copper layers (just on tech layers) from connectivity calculation.
Pads not on copper layers now do not have a netname, and are no longer taken in account in connectivity.
Especially it avoid creating useless rats-nests for these pads.
2019-07-25 13:08:41 +02:00
jean-pierre charras 858db3c104 Synchronize toolbars state with current options after rebuilding them.
Previously, for instance after modifying preferences or language,
they were rebuilt but the tools state was not set due to a missing call to SyncToolbars() after rebuilding.
2019-07-20 18:16:35 +02:00
Tomasz Wlostowski 6cab769f41 MSVC support for libcontext
This uses the Windows native Fiber API.
2019-07-17 08:10:47 -04:00
Tomasz Wlostowski 8b492c3c45 Export LIB_TREE_ITEM 2019-07-17 08:10:47 -04:00
Seth Hillbrand ae0bdb96e5 Resetting polygon inflate/deflate defaults
These are used in too many places throughout pcbnew to change all
polygons.  If we need different rounding, we'll want to implement them
on a per-call basis.
2019-07-16 11:46:18 -07:00
jean-pierre charras 6388189f48 Preferences, Hotkey list: Avoid list to be shown twice.
The bug was due to the fact TransferDataToWindow was called twice, and the hotkey list was not cleared before rebuild it
2019-07-16 18:30:14 +02:00
Jeff Young 2c5876ee8c Add more control over how corners are handled when inflating polygons. 2019-07-16 16:41:21 +01: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 a3c74051c2 Allow edits to self-intersecting polygons.
1) Intermediate states might be self-intersecting, and we shouldn't
be policing our users on what order to do things in
2) The polygon might already be self-intersecting, at which point we're
preventing the user from fixing it.

Also includes better const management for SHAPE_POLY_SET API.

Fixes: lp:1833831
* https://bugs.launchpad.net/kicad/+bug/1833831
2019-07-14 18:18:48 +01:00
Jeff Young 928d6c5dff Implement preserved-corners to prevent divots when filling adjacent zones.
Fixes: lp:1460787
* https://bugs.launchpad.net/kicad/+bug/1460787
2019-07-14 18:18:48 +01:00
Jeff Young 1a7cef2950 Improve performance, commenting and API of some polygon classes. 2019-07-14 10:39:38 +01:00
Jeff Young 37af3adffb Add preference for flip axis.
Fixes: lp:1836267
* https://bugs.launchpad.net/kicad/+bug/1836267
2019-07-14 10:36:48 +01:00
Jeff Young a3855cb4f2 Allow thermal spokes to be same width as minimum width.
Also some changes for readability and clarity, both in the code
and in the Feature Constraints panel.

Fixes: lp:1835674
* https://bugs.launchpad.net/kicad/+bug/1835674
2019-07-14 10:36:48 +01:00
Ian McInerney ff9d899ae0 pcbnew: Clean up warnings with unit handling in the DXF export 2019-07-10 12:21:01 -04:00
Jeff Young 30ec895c96 Cleanup event processing stuff to keep better track of "handled".
See: https://lists.launchpad.net/kicad-developers/msg41471.html .
2019-07-09 21:59:46 +01:00
Jeff Young 483dc24e87 Homogenize selection tools around our HIG.
In particular make addative and exclusive-or selections work the
same way.

Also give Highlight Net a hotkey now that it can't use ctrl-click
anymore.
2019-07-09 21:59:46 +01:00
Jeff Young 4852c91b42 Possible fix for GTK bug differentiating hotkeys from menu picks.
Fixes: lp:1835672
* https://bugs.launchpad.net/kicad/+bug/1835672
2019-07-08 10:51:45 +01:00
Jeff Young a11f3a0b80 Make <esc> unhighlight nets, but only after all tools have been cleared.
Also moves the Highlight Net hotkey from activating the tool to just doing
a one-shot highlight.

Fixes: lp:1835658
* https://bugs.launchpad.net/kicad/+bug/1835658
2019-07-08 00:02:25 +01:00
Jeff Young a3b855ac6c Massage an earlier fix so that mouse-clicks in tools update the highlighting. 2019-07-06 17:50:35 +01:00
jean-pierre charras 39c830435c Fix a bug created by commit ea0edaba. 2019-07-06 14:48:53 +02:00
Thomas Figueroa ea0edaba21 Fix cursor lag in canvases on Windows.
Fixes: lp:1831541
* https://bugs.launchpad.net/kicad/+bug/1831541
2019-07-06 00:04:54 +01:00
Jeff Young 7ee6afeace Performance improvement for zone filling. 2019-07-06 00:04:54 +01:00
Jeff Young a9c66e15ea Common-ize EE_ACTIONS::refreshPreview and use it after cursor actions.
Fixes: lp:1818667
* https://bugs.launchpad.net/kicad/+bug/1818667
2019-07-05 14:45:15 +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 ad26ece8d4 Add Global Edit Text and Graphics Properties to Eeschema.
Fixes: lp:1801150
* https://bugs.launchpad.net/kicad/+bug/1801150
2019-07-01 22:15:25 +01:00
Seth Hillbrand d650cca088 Enforcing rational limits on length tuner
The length tuning dialog needed validators on close to prevent negative
and percentages >100%

Fixes: lp:1834734
* https://bugs.launchpad.net/kicad/+bug/1834734

(cherry picked from commit 3974c6fd89)
2019-06-29 09:38:27 -07: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 fa84babefe Re-implement sch->pcb cross-probing using net highlighting architecture.
Fixes: lp:1827853
* https://bugs.launchpad.net/kicad/+bug/1827853
2019-06-26 21:54:03 +01:00
Jeff Young e785c140b9 Eradicate globals for PCB_GENERAL_SETTINGS.
Fixes: lp:1832896
* https://bugs.launchpad.net/kicad/+bug/1832896
2019-06-26 21:54:03 +01:00
jean-pierre charras c1eee56785 Prepare changes to support a better board stack management in .gbrjob file.
In .gbrjob file, one can specify the thickness and color of some layers.
Currently, there is no way to enter these parameters.
This commit prepare a better support of .gbrjob files.
2019-06-25 18:39:11 +02:00
Jeff Young f9702aab87 Immediate actions for PlEditor, PcbNew, etc. 2019-06-25 11:34:28 +01:00
Jeff Young f088d4d762 Add env-var setting to CommonSettingsChanged().
Fixes: lp:1804925
* https://bugs.launchpad.net/kicad/+bug/1804925
2019-06-25 11:34:28 +01:00
Jeff Young 3784950603 Added more sophisticated checking for thermal spoke connections.
And, again, some more performance optimizations to make up for it.
2019-06-25 11:34:28 +01:00
Jeff Young fbfcba6e4d Add action for context menu (right-mouse-click).
Fixes: lp:1663595
* https://bugs.launchpad.net/kicad/+bug/1663595
2019-06-25 11:34:27 +01:00
jean-pierre charras 29ca96cfe7 Gerber drill file: Modify a aperture attribute for oblong holes (slots).
Oblong holes (slots) use now a aperture attribute similar to round holes.
(The previous attribute "slot" is now deprecated)
However they have a specific aperture, and a comment is added in drill files for these apertures.
2019-06-25 09:43:29 +02:00
Seth Hillbrand 98124e68c7 Update exit strategy to match UI guidelines
In singletop mode, all frames show the "Quit" option in the file menu
and will quit on Ctrl-Q.  When launched from the main KiCad interface,
sub-programs show the "Close" option instead and will close with Ctrl-W.
In this mode, Ctrl-Q will instruct the main program to exit.

Fixes: lp:1779938
* https://bugs.launchpad.net/kicad/+bug/1779938
2019-06-24 21:46:42 -07:00
Wayne Stambaugh 15e6bcc86b Footprint library nickname comparison fixes.
Footprint library nicknames are case sensitive but the comparison for
the library tree control was case insensitive.

Also make the footprint name comparisons case sensitive as well.  While
not strictly necessary, the plan is to start using the name defined in
the footprint file instead of the file name which will allow for case
sensitivity.

Fixes lp:1833701

https://bugs.launchpad.net/kicad/+bug/1833701
(cherry picked from commit d8fff5c820)
2019-06-24 08:03:28 -04:00
Seth Hillbrand 6d60b98dc8 Fix bug in tesselation
When we hit a self-intersection, we need to be careful that we don't
lose the stop vertex.

Fixes: lp:1833819
* https://bugs.launchpad.net/kicad/+bug/1833819
2019-06-23 20:55:55 -07:00
Seth Hillbrand 77cefe0c16 Normalize line endings
A few files snuck in with CRLF for the line endings.  These make it hard
to look at diffs as every line appears to have changed.  This commit
makes only line ending changes, so can be ignored
2019-06-19 15:18:30 -07:00
Jeff Young 485d436860 Clear ctx-menu before rebuilding; don't veto ctx-menu mousewarp for non-ctx-menu dialog.
Fixes: lp:1833312
* https://bugs.launchpad.net/kicad/+bug/1833312
2019-06-19 21:17:56 +01:00
Jeff Young eb95202708 Fix grid update when edited from menubar.
Fixes: lp:1833399
* https://bugs.launchpad.net/kicad/+bug/1833399
2019-06-19 18:35:17 +01:00
Jeff Young 730b89af6d Another round of changes for immediate actions. 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 7dd247f1dc Make better use of TOOL_EVENT parameters. 2019-06-18 20:24:15 +01:00
Wayne Stambaugh 9f9e87f11f Minor library identifier validator change.
Use the wxTextValidator style flag to allow the user to clear the library
identifier string.  Use wxTextValidator::SetStyle( wxFILTER_EMPTY ) to
prevent empty library identifier strings which is the current behavior.
2019-06-18 11:18:09 -04:00
Jeff Young 4eab89d9ef Fix OSX button order issue in Unsaved Changes dialog.
Also changes the presentation of the string when the checkbox appears
so that the "Changes will be lost" warning isn't hidden by the turndown.
This last part may require conditional compilation as it's undocumented.

Lastly, regularizes the Unsaved Changes strings between the apps.
2019-06-17 17:01:57 +01:00
jean-pierre charras 8085899d0a Pcbnew: better approximation of arcs by polygons for pads having a very small size.
Especially, small round rect pads have a ugly shape because the number of segments is
small and the 90 deg arcs are not very well approximated.
The minimal seg count for 90 deg arcs is now 4 (16 segm/circle) for pads.

Fixes: lp:1833005
https://bugs.launchpad.net/kicad/+bug/1833005
2019-06-17 17:26:15 +02: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 666705c1f8 Fix compiler warning. 2019-06-17 14:44:38 +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 909aeba3d9 Transition some more stuff from the MVC view to the controller. 2019-06-16 19:53:30 +01:00
Jeff Young c7bfa9857e Use more reflective naming of what the tool does. 2019-06-16 19:52:07 +01:00
jean-pierre charras 66d2060942 Partial fix for missing language selection menu.
The fix is partial because in the list of languages the menuitem corresponding to the selected language is not checked.
2019-06-16 20:35:57 +02:00
Wayne Stambaugh 77bf575742 CvPcb: fix save changes dialog layout issue.
DIALOG_EXIT was not being laid out correctly after setting the dialog
message.  Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT.  This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.

Remove DIALOG_EXIT_BASE as it is no longer required.

Fixes lp:1832899

https://bugs.launchpad.net/kicad/+bug/1832899
2019-06-16 12:10:24 -04: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 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
jean-pierre charras 12a4a38507 pl_editor:make the option "show formatted texts" working. 2019-06-15 19:54:05 +02:00
Seth Hillbrand 79e2000af4 Fix case-sensitive import using KiCad std
Fixes: lp:1832853
* https://bugs.launchpad.net/kicad/+bug/1832853
2019-06-15 08:08:41 -07:00
Jeff Young e90cfa1d40 Improve gesture lables for better consistency with key labels. 2019-06-14 16:54:46 +01:00
Jeff Young 3d9690302c Only show gestures in List HotKeys (and not in Preferences / HotKeys). 2019-06-14 16:54:46 +01:00
Jeff Young b429dbfb88 Fix bugs with ACTIONs not being "honest" singletons.
Delete the copy ctor and assignment operator to start with, but
even then the separate apps each have their own statically allocated
copy of the common actions.  So we need to update all of them, which
also means having the kicad manager frame's set of actions on hand).

This changelist also adds a Clear Hotkey Assignment function since
the hotkeys set is now likely to be sparse with respect to the
actions.
2019-06-14 16:54:46 +01:00
Jeff Young 21ac28a1ec Add a few more gestures to the hotkeys list.
Fixes: lp:1778437
* https://bugs.launchpad.net/kicad/+bug/1778437
2019-06-14 16:54:46 +01:00
Ian McInerney d5f680ecd2 Allow DXF to be exported in either inches or millimeters
Fixes: lp:1832188
* https://bugs.launchpad.net/kicad/+bug/1832188
2019-06-13 15:18:20 -07:00
Jeff Young 8f84c3ec4f Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal. 2019-06-13 19:58:37 +01:00
Steven A. Falco 1edeba7fb4 Show the current grid setting. 2019-06-13 14:34:39 -04:00
Jeff Young 41441d9ced Fix crash when fetching bounding box of empty selection. 2019-06-13 15:51:32 +01:00
Jeff Young ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +01:00
Jeff Young 158e05adea Add mouse gestures to List Hotkeys.
Fixes: lp:1778437
* https://bugs.launchpad.net/kicad/+bug/1778437
2019-06-13 15:51:32 +01:00
jean-pierre charras a41ff7b924 pl_editor: fix move functions for WS_DRAW_ITEM_POLYPOLYGONS 2019-06-13 14:02:18 +02:00
jean-pierre charras f135ec47fa Page layout: rework and fix a few issues.
* rename WS_DRAW_ITEM_POLYGON to WS_DRAW_ITEM_POLYPOLYGONS (better name)
* use SHAPE_POLY_SET instead of std::vector(<wxPoint> to manage the set of polygons.
It also remove duplicate code related to HitTest and bounding box.
* fix HitTest and WS_DRAW_ITEM_POLYGON highlight.
2019-06-13 13:23:39 +02: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
John Beard fac3e2d662 PROF_COUNTER: Make Show more generic
Make the Show method accept any stream, default is current behaviour (stderr).
Can be used, therefore, also for stdout or even stringsteam.

Print a suitable timescale depending on the time recorded, from ns to s.
2019-06-12 14:16:47 +01:00
John Beard 860198edc5 Remove unused PROF_COUNTER functions
The function to pop a dialog is not really part of PROF_COUNTER,
if wanted, it can be done by the called.

This removes WX as a dep for PROF_COUNTER and profile,
which now used std::chrono only.

Also remove the print-to-stderr-with-delta function, as it's
unused too, and the delta times can be collected directly now
as std::chrono::durations if needed.
2019-06-12 14:16:47 +01:00
John Beard 781c5f7e1d Remove SCOPED_TIMER, use PROF_COUNTER
SCOPED_TIMER is a QA-only simpler version of PROF_COUNTER.

Extend PROF_COUNTER to allow access to the std::chrono::duration
for more flexibility.

Wrap PROF_COUNTER in SCOPED_PROF_COUNTER for RAII duration
output (for the same effect as SCOPED_TIMER).
2019-06-12 14:16:47 +01:00
Seth Hillbrand e52afd93a3 Remove Legacy options for overlay/context
These options were used to support the legacy canvas when drawing on
MacOS and GTK3.  With the move to 100% GAL, they are extraneous.  This
moves all DC over to "COPY" as we only use this for printing support in
Eeschema at the moment, so there is a single draw command (no erasing)
for the canvas.
2019-06-12 06:01:03 -07:00
Jeff Young 97d2800f16 Update hotkey maps when the hotkeys are edited.
Also removes some legacy code dealing with conflicts.
Also disambiguates zoom in/out commands for hotkey list.
2019-06-12 12:43:12 +01:00
Jeff Young 7726b039b2 Re-jigger standard submenus so they both link AND work. 2019-06-11 18:03:16 +01:00
Jeff Young a91934c7b3 Don't update toolbars on mouse-move events.
It produces cursor-lag in some instances, and none of our state changes
currently rely on mouse position.

Fixes: lp:1831541
* https://bugs.launchpad.net/kicad/+bug/1831541
2019-06-11 09:52:01 +01:00
Jeff Young 9f427da56f Use the ACTION_ID offset when updating the layer pair bitmap. 2019-06-11 09:13:56 +01:00
Jeff Young b3e30e50c8 Cleanup. 2019-06-10 23:46:01 +01:00
Jeff Young a3f3fb39de Convert 3DViewer to new hotkey architecture. 2019-06-10 23:46:01 +01:00
Jeff Young aeadc768f6 Add import of hotkeys and fix bugs in reanding and writing hotkeys. 2019-06-10 23:46:01 +01:00
Jeff Young b0e8443383 Sync-ing of menu has been done in CONDITIONAL_MENU for some time now. 2019-06-10 23:46:01 +01:00
Jeff Young 620395608c Move Kicad Manager launch bar to ACTIONs.
Also fixes a bug where hotkeys weren't getting put in menus.
2019-06-10 23:46:01 +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 c13ef839c1 Tool framework for Kicad Manager frame. 2019-06-10 23:46:00 +01:00
Jeff Young 16cb1e731d Finish moving TOOL_MANAGER down to the EDA_BASE_FRAME level. 2019-06-10 23:46:00 +01:00
Jeff Young c3cc85eb1c A little bit of cleanup. 2019-06-10 23:46:00 +01:00
Jeff Young 6025256e07 Push KIWAY_HOLDER down a level so we can move a bunch of stuff that doesn't belong there out. 2019-06-10 23:46:00 +01:00
Jeff Young d323fb57a7 Give KIWAY_HOLDER its own header file. 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
Seth Hillbrand 4a52062a54 GAL: Make high-contrast meld into background
This mixes the de-emphasized layers into the background color rather
than merely a black color.  This also keeps some of the original layer
color.

Fixes: lp:1831316
* https://bugs.launchpad.net/kicad/+bug/1831316
2019-06-09 08:16:58 -07:00
jean-pierre charras dfbe02c8c2 pl_editor: show the page limits and the coord reference corner position. 2019-06-07 12:42:28 +02:00
jean-pierre charras ce9b1e3da5 Pl_editor: add missing HitTest() for WS_DRAW_ITEM_BITMAP item. 2019-06-06 11:13:10 +02:00
Jeff Young 6fab7cc025 Remove a bunch of ugly mutex hacks now that we don't use wxString's UTF8 mode anymore. 2019-06-05 21:23:41 +01:00
Jeff Young 2d40425e4d Move footprint & symbol tree context menus to tool infrastructure.
Fixes: lp:1831692
* https://bugs.launchpad.net/kicad/+bug/1831692
2019-06-05 20:16:48 +01:00
jean-pierre charras e75be4074e Pcbnew: finalize the new zone filling algo (filled polygons with no thickness). 2019-06-05 18:36:20 +02:00
Jeff Young 1ea5b04e22 More ACTIONS work. Nearly done now. 2019-06-04 22:31:42 +01:00
Jeff Young ea3c29e3ec Now that we allow multiple 3DViewers, we need to make sure we have the right one.
Note that FindWindow() searches children, whereas FindWindowByName() searches
all windows.
2019-06-04 13:56:54 +01:00
jean-pierre charras 34ccd0f004 Pcbnew: prepare the new zone filling algo (filled polygons with no thickness). Work in progress. 2019-06-04 09:39:17 +02:00
Jeff Young 3912c7407f Move global commands to ACTIONs.
Also fixes a crash bug opening Edit Tracks and Vias dialog.
2019-06-03 21:08:30 +01:00
Jeff Young 568c8c336b Move DRC control to a tool; move assorted commands to ACTIONS. 2019-06-03 21:08:30 +01:00
Jeff Young 9f1e2e34b7 Move some dupicated tools to common tools. 2019-06-03 21:08:30 +01:00
Jeff Young e517199794 Move ConfigurePaths and LibTable management to common ACTIONs. 2019-06-03 21:08:30 +01:00
Seth Hillbrand 1f30d0c803 pcbnew: remove the last dlist components from pcbnew 2019-06-02 20:06:11 -07: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
Jeff Young 45a9544726 Instantate a default menu from no selection when menu is first built.
This might resolve some of the GTK menu anomalies.
2019-06-02 12:58:08 +01:00
jean-pierre charras b7f4113f96 Some minor fixes to prepare the new zone filling algo (no filled polygon thickness) 2019-06-02 11:51:47 +02:00
Jeff Young 7f1ed30ff5 Move DeMorgan handling to ACTIONs. 2019-06-01 23:03:24 +01:00
Seth Hillbrand 3fb8963536 pcbnew: Cleanup tracks and vias rework
Fixes a few commit issues based on the std:: rework.  Add an option to
delete tracks fully in pads and makes merge tracks smarter

Fixes: lp:1787190
* https://bugs.launchpad.net/kicad/+bug/1787190
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 3777c5270b Move some more Eeschema operations to ACTIONs. 2019-06-01 16:29:12 +01:00
Jeff Young 74e10791ff Fix some Mac-specific issues with the Preferences... menu item. 2019-06-01 16:29:12 +01:00
Jeff Young f67df4bf11 Collapse ARRAY_CREATOR into single class now that legacy instance is gone.
Also removes AllowLegacyCanvas ADVANCED_CONFIG option.
2019-06-01 16:29:12 +01:00
Jeff Young 7553cc2651 Clean up some dangling legacy odds and ends. 2019-06-01 01:17:46 +01:00
Jeff Young ed9153a786 Fix assert launching PCBNew. 2019-06-01 00:06:25 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young 03bab2f4a9 Remove some more legacy drawing stuff. 2019-05-31 21:54:22 +01:00
Jeff Young d2daab808c Remove some legacy cursor handling stuff. 2019-05-31 21:54:22 +01:00
Jeff Young edc8438ef0 Start the process of removing the legacy draw panel. 2019-05-31 21:54:21 +01:00
Seth Hillbrand cdaba24f0d pcbnew: Remove some legacy code
The menu IDs were used for disambiguation in legacy canvas.
2019-05-28 20:33:17 -07:00
Jeff Young 1e9da7f57b Remove CurItem() architecture and legacy routers and drawing code. 2019-05-29 00:26:30 +01:00
Jeff Young 9d29e94cb5 Remove some more legacy code. 2019-05-29 00:26:29 +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 a27e4246e0 Move some more menu commands to ACTIONs. 2019-05-29 00:26:29 +01:00
Jeff Young c0909611d3 Remove a bunch more legacy editing code. 2019-05-29 00:26:29 +01:00
John Beard 6b4b2d61f8 Common: do not conditionally define wxPoint/Size operator<<
Due to an interaction with old (<1.59) versions of Boost, the ostream
operator<< for wxPoint and wxSize is requried to use
BOOST_CHECK_EQUAL_COLLECTIONS (the print_log_value<T> function is not
used by this macro until 1.59).

Because these functions are available in Debug builds, unit tests that
use such functions will break when compiled as Release or
RelWithDebugInfo.

The change here is to not disable these functions in Release builds.

Also, the functions are moved to common.h, to go with other generic
WX "polyfill" functions. Although they might be commonly used by the
EDA_ITEM::Show functions, they are not specifically related to that
class.

Fixes: lp:1830612
* https://bugs.launchpad.net/kicad/+bug/1830612
2019-05-28 13:52:36 +01:00
Jeff Young 9d9745b555 Remove more legacy editing code. 2019-05-27 18:47: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 e9e28b9aac Retire legacy block architecture. 2019-05-27 11:58:56 +01:00
Jeff Young 21c216556b Cut/copy/paste for PlEditor. 2019-05-27 11:58:55 +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
Jeff Young 248089c934 Get rid of PageLayout globals so drawing the preview doesn't mess up the document. 2019-05-27 11:55:58 +01:00
Jeff Young bdd44ce88c Use consistent PageLayout data structure names. 2019-05-27 11:55:58 +01:00
Jon Evans d2a2dea9c4 Eeschema: fix worksheet and background color for printing
Fixes: lp:1820611
* https://bugs.launchpad.net/kicad/+bug/1820611

(cherry picked from commit 720b26d11e)
2019-05-26 14:26:26 -04:00
Jon Evans b40289c1bd Eeschema: use worksheet color when plotting
Fixes: lp:1825568
* https://bugs.launchpad.net/kicad/+bug/1825568

(cherry picked from commit e35be13b23)
2019-05-26 13:03:23 -04:00
Jon Evans e156e4509c Report actual intersection position for crossing tracks
Fixes: lp:1825588
* https://bugs.launchpad.net/kicad/+bug/1825588

(cherry picked from commit f101934909)
2019-05-26 13:03:23 -04: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
jean-pierre charras a6e6e914af Eeschema: make menu file history working again.
(the bug was due to an unexpected menuitem ID range used for the  menuitems of the history)
2019-05-25 20:58:28 +02:00
Seth Hillbrand 6bcf1839b7 pcbnew: Add arc approximation setting to board
This places the arc approximation setting in the kicad_pcb file and uses
it for all parts of the board rendering where arcs are converted to
segments.  This allows the user to customize their speed vs. accuracy
tradeoff.  The default setting of maximum error of 0.005mm is acceptable
for small boards on moderate systems.
2019-05-24 21:21:06 -07:00
Jeff Young a3dfce5adb Implement common file menu actions and move Eeschema over. 2019-05-25 01:14:21 +01:00
Jeff Young ba4ba5b668 Implementing boundingbox getters for WS_DRAW_ITEMs. 2019-05-24 21:23:26 +01:00
Jeff Young a6dee516fd Fix issue with LAYER ids and bitfields. 2019-05-24 21:23:26 +01:00
Jeff Young 71f188f3de Hook up import-page-layout and change-background-color actions. 2019-05-24 19:49:10 +01:00
Jeff Young 85f984ccd9 Add point-editor activation for immediate-mode drawing. 2019-05-24 19:49:09 +01:00
Jeff Young 09424db68f Restore selection around undo/redo. 2019-05-24 19:49:09 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
John Beard 073c03e61f Common: declare COLOR4D inside KIGFX
Forward declaring as just COLOR4D is no right, though can
work due to people putting using directives in headers.
2019-05-23 19:35:20 +01:00
John Beard 94b46ce176 QA common: add some BITMAP_BASE tests
Also:

* Init wx image handlers for qa_common
* Break out COLOR4D test predicates
* Fix some bitmap_base.h headers/forwards
2019-05-23 15:19:51 +01:00
Jeff Young 1f2bdf895e Not all SCH_DRAW_PANELs have a selection tool.
Fixes: lp:1829981
* https://bugs.launchpad.net/kicad/+bug/1829981
2019-05-23 00:27:53 +01:00
Jeff Young 0047f88f82 Mark unfold bus menu as clean so it doesn't get generated a second time.
Fixes: lp:1829878
* https://bugs.launchpad.net/kicad/+bug/1829878
2019-05-23 00:27:53 +01:00
Seth Hillbrand ac435ecd68 Moving further arc approximations down
This corrects an issue with fill segments-per-circle and moves the error
to segmetns calculation down in a number of functions to expose the
single value for approximation
2019-05-22 14:35:17 -07:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Seth Hillbrand 490c805319 Allow squared inflation and inflate Eagle Zones
Sometimes we want to inflate a polygon without adding rounded edges.
This add the option using the jtMiter setting.

This is used in the Eagle parser to expand the Eagle zones for KiCad.
Eagle Zones are drawn on the polygon edge, so they extend out from the
outline.  KiCad zones are drawn inside the polygon.  We need to both
increase the zone size and decrease the minimum pen width to account for
this.

Fixes: lp:1817312
* https://bugs.launchpad.net/kicad/+bug/1817312
2019-05-21 13:49:18 -07:00
jean-pierre charras aee1fe45f4 Fix a few issues related to Bitmaps in menus.
- fix missing icons.
- remove duplicate (and incorrect) code to set these icons in wxMenuItems
2019-05-21 17:50:05 +02:00
jean-pierre charras 62a5302bc4 Fix issues created by commit cbb0d74bd5.
This commit redirected too many menuitem IDs to the tool manager.
Only some context menu items have to be redirected, not all inside ACTION_EVENT events.

This hack is not perfect. It needs a better handling of ACTION_EVENT handling.
2019-05-21 12:48:37 +02:00
Jeff Young f21faceb74 A hack to work around wxWidgets failure to capture WX_MENU_OPEN events
See the comments.  It's not pretty, but it works.

Fixes: lp:1829640
* https://bugs.launchpad.net/kicad/+bug/1829640

Fixes: lp:1829307
* https://bugs.launchpad.net/kicad/+bug/1829307

Fixes: lp:1594029
* https://bugs.launchpad.net/kicad/+bug/1594029
2019-05-19 22:04:28 +01:00
Jeff Young 7d9a0b06e0 Push help menu down into EDA_BASE_FRAME. 2019-05-18 13:14:08 +01:00
Jeff Young b90b454ada Remove legacy block operations. 2019-05-18 00:21:49 +01:00
Jeff Young 13aa503614 Hack for wxWidgets failure to open menu on MSW. 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 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 fbb807f3bb Move some more menu & toolbar items to modern toolset. 2019-05-16 19:57:06 +01:00
Seth Hillbrand ddc6079ceb Move remaining hard-coded segment counts
This removes the remaining hard-coded segments counts and replaces them
with the relative error calculation where the segments per arc is
determined by the maximum error we allow (smaller arcs = fewer segments)
2019-05-16 08:49:55 -07:00
John Beard 0eb8f92c69 Pcbnew: add a step field to the array tool
This is useful, for example, when arraying only one side
of a connector.

Fixes: lp:1809580
* https://bugs.launchpad.net/kicad/+bug/1809580
2019-05-16 11:20:52 +01:00
John Beard 2c1b970027 Arrays: isolate axis code in a new class
Remove the axis numbering code from ARRAY_OPTIONS
and place in a new class, ARRAY_AXIS. This keeps
the logic for the array item numbering separate from
the logic for the array item geometry.

This simplifies the logic in the ARRAY_OPTIONS class, which
no longer has to deal with the numbering of each axis.
2019-05-16 11:20:52 +01:00
jean-pierre charras dfc3a11185 eda_base_frame.h: move a misplaced #include 2019-05-16 08:28:33 +02:00
Wayne Stambaugh f08d040c02 A better fix for commit d34433a1.
Replace INCREMENTAL_TEXT_CTRL with wxSpinCtrlDouble because it looks
and works better.

Remove INCREMENTAL_TEXT_CTRL header and source files because the only
place they were used was in GAL_OPTIONS_PANEL.
2019-05-15 18:18:01 -04:00
Seth Hillbrand 44e111b37e pcbnew: Add remaining Eagle pad types
This adds octagon and offset pad types to the Eagle pcb importer.

Fixes: lp:1814498
* https://bugs.launchpad.net/kicad/+bug/1814498
2019-05-15 11:12:16 -07: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 f9e4ee1fc9 CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.) 2019-05-15 17:50:52 +01:00
Jeff Young e850592587 Cleanup. 2019-05-15 17:50:52 +01:00
Jeff Young 053c26c96e Refresh shown_text cache when incrementing label name.
Fixes: lp:1828874
* https://bugs.launchpad.net/kicad/+bug/1828874
2019-05-15 17:50:52 +01:00
John Beard 6cf7ad68ad Pcbnew: break out preview draw helpers
The graphical drawing routines in the arc assistant can be
made more generic for re-use in similar code.
2019-05-14 13:29:45 +01:00
Jeff Young ef5c69167a Start moving some LibEdit and SchEdit menubar menus to actions.
Also includes a bunch of bug fixes that got intermingled.

Fixes: lp:1828826
* https://bugs.launchpad.net/kicad/+bug/1828826

Fixes: lp:1828826
* https://bugs.launchpad.net/kicad/+bug/1828826

Fixes: lp:1828793
* https://bugs.launchpad.net/kicad/+bug/1828793
2019-05-13 21:44:29 +01:00
Wayne Stambaugh 3c4f8c1bf7 Fix frame name capitalization in all about dialogs.
This is a stop gap fix.  It should be possible to use the wxFrame title
string for this but some of the frame windows have appropriated the title
string for configuration file naming purposes which is less than ideal.

Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1825977
2019-05-13 15:40:44 -04:00
Seth Hillbrand f37ee5c2b3 Remove unused LRU cache 2019-05-13 09:18:26 -07:00
John Beard 18593d2dbb 3D viewer: decouple renderers from wxCursors
Provide a toolkit-agnostic interface for "busy indicators", which
allows the 3D viewer to show a busy cursor, without the canvases
having to to know how a wxCursore works.

The motivation here is to decouple the 3D renderers from the WX
GUI system, as they can then be used when when there is not an
active window (e.g. for offscreen rendering).

Otherwise, attempting to use a wxBusyCursor without a GUI
available is an instant segfault.
2019-05-12 14:19:39 +01:00
Jeff Young 7995b5cc3c Restore selection on abort and undo/redo.
Also includes a related bug fix to not create an undo record for
the initial schematic cleanup.

Fixes: lp:1825975
* https://bugs.launchpad.net/kicad/+bug/1825975
2019-05-11 15:38:49 +01:00
Jeff Young f8776f72ac Drop cell editor when selecting column.
Fixes: lp:1828222
* https://bugs.launchpad.net/kicad/+bug/1828222
2019-05-11 15:38:49 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Wayne Stambaugh ae54f34392 Eeschema: fix corrupted schematic and symbol library files.
Prevent user from pasting text with carriage return and/or line feed
characters in field value edit control in the schematic symbol and symbol
library properties dialogs.

Make all objects derived from GRID_CELL_TEXT_BUTTON use validators
correctly.

Add validators to FIELDS_GRID_TABLE object for field values other than
the mandatory fields.

Create a validator to check that a string is a valid LIB_ID.

Fixes lp:1828214

https://bugs.launchpad.net/kicad/+bug/1828214
2019-05-10 08:21:37 -04:00
jean-pierre charras a155289f70 Custom pads: fix incorrect shape of masks when the shape is a polygon with holes and the mask margin is < 0.
This is mainly the solder paste layer that shows this issue.
This is due to the fact SHAPE_POLY_SET::Inflate does not work fine with polygons with linked holes.
SHAPE_POLY_SET::InflateWithLinkedHoles it added to fix this issue.

Fixes: lp:1828287
https://bugs.launchpad.net/kicad/+bug/1828287
2019-05-09 16:23:18 +02:00
Seth Hillbrand f7c042a357 pcbnew: Allow curves in custom pads
Updates custom pad functions to permit adding arbitrary curves to the
primitives
2019-05-08 15:54:26 -07:00
jean-pierre charras 533fdcf00a Cairo GAL: fix incorrect arc position in mirror mode.
the previous fix (2e43c6c64e) did not really work.
Add also comments to a few not yet documented methods.

Fixes: lp:1822772
https://bugs.launchpad.net/kicad/+bug/1822772
2019-05-08 14:24:26 +02:00
Jeff Young cd2bd23c37 Fix a bunch of issues with hotkeys, IDs and event processing.
Fixes: lp:1827894
* https://bugs.launchpad.net/kicad/+bug/1827894
2019-05-06 21:42:00 +01:00
Jeff Young 207900e4f9 Move libedit message panel updating to the Inspection Tool. 2019-05-06 15:31:23 +01:00
Jeff Young f87d371b8b Move to shared COLLECTORS for sch and lib. 2019-05-06 15:31:23 +01:00
Jeff Young cc439f9ab0 Replace accidentally deleted mouse processing for LibEdit. 2019-05-06 03:30:51 +01:00
Jeff Young fd546da640 Homogenize hit testing and selection return types.
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
Jeff Young 32765ebffd Do some refactoring in prep for sharing some sch tools with libedit. 2019-05-05 17:14:30 +01:00