Commit Graph

149 Commits

Author SHA1 Message Date
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 718ad77891 Fix a bug introduced when UseGalCanvas() no longer switches.
We still need to setup the viewport the first time.
Also removes some more legacy editing code.
2019-05-27 18:47:20 +01:00
Jeff Young 9d9745b555 Remove more legacy editing code. 2019-05-27 18:47:20 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
Jeff Young 7d9a0b06e0 Push help menu down into EDA_BASE_FRAME. 2019-05-18 13:14:08 +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
jean-pierre charras 51bfec8ef9 Footprint viewer: fix a crash when clicking the "Insert footprint in board" tool when no footprint selected 2019-05-12 17:07:23 +02: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
John Beard ab2281d26f GAL opts: move config reading into GAL_DISPLAY_OPTIONS
Move repeated GAL config reading routines into GAL_DISPLAY_OPTIONS.
THe app-level config is in here already, do the same for the
common config.

This means that the configs are loaded consistently, which fixes
the symbol-chooser preview window, which previously didn't use the
same config routine as other GAL canvases.

Future work could move these functions to free functions that
act on the public interface of GAL_DISPLAY_OPTIONS to avoid
GAL_DISPLAY_OPTIONS having to know about wxConfig and wxWindow.

Fixes: lp:1824524
* https://bugs.launchpad.net/kicad/+bug/1824524
2019-04-12 16:08:11 +01:00
Michael Kavanagh a611269975 Read Footprint Library Browser grid settings from Footprint Editor.
Implements commit 3a0dbf48c8 for Footprint Library Browser/Editor.

Fixes: lp:1822401
https://bugs.launchpad.net/kicad/+bug/1822401
2019-03-31 07:00:45 -07:00
Jeff Young b6a06aa129 Improve default canvas handling.
Fixes: lp:1813973
* https://bugs.launchpad.net/kicad/+bug/1813973
2019-01-31 19:43:31 +00:00
Jeff Young ca0164aa07 Unify library browser terminology.
Fixes: lp:1813882
* https://bugs.launchpad.net/kicad/+bug/1813882
2019-01-30 19:52:15 +00:00
Jeff Young b3319d29c1 Init footprint chooser with current footprint.
Fixes: lp:1813882
* https://bugs.launchpad.net/kicad/+bug/1813882
2019-01-30 15:45:29 +00:00
Seth Hillbrand 9d99fd188f Revert "Change top selection drop-down to combobox"
This reverts commit 7d06651a10.
2019-01-28 10:15:32 -08:00
Seth Hillbrand 7d06651a10 Change top selection drop-down to combobox
wxChoice centers the selection on GTK.  So when switching from a
mid-list item to an item at the top, the list is always cut off for
choice lists located on the top toolbar.  Using a combobox provides a
drop-down that allows easier access to all elements in the box.

Fixes: lp:1808569
* https://bugs.launchpad.net/kicad/+bug/1808569
2019-01-03 14:48:28 -08:00
Jeff Young b08766a2fa Scroll Footprint Viewer to selected item when opening. 2018-10-03 22:46:41 +01:00
Jeff Young cbb3492d98 Standardize Footprint Viewer and Footprint Browser.
Add Display Settings to Footprint Browser.
Make each of them OpenGL on OSX and Cairo on other platforms.
Allow auto-zoom to be turned off and save last zoom setting.
Make ordering of tools in htoolbar consistent.
Standardize grid and zoom drop-downs.

Fixes: lp:1791667
* https://bugs.launchpad.net/kicad/+bug/1791667
2018-09-12 14:01:35 +01:00
Seth Hillbrand 0ac96d177c pcbnew: set default soldermask clearance for footprint viewer
The default board soldermask clearance should not be used in the
footprint viewer.  Setting the board's solder mask margin to 0 will
leave the footprint displayed with only the soldermask defined by
the pads or the footprint.

Thanks to Fabian Inostroza for pointing out the missing line.

Fixes: lp:1779979
* https://bugs.launchpad.net/kicad/+bug/1779979
2018-08-28 10:04:04 -07:00
Jeff Young acec00f80a Fix bug displaying canvasses when starting in Legacy mode. 2018-08-11 23:43:19 +01:00
Jeff Young d81faa72c9 Overhaul border drawing in all the Kicad frames.
Primary change is to replace most control/window borders with
AUI pane borders.  We implement our own AUI border drawing
routine which avoids the ugly one-pixel white frames around
dark canvasses.

Also increases the signal-to-noise ratio of all the pane
creation code in the various frames.
2018-08-11 17:25:38 +01:00
Jeff Young 33fc74a04d Performance enhancements for Footprint Editor construction. 2018-08-04 10:29:17 +01:00
Jeff Young 92b3aca0ef Fix crash when trying to view invalid footprint link.
Fixes: lp:1785218
* https://bugs.launchpad.net/kicad/+bug/1785218
2018-08-04 10:29:17 +01:00
Jeff Young 9322139baa Touch up Footprint Viewer for new Lib Tree. 2018-08-01 11:47:48 +01:00
Jeff Young b400565880 Convert Place Footprint to component tree. 2018-08-01 09:35:45 +01:00
Jeff Young cb61525394 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
2018-07-26 15:43:53 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young b37969f584 Reset tools before switching footprints.
Fixes: lp:1776777
* https://bugs.launchpad.net/kicad/+bug/1776777
2018-06-14 09:55:29 +01:00
Jeff Young 660aed71b4 Make sure initially loaded footprint is rendered.
Also sets the initial footprint to the current footprint when
doing a Choose Footprint from the Eeschema Edit Property
dialog.

Fixes: lp:1776126
* https://bugs.launchpad.net/kicad/+bug/1776126
2018-06-12 13:41:53 +01:00
Jeff Young de7791cc8b Add context menu to footprint viewer for zoom & grid.
Fixes: lp:1776126
* https://bugs.launchpad.net/kicad/+bug/1776126
2018-06-11 11:37:48 +01:00
Seth Hillbrand d62b4f36a6 Save hotkeys to combined app-based file
Unifies the different sections of hotkeys so that we are not storing two
[eeschema] or [pcbnew] sections in two different files.

Previous hotkey definitions are loaded at start if they exist but are
overwritten by the new format, if it exists.  Changes to hotkeys save
only in the combined format.

Hotkey editor for each application only shows the hotkeys relevant to
that application.

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

Fixes: lp:1668799
* https://bugs.launchpad.net/kicad/+bug/1668799
2018-05-18 12:57:38 -07:00
jean-pierre charras 6e5131be5a Minor fix in fp editor and fp viewer: display the fp info instead of the useless board info.
board info makes sense only in board editor, not in fp editor and fp viewer.
2018-05-12 10:44:31 +02:00
jean-pierre charras e339007d22 3D viewer: fix some issues when opened from a frame and changes are made in a other frame:
* Refresh the view only when changes are made in the caller frame.
* Allows recreate a new instances when try to open the 3D view from a frame taht is not the initial caller
* Remove duplicate code in kicad frames.
2018-05-10 12:49:20 +02:00
Jeff Young d391489596 Don't clear old footprint till after user has hit OK.
Fixes: lp:1759190
* https://bugs.launchpad.net/kicad/+bug/1759190
2018-04-02 22:32:09 +01:00
Jeff Young f4ce8766e3 Implement shared FOOTPRINT_LIST.
While we already cache the loaded footprint files, parsing said files
into the list is also time-intensive.  Since the FOOTPRINT_LIST is
already hash-stamped against the current timestamps of the files that
make up the list, sharing a single copy of the list is quite
straight-forward.
2018-03-25 19:21:28 +01:00
Jeff Young d2d0660647 Open viewer even when FPID is invalid.
Just show an empty viewer.
2018-03-23 12:46:17 +00:00
Maciej Suminski 62fd734007 Footprint Viewer: do not try to preselect an empty footprint
Empty string is treated as an invalid LIB_ID, so it ends up with an
exception.
2018-03-22 11:38:10 +01:00
Jeff Young 79fe134495 Init Footprint Viewer with current FPID.
Fixes: lp:1757421
* https://bugs.launchpad.net/kicad/+bug/1757421
2018-03-21 23:11:55 +00:00
Jeff Young 8904b2e046 Peg 3D viewer in front of Footprint Viewer and Wizard.
Fixes: lp:1754741
* https://bugs.launchpad.net/kicad/+bug/1754741
2018-03-14 19:17:09 +00:00
Jeff Young 4eedb3a27d The _() macro affords some nullptr safety over a naked immediate.
Fixes: lp:1477448
* https://bugs.launchpad.net/kicad/+bug/1477448
2018-03-12 19:18:05 +00:00
Jeff Young c27ee1ece3 Fix disappearing origin lines in modedit (and modview).
Fixes: lp:1745701
* https://bugs.launchpad.net/kicad/+bug/1745701
2018-02-19 10:01:30 -05:00
Michael 62487fa891 Fix spelling error 2018-02-15 16:46:10 +01:00
Jeff Young 4bae901dc8 Centralize zoom-to-fit code.
Fixes a bunch of errors:
- libedit and libbrowser would zoom to bounding box but centre on canvas
- libedit, libbrowser and gerbview didn’t take the scroll bars into account
- pcbnew didn’t take scroll bars into account or apply the 10% margin
- appending a board file would re-centre, but not re-zoom

Fixes: lp:1504302
* https://bugs.launchpad.net/kicad/+bug/1504302
2018-02-13 20:06:03 -05:00
jean-pierre charras be746a8e3d rename a few files related to the footprint viewer. 2018-01-31 13:37:36 +01:00
Renamed from pcbnew/modview_frame.cpp (Browse further)