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
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
1a7cef2950
Improve performance, commenting and API of some polygon classes.
2019-07-14 10:39:38 +01:00
Jeff Young
2d17d2b91f
Cleanup and commenting.
2019-07-14 10:36:48 +01:00
jean-pierre charras
fc2379ca8a
Fix some issues in .gbrjob file.
...
2 issues are fixed: a missing double quote, and a incorrect handling of unicode chars
Fixes: lp:1836448
https://bugs.launchpad.net/kicad/+bug/1836448
2019-07-14 10:23:45 +02: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
c600b758b3
Fix a few more actions missing from the hotkey list.
...
Fixes: lp:1828673
* https://bugs.launchpad.net/kicad/+bug/1828673
2019-07-06 21:10:16 +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
Seth Hillbrand
7297208119
Handle all non-length units
...
Statusbar length updates need to handle default with wxASSERT if there
is not a specific, handled unit.
2019-06-29 09:46:25 -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
da645c5d16
Don't select items on inactive layers in high-contrast mode.
...
Fixes: lp:1833870
* https://bugs.launchpad.net/kicad/+bug/1833870
2019-06-26 01:13:51 +01: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
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
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
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
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
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
ce1f35a1be
Cleanup some left-over vestiages of the legacy canvas architecture.
2019-06-13 15:51:32 +01:00
Seppe Stas
455ee4c08c
Set KiCad version in MacOS apps
...
Uses CMake's configure_file function [1] to automaticaly set the
CFBundleShortVersionString [2] value in every app's Info.plist file.
Also updates the CFBundleLongVersionString and CFBundleVersion with the
extended KiCad Version
[1]: https://cmake.org/cmake/help/latest/command/configure_file.html
[2]: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
2019-06-12 04:40:03 -07:00
Jeff Young
7726b039b2
Re-jigger standard submenus so they both link AND work.
2019-06-11 18:03:16 +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
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
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
765606012f
Convert separate-compilation of selection.cpp to polymorphism.
2019-06-10 23:46:00 +01:00
John Beard
7ebda0247f
Common: Remove legacy_gal library, fold into common
...
Return the EDA_DRAW_FRAME class back to common, whence it came (before it was
duplicated into legacy_wx and legacy_gal). Now there is only one
implementation (the GAL one), it doesn't need to be in a separate library.
This simplifies the dependencies for common lib users.
2019-06-10 18:56:57 +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
63eb552e0a
Fix issue in cairo_gal when drawing a 360 deg arc (in fact a circle).
...
It was due to a angle normalization between -360 and 360 degrees.
So, in arcs, if the start angle and end angle diff is n*360 deg,
this normalization gives start angle = end angle.
The fix forces end angle = start angle+360deg in this case.
Fixes: lp:1832096
https://bugs.launchpad.net/kicad/+bug/1832096
2019-06-09 11:06:00 +02: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
Jeff Young
1ea001d497
Go back to event-loop zooming for new frames.
...
The immediate mode appears to have made things worse not better.
2019-06-04 13:56:54 +01:00
Jeff Young
1bf04d1722
More ACTIONs work.
2019-06-04 00:51:16 +01: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
9f1e2e34b7
Move some dupicated tools to common tools.
2019-06-03 21:08:30 +01:00
Jeff Young
33773bad4d
Yet more command conversions to ACTIONs.
2019-06-02 21:10:56 +01:00
jean-pierre charras
60d2dc2e90
Fix broken menuitem IDs in gerbview.
...
the broken ids prevent menuitems of some file histories to work.
2019-06-02 20:59:13 +02: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
15e6787596
Gerbview: Add missing file histories to the Files menu.
2019-06-02 09:31:06 +02: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
Jon Evans
d47cac12c3
Fix GerbView zoom-to-fit
2019-05-31 20:59:53 -04:00
Jeff Young
7553cc2651
Clean up some dangling legacy odds and ends.
2019-06-01 01:17:46 +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
eb0fc7bae2
Re-connect switch canvas on startup
2019-05-29 15:29:36 -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
01326d1304
Update GerbView File menu to ACTION_MENU.
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
Jeff Young
39d769937f
Fix gerbview initialization order issue.
2019-05-27 21:44:20 +01:00
Jeff Young
9d9745b555
Remove more legacy editing code.
2019-05-27 18:47:20 +01:00
Jeff Young
e9e28b9aac
Retire legacy block architecture.
2019-05-27 11:58:56 +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
bdd44ce88c
Use consistent PageLayout data structure names.
2019-05-27 11:55:58 +01:00
Jon Evans
6b40473f5d
GerbView: properly load worksheet visibility at startup
...
(cherry picked from commit 5d1dcb4387
)
2019-05-26 13:03:23 -04:00
Jon Evans
549b76739e
Exclude invisible items from view bounding box for zoom-to-fit
...
Fixes: lp:1116457
* https://bugs.launchpad.net/kicad/+bug/1116457
(cherry picked from commit ede2575018
)
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
Jeff Young
323bb0f8e1
Moving PageLayout editor to GAL canvas and modern toolset.
2019-05-24 19:49:09 +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
Jon Evans
ec39bdda77
GerbView: fix saving of canvas type and lingering legacy menu item
...
Fixes: lp:1829647
* https://bugs.launchpad.net/kicad/+bug/1829647
(cherry picked from commit b00e20b23f
)
2019-05-19 16:17:53 -04:00
jean-pierre charras
ab6521ff9e
Gerbview, gerbview_selection_tool.cpp: add missing code to rebuild the view menu.
2019-05-19 12:39:37 +02: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
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
f9e4ee1fc9
CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.)
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
e850592587
Cleanup.
2019-05-15 17:50:52 +01:00
jean-pierre charras
2d99ec779f
Gerbview: Sync issue between the D Code drop list and the active layer
...
Fixes: lp:1829234
https://bugs.launchpad.net/kicad/+bug/1829234
2019-05-15 16:11:04 +02: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
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
ed0e6af66d
Move to direct tool registration.
...
It was confusing that the primary frames registered their tools
differently than the other frames. In addition, since the other
frames also added their own tools, foo_actions::RegisterAllTools()
didn't really register all tool but rather those used by the
principal frame (PCB_EDIT_FRAME, SCH_EDIT_FRAME, etc.)
2019-05-05 17:14:30 +01:00
Jeff Young
b526461a8e
Fix colliding hotkeys issue.
...
All grid commands need to be shared now as they're implemented
by a common tool.
2019-05-05 17:12:59 +01:00
Jeff Young
42383ae871
Build out some of the modern toolkit context menus.
2019-05-05 17:12:59 +01:00
Jeff Young
7632f89157
Rename file to match class.
2019-05-05 17:12:59 +01:00
Jeff Young
1a007c3e4b
Implement SCH_SELECTION_TOOL (but still with legacy semantics).
2019-04-22 22:08:18 +01:00
Jeff Young
a461eae8b9
Fix 100s of usages of GetFlags() which conflated != 0 with being edited.
...
While this was true long ago, many flags have been added since which
have nothing to do with editing (HIGHLIGHTED, BEGIN_ONPAD, etc.)
2019-04-22 09:58:06 +01:00
Jeff Young
0772b54845
Move eeschema zoom-selection to modern toolset.
...
Fixes: lp:1825164
* https://bugs.launchpad.net/kicad/+bug/1825164
2019-04-17 21:49:50 +01:00
Jeff Young
0021ecf51e
Don't double-escape netnames.
...
Netnames in wxChoice or wxListBox are already in internal format
and don't need escaping again.
Fixes: lp:1823863
* https://bugs.launchpad.net/kicad/+bug/1823863
2019-04-12 00:28:58 +01:00
bobo87
ca7aec2d4e
Fix crash in gerbview when legacy disabled
...
Fixes: lp:1822877
* https://bugs.launchpad.net/kicad/+bug/1822877
2019-04-11 14:25:11 -07:00
Jeff Young
b7c12b238f
Increase GervView layers to 51.
...
This also makes its use of LSET consistent with PCBNew.
Fixes: lp:1809019
* https://bugs.launchpad.net/kicad/+bug/1809019
2019-04-10 21:21:00 +01:00
Jeff Young
684bb62fd8
Escape slashes in labels and netnames.
...
Also re-allows spaces, as they can already come in through sheet
names.
Fixes: lp:1798621
* https://bugs.launchpad.net/kicad/+bug/1798621
2019-04-07 00:24:10 +01:00
Michael Kavanagh
b0674b8802
Add Ctrl+, hotkey to preferences dialog
...
Also change interactive router settings from Ctrl+, to Ctrl+Shift+,
2019-04-02 12:57:27 -04:00
Michael Kavanagh
fe6bc411dd
Fix 'hokey' -> 'hotkey' typo
2019-04-02 12:57:26 -04:00
Wayne Stambaugh
f20a1314ff
GerbView: remember last open gerber file dialog wildcard.
...
This is only for the current GerbView session. When GerbView is closed,
the last open gerber file dialog wildcard setting is lost.
2019-04-01 12:46:11 -04:00
Wayne Stambaugh
37edf0e9a6
Remove superfluous build library dependencies.
...
It looks like someone's paste keys got stuck and added repeated sets of
link libraries in multiple places.
2019-03-29 09:01:56 -04:00
jean-pierre charras
e1d3df54eb
Kicad and Gerbview: add .nc and .xnc file ext to files seen as drill files.
...
.nc is an other usual Excellon drill file ext, and .xnc will be soon also in use.
2019-03-27 16:47:13 +01:00
jean-pierre charras
ff73f69d3e
Gerbview: fix crash when reading a .gbrjob, and when a file given by the .gbrjob is not found.
...
A incorrect gerber image was created, creating crash on exit or when enable the layer view.
2019-03-24 17:32:57 +01:00
Seth Hillbrand
f96d16eba3
Restore LINK_MAP linker options
...
Removing invalid TO_LINKER missed a few segments where it was used.
This fixes the ability to enable link maps
2019-03-16 20:37:14 -07:00