Commit Graph

94 Commits

Author SHA1 Message Date
Jeff Young c48f4272f3 Collapse a level out of the zoom settings.
The APP_SETTINGS_BASE now holds the list of zoom factors, and
the old legacy (screen-based) code has been removed.
2020-06-13 22:44:16 +01:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Jon Evans 28a4813c71 Force footprint viewers to have a cursor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4528
2020-05-24 16:10:37 -04:00
Ian McInerney 4ecf99e7c8 Give the footprint viewer a toolbar and remove the options dialog
CHANGED: Cvpcb fpviewer and the pcbnew fpviewer no longer have an options dialog
ADDED: Add a side toolbar to the pcbnew footprint viewer (and the measure tool)

This also cleans up some of the settings structs in the viewers, since
it was somewhat confusing before.

Fixes https://gitlab.com/kicad/code/kicad/issues/2205
2020-05-24 11:58:33 +01:00
Ian McInerney 6692935808 Consolidate common viewer actions across cvpcb and pcbnew frames
* Consolidate the measure tool into one tool (this gives cvpcb
  unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
2020-05-24 11:58:33 +01:00
Jeff Young 05855a5a1c Performance enhancements for DRC. 2020-05-18 13:38:17 +01:00
Jon Evans f2e003147e ADDED: Enable color themes for PcbNew printing 2020-05-16 13:19:43 -04:00
jean-pierre charras 07c4689fb4 Remove declaration "using std::unique_ptr" in a header.
Near useless, and it created swig warning
2020-05-09 08:10:44 +02:00
Jon Evans 9916f24fab Split out footprint editor color settings
Migrate COLOR_SETTINGS 0->1 to remove fpedit section
Migrate FOOTPRINT_EDITOR_SETTINGS 0->1 to use new theme if created
Remove COLOR_CONTEXT that is no longer needed
2020-05-05 21:46:00 -04:00
jean-pierre charras 05afbcc22e library viewers: fix a focus issue that prevent using arrow keys in lib or fp lists.
Once the gal canvas hsad the focus, it was not possible to use arrow keys in library
or symbols or fp lists even after clicking on an item.

This focus issue is now fixed.

Fixes #4292
https://gitlab.com/kicad/code/kicad/issues/4292
2020-05-03 20:11:33 +02:00
Ian McInerney d006acecf4 More window sizing fixes
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
  so that we can then save it in the config if the
  window is maximized. Otherwise the config ends up
  with the maximized size saved, and weird behavior
  occurs when unmaximizing on the next opening.
2020-04-27 00:14:12 +01:00
Ian McInerney 0dac0c9a47 Cleanup some dynamic casts
From Coverity scan
2020-04-04 12:41:45 +01:00
jean-pierre charras 6e47f147aa A few Coverity fixes. 2020-03-30 09:50:26 +02:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Ian McInerney b1240b5b1e Gracefully shutdown tools when frames are closed
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Wayne Stambaugh bf8bb17f42 Fix missing symbol and footprint viewer about dialog names. 2019-11-11 08:25:58 -05:00
jean-pierre charras c4023637df FIX: footprint viewer: avoid display a empty footprint list when a library is selected.
When invoking the viewer the fp list was sometime blank until a new lib is selected.

Fixes: lp:1851799
https://bugs.launchpad.net/kicad/+bug/1851799
2019-11-08 17:41:39 +01:00
Seth Hillbrand 6625d0721e Implement Get/Set display options
The pointer passing for display options is deprecated.  This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.

In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
2019-11-07 08:26:44 -08:00
Seth Hillbrand 39241dc0ff Footprint browser: Handle frame calls
The frame() call requires an edit frame but the browser is derived from
PCB_BASE_FRAME.

Fixes: lp:1849962
* https://bugs.launchpad.net/kicad/+bug/1849962
2019-10-26 08:27:27 -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 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00
jean-pierre charras 5cf21789e9 FOOTPRINT_VIEWER_FRAME: minor fix: initialize m_canvasType to the value actually used. 2019-09-05 19:53:47 +02:00
Seth Hillbrand 69b6052d6f fpviewer: Second go at preventing focus stealing
Fixes: lp:1841565
* https://bugs.launchpad.net/kicad/+bug/1841565
2019-08-30 09:10:45 -07:00
Jeff Young 2fba0a4f61 Register COMMON_CONTROL for help menu actions.
Fixes: lp:1841560
* https://bugs.launchpad.net/kicad/+bug/1841560
2019-08-27 19:23:07 +01:00
Jeff Young 559035a7f6 Make sure the menu bar gets activated (ie: don't eat the activate event).
Fixes: lp:1841560
* https://bugs.launchpad.net/kicad/+bug/1841560
2019-08-27 19:23:07 +01:00
Seth Hillbrand ff118c62ec Cleanup OnCharHook in footprint_viewer_frame
This provides a better fix for d0adaf1ef and handles Tab/Shift-Tab
consistently in the filters
2019-08-27 08:42:43 -07:00
Seth Hillbrand d0adaf1efd pcbnew: Update focus in browser
When we refresh a scrolled window to get the GTK scrollbars updated, we
can capture the mouse, making key-only scrolling difficult when we want
the window not focused.  This resets the active focus after refresh.

Fixes: lp:1841565
* https://bugs.launchpad.net/kicad/+bug/1841565
2019-08-27 08:30:08 -07: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 e65569e3b2 Clean up some issues in Footprint Viewer. 2019-08-19 00:06:22 +01:00
jean-pierre charras 8f583008e0 Fix minor compil warnings 2019-08-18 09:13:55 +02:00
Jeff Young 3fefe01d2e Improve keyboard-only use of Footprint Viewer.
Fixes: lp:1465295
* https://bugs.launchpad.net/kicad/+bug/1465295
2019-08-17 12:23:19 +01:00
Jeff Young a0eaff289a Add filters to footprint viewer.
This also allows us to remove button to access the tree dialog
since the only extra it provided was filtering.

Fixes: lp:1465295
* https://bugs.launchpad.net/kicad/+bug/1465295
2019-08-14 21:51:26 +01:00
Jeff Young 8efe8d1835 Set library selection when pre-loading the Footprint Viewer.
Fixes: lp:1826932
* https://bugs.launchpad.net/kicad/+bug/1826932
2019-06-27 00:40:36 +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
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
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
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 6ac273264d Move Show3DViewer to common action. 2019-06-02 16:21:44 +01:00
Seth Hillbrand d1877d7c1b Moving modules from DLIST to std::deque 2019-06-01 09:53:23 -07: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