Commit Graph

4439 Commits

Author SHA1 Message Date
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 5d7739a662 Handle '&'s in menu labels.
Fixes: lp:1832904
* https://bugs.launchpad.net/kicad/+bug/1832904
2019-06-17 10:45:23 +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 b2ee2a4d88 Add checking to languages menu.
This also required having KICAD_MANAGER_CONTROL handle UpdateMenu
since there's no seletion tool for the Kicad Manager frame.
2019-06-16 20:26:43 +01:00
Jeff Young 909aeba3d9 Transition some more stuff from the MVC view to the controller. 2019-06-16 19:53:30 +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
Seth Hillbrand 552815d486 tool_mgr: Don't invalidate our own iterators
Re-arranging the stack will invalidate the iterator that is removed and
inserted (begin()).  Because this is not a threaded operation, we can
only do it to ourselves, so check that the operation isn't a NOP before
performing.

Fixes: lp:1832930
* https://bugs.launchpad.net/kicad/+bug/1832930
2019-06-15 17:49:15 -07:00
Jeff Young 18ebced8f4 Code hygiene. 2019-06-15 20:43:52 +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
jean-pierre charras 96935e0a7e Pl_editor rework: refinements in Design inspector. 2019-06-15 09:58:23 +02:00
jean-pierre charras f550ecaf1f Better tooltip and fix a typo. 2019-06-14 20:50:46 +02: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 dc56678289 Make DXF monochrome output only contain Black layer
Fixes: lp:1832359
* https://bugs.launchpad.net/kicad/+bug/1832359
2019-06-13 15:18:30 -07: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 f0cd7a5fd9 Clean up duplicted Find action processing. 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
Seth Hillbrand 8112a8ade1 cmake: Further petting dependencies
eeschema cpp files consume generated header files that have targets in
the common directory, so no dependencies get created from eeschema.  We
add the dependencies in common to force the setting through libraries.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-13 06:51:52 -07:00
jean-pierre charras 19de0ae55d remove a printf used for debug. 2019-06-13 14:07:34 +02: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 b9eb627bc3 Remove a trace used for debug. 2019-06-13 13:35:28 +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 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 36f09cb29b Allow Kicad Manager frame to particapate in Preferences architecture. 2019-06-12 13:44:16 +01: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 2d29f76c49 Fix incorrect control-key map for hotkeys.
Fixes: lp:1832431
* https://bugs.launchpad.net/kicad/+bug/1832431
2019-06-12 10:08:23 +01:00
Seth Hillbrand 06d2170501 Fix default User Template location
When we assign a string to the wxFilename, it takes the last section as
the filename (unless there is a trailing '/').  So on Linux, we got
/home/user for the Documents dir and /home/ was the directory while
'user' was the filename.  Appending directories 'kicad/templates' made
the final directory '/home/kicad/templates'.  Forcing this to be a
directory restores correct behavior.

(cherry picked from commit 0ee38653f7)
2019-06-11 17:11:27 -07:00
Jeff Young 7726b039b2 Re-jigger standard submenus so they both link AND work. 2019-06-11 18:03:16 +01:00
John Beard 9625cea57f Fix hotkey debug spew
Two issues:

* Unassigned hotkeys were being passed to WX in the menu strings as
  "<unassigned>". WX doesn't recognise this, and prints debug each time.
  Unassigned hotkeys are no longer rare or naughty, so we shouldn't provoke
  debug spew. Suppress by not appending hotkey strings for actions with 0
  (i.e. unassigned) hotkey IDs.
* The zone cutout tool uses GR_KB_SHIFT, not MD_SHIFT. This causes
  "unknown hotkey" spew from WX.
2019-06-11 14:40:57 +01:00
Jeff Young b9e07f2a70 Attempt to fix un-resolved sub-menus.
While I'm pretty sure this will work, the issues don't appear on OSX
so I can't be positive.

Fixes: lp:1832049
* https://bugs.launchpad.net/kicad/+bug/1832049
2019-06-11 10:04:21 +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 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