Commit Graph

218 Commits

Author SHA1 Message Date
Jeff Young 9b36489270 Make sure that libraries are always sorted consistently.
Fixes #1847481 | https://gitlab.com/kicad/code/kicad/issues/1847481
2019-12-02 21:52:50 +00:00
Jeff Young d4816d843d Check /all/ libraries when toggling the Save All toolbar button. 2019-12-02 20:48:22 +00:00
Jeff Young 102b530162 Fix library tree updating bug present at least on OSX. 2019-11-29 17:55:01 +00:00
Ian McInerney 10ccc6da2a libedit: Disable editing toolbar items when no part is loaded 2019-11-24 12:24:49 +00:00
Seth Hillbrand 7dd9304d24 Fix null-dereference in libedit
Clearing the CurPart sets to null.  Need to keep datasheet checks behind
guards
2019-09-30 16:53:51 -07:00
Jeff Young 2553dd2942 Bail on our custom dockart provider.
It appears that it was causing some crashes, and it was never clear
that it looked better anyway.
2019-09-06 23:38:20 +01:00
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
Jeff Young 80dd3f8635 Draw datasheet field with the value from the dfm file.
Fixes: lp:1841369
* https://bugs.launchpad.net/kicad/+bug/1841369
2019-08-25 21:51:00 +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
Jeff Young f8f5ffd560 Update all aliases of current node after Symbol Properties dialog.
Fixes: lp:1840466
* https://bugs.launchpad.net/kicad/+bug/1840466
2019-08-19 14:25:15 +01:00
Jeff Young 206b40621e Fix bugs in Eeschema paste.
1) don't ASSERT; use exceptions (which can be caught) instead.
2) clean up LIB_LOGGER so it's only used during sync
3) fix typos in wxLogMessage() calls so they produce output.
4) throw on unrecognized token in loadContent().
5) if clipboard can't be pasted as content then paste as text.

Fixes: lp:1840172
* https://bugs.launchpad.net/kicad/+bug/1840172
2019-08-15 10:00:23 +01:00
Jeff Young b4c8657904 Fix non-visible-part or conversion items from getting selected.
Also renames lib_draw_item to lib_item to match the class.

Fixes: lp:1840170
* https://bugs.launchpad.net/kicad/+bug/1840170
2019-08-15 10:00:23 +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
Michael Kavanagh 79b2ff7551 Refactor deleteTool ACTION removing duplicates 2019-08-12 13:49:55 -04:00
Michael Kavanagh db59c7011b Unify menubar delete action 2019-08-12 13:49:55 -04:00
jean-pierre charras 7bfbcef942 Make some strings more easily translatable
DIALOG_BOARD_STATISTICS: fix some minor issues.
2019-08-03 09:32:10 +02:00
Jeff Young f756af788e Fix missing CTRL+W in libEdit and modEdit.
Fixes: lp:1835454
* https://bugs.launchpad.net/kicad/+bug/1835454
2019-08-02 15:56:29 -06:00
Jeff Young 815602d1af Fix missing AF_ACTIVATE flags on some tools.
Fixes: lp:1813659
* https://bugs.launchpad.net/kicad/+bug/1813659
2019-07-26 12:21:24 -06: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
Jeff Young fcff0dd228 Cleanup. 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
jean-pierre charras 9259f3a7c9 LIB_LOGGER: fix a crash when closing Kicad, if Libedit was run.
wxLog::SetActiveTarget() was initialised to libedit frame,
but the active target was not released after closing and deleting libedit, thus creating a crash on Kicad exit.
2019-07-14 18:46:58 +02:00
Jeff Young 5c43924338 Display all "File couldn't be found" messages at the end.
Fixes: lp:1810161
* https://bugs.launchpad.net/kicad/+bug/1810161
2019-07-10 23:17:50 +01:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00
jean-pierre charras 21d9a3d4bd Eeschema, lib editor: fix a message error when loading a symbol from the schematic editor.
Replace also in lib_manager.cpp some DisplayErrorMessage calls by wxLogMessage calls,
to avoid hanging or crashes, at least on Windows.
wxLogMessage also has the advantage of grouping all messages and displaying them during a idle time.
2019-07-02 18:39:01 +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
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
Jeff Young 7cfe19d9fd Cleanup. 2019-06-17 22:15:20 +01: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
Jeff Young de67f3f1e9 Move a few more things to ACTIONs. 2019-06-16 19:53:30 +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
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
Jeff Young ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +01:00
Wayne Stambaugh 028973d182 LibEdit: fix library tree refresh issue when library is removed.
A bug in LIB_MANAGER::LibraryExists() prevented a library removed from
the symbol library table from being removed from the tree view.  Add the
proper check to SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().

This exposed another issue with synchronization between the library
table editor and the tree view which could lead to orphaned library
modifications and/or a segfault when the currently selected library was
removed from the symbol library table.  Give the user a chance to save
or revert any changes before allowing changes to the symbol library
table.

Fixes lp:1821691

https://bugs.launchpad.net/kicad/+bug/1821691
2019-06-13 07:45:03 -04: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 5e49517781 Move hotkeys to ACTION architecture. 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
Jeff Young 469fc3b572 Finish moving symbol editor tree context menu to ACTIONs. 2019-06-05 23:29:59 +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
Jeff Young 1ea5b04e22 More ACTIONS work. Nearly done now. 2019-06-04 22:31:42 +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 e517199794 Move ConfigurePaths and LibTable management to common ACTIONs. 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
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
Jeff Young 6c93cccb70 Implement enable/disable of LibEdit save icon.
Fixes: lp:1831314
* https://bugs.launchpad.net/kicad/+bug/1831314
2019-06-01 23:24:17 +01:00
Jeff Young 7f1ed30ff5 Move DeMorgan handling to ACTIONs. 2019-06-01 23:03:24 +01:00
Jeff Young 39b91c90dd Moved more operations to ACTIONs. 2019-06-01 23:03:24 +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 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
Jeff Young 1e9da7f57b Remove CurItem() architecture and legacy routers and drawing code. 2019-05-29 00:26:30 +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
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 927d2a645c Move LibEdit Save operations to ACTIONS. 2019-05-27 11:58:55 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
jean-pierre charras f18807ea0f Eeschema: Ensure axis are always drawn in libedit and viewlib
Fixes: lp:1822408
https://bugs.launchpad.net/kicad/+bug/1822408
2019-05-22 10:04:34 +02:00
Jeff Young 7d9a0b06e0 Push help menu down into EDA_BASE_FRAME. 2019-05-18 13:14:08 +01:00
Jeff Young 38cdafd407 Remove vestiges of legacy BLOCK architecture from eeschema. 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 e850592587 Cleanup. 2019-05-15 17:50:52 +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
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 5c39521149 Move Symbol Properties and Pin Table to actions.
Fixes: lp:1804273
* https://bugs.launchpad.net/kicad/+bug/1804273
2019-05-11 15:38:49 +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 9cc3d6764f fixup! Fix some legacy set-to-idle statements. 2019-05-10 23:25:54 +01:00
Jeff Young 5e08be7018 Fix some legacy set-to-idle statements. 2019-05-10 23:24:02 +01:00
Jeff Young 792c4328aa Cleanup. 2019-05-10 21:40:08 +01:00
Jeff Young 0c2ba94b16 More sharing between SchEdit and LibEdit. 2019-05-10 20:22:26 +01:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Jeff Young 40f41133b3 Move Circle, Arc, Rectangle and PolyLine tools to modern toolset. 2019-05-10 16:11:57 +01:00
Jeff Young 469231ae15 Move Pin, Symbol Text and Symbol Anchor to modern toolset. 2019-05-07 20:39:46 +01: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 a12d769074 Code clarification and commenting.
Also renames toolbar files to reduce confusion with the modern toolset
tool files.
2019-05-06 15:31:23 +01:00
Jeff Young 8e75824d29 Use selection tool for locateItem. 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 32765ebffd Do some refactoring in prep for sharing some sch tools 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 58ba573038 Handle cascading selections in placement.
See https://forum.kicad.info/t/call-for-testers-eemodern/16663/32
2019-05-05 17:14:29 +01:00
Michael Kavanagh 2a09664ebc Clean up import and export menus
Fixes: lp:1822907
* https://bugs.launchpad.net/kicad/+bug/1822907
2019-05-02 12:25:59 -04: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
jean-pierre charras 6e8dd598c0 Minor fixes in translatable strings. Fix also a minor compil warning. 2019-04-22 09:34:28 +02:00
Jeff Young 2bcf38d2b6 Add try/catch block around writing a new library.
Fixes: lp:1825203
* https://bugs.launchpad.net/kicad/+bug/1825203
2019-04-18 22:00:32 +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 c88fd514a0 Implement drawing tools in modern toolset.
Fixes: lp:1825192
* https://bugs.launchpad.net/kicad/+bug/1825192
2019-04-17 21:49:50 +01:00
Jeff Young ecfa05e2ca Allow adding symbols/footprints from editors and browsers.
This was always possible from modal browsers and from the footprint
editor, but it's now also possible from non-modal browsers and the
symbol editor.

Fixes: lp:920380
* https://bugs.launchpad.net/kicad/+bug/920380
2019-04-16 16:20:51 +01:00
Jeff Young 94a948fdd1 Move grid selection for both Eeschema and Pcbnew to COMMON_TOOLS. 2019-04-13 18:43:35 +01:00
Jeff Young 3c11b89e4c Hook up refresh buttons to library tree synchronisation.
Fixes: lp:1820057
* https://bugs.launchpad.net/kicad/+bug/1820057
2019-04-11 19:45:10 +01:00