Commit Graph

887 Commits

Author SHA1 Message Date
Jeff Young b343391723 Code cleanup for readibility. 2020-01-11 21:30:48 +00:00
Ian McInerney f896043067 Fix comments for switch statement fall throughs
This cleans up all GCC warnings (-Wimplicit-fallthrough=2) about
implicitly falling through switch cases.
2020-01-11 19:16:32 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Ian McInerney 25a302758e Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275
2019-12-26 12:42:25 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Ian McInerney 4f7430f476 Add save item to cvpcb toolbar and make it conditional
ADD: Save icon to cvpcb toolbar and make it conditional
2019-12-19 15:35:11 +00:00
Ian McInerney b9d8849b28 Unify unsaved changes detection logic in all frames
Create an IsContentModified() function in each frame
that provides if the content has been modified, and
use that instead of always copying the checks.
2019-12-19 15:34:01 +00:00
Mark Roszko 686b768a3d Add shutdown blocking on Windows for pcbnew, eeschema and pleditor
ADDED: Block shutdown/logoff on Windows when contents have been modified
2019-12-19 14:11:11 +00:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Ian McInerney e82795ba58 Fix grid settings in pcbnew/modedit/cvpcb
* Make the grid display settings separate from the board object
* Ensure that the grid is initialized on creation in all the frames

Fixes: lp:1843169
* https://bugs.launchpad.net/kicad/+bug/1843169
2019-11-23 23:35:21 +00:00
jean-pierre charras 6f2cbe5982 Pcbnew: housekeeping: move netlist code to netlist_reader sub directory. 2019-11-17 13:58:38 +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
Ian McInerney a1d3f3486e cvpcb: Fix some issues
* ESC no longer closed the window since it didn't properly generate
  the close event
* Copy/Cut from a context menu did not work due to a focus-loss issue
* Add better error handling for the copy/cut/paste actions to prevent
  text that isn't an FPID from being inserted
2019-10-06 17:53:35 +01:00
jean-pierre charras 0a829c328e Python scripting: fix a crash with some pythons scripts calling BOARD::ComputeBoundingBox()
This function calls Pgm(), but when running from a script (not from kicad) Pgm() uses a nullptr reference.
The nullptr reference is now tested in ComputeBoundingBox()
2019-10-05 10:39:33 +02:00
jean-pierre charras 16f4958430 Pcbnew: avoid crash when closing pcbnew if the DRC dialog is open.
Cvpcb: change from commit 9ceca583:
the root class close event that save settings is now seeing the close event.
2019-09-19 09:16:12 +02:00
Ian McInerney 9e555cb422 cvpcb: Run save association action immediately
(this is a complement of commit 9ceca583)
2019-09-18 10:35:37 +02:00
jean-pierre charras 9ceca583b1 Cvpcb: fix minor issues:
- Config not saved
- Confirmation dialog show after clicking on the OK button.

Fixes: lp:1844457
https://bugs.launchpad.net/kicad/+bug/1844457
2019-09-18 09:57:26 +02: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 d4aa502be1 Correct footprint filter tool name and tooltip.
Fixes: lp:1842477
* https://bugs.launchpad.net/kicad/+bug/1842477
2019-09-03 19:42:32 +01:00
Jeff Young 54255cffeb Cleanup to make implementation names consistent with what they now do.
Fixes: lp:1842477
* https://bugs.launchpad.net/kicad/+bug/1842477
2019-09-03 19:29:30 +01:00
Jeff Young e269b5d1b9 Workaround an issue where a throw terminates (even when there's a catch for it).
You can trigger it before this fix by running Cvpcb when a .kicad_mod file is
incorrectly set as "Legacy" in your footprint table.
2019-08-31 15:18:27 +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
Ian McInerney 7bb046c0a5 cvpcb: Auto move to next NA after association
Also perform some cleanup of objects when windows close
2019-08-12 14:19:01 -04:00
Ian McInerney 36b430562d cvpcb: Refactor events and cleanup formatting 2019-08-12 14:19:01 -04:00
Ian McInerney c0204e90b1 cvpcb: Add library location to status information
Fixes: lp:1782805
* https://bugs.launchpad.net/kicad/+bug/1782805
2019-08-12 14:19:01 -04:00
Ian McInerney c3b2885f88 cvpcb: Split control tool in two and add cut/copy/paste 2019-08-12 14:19:01 -04:00
Ian McInerney 95430e131e cvpcb: cleanup include statements 2019-08-12 14:19:01 -04:00
Ian McInerney e022a2e4d1 cvpcb: Clean up compile dependencies 2019-08-12 14:19:01 -04:00
Ian McInerney 9fda86e261 cvpcb: Move file extension to common and deprecate a header 2019-08-12 14:19:01 -04:00
Ian McInerney 796d888f8f cvpcb: Add individual association deleting 2019-08-12 14:19:01 -04:00
Ian McInerney 2d27c10c63 cvpcb: Add processing of hotkeys to the main window
* Add a tool loop to handle ESC to close the window and
focus changing keys
* Make changing focus a tool
2019-08-12 14:19:01 -04:00
Ian McInerney d428d5fecf cvpcb: Move some more tasks to a tool 2019-08-12 14:19:01 -04:00
Ian McInerney 06abda254a cvpcb: Add undo/redo functionality to the associations 2019-08-12 14:19:01 -04:00
Ian McInerney 402031244d cvpcb: Replumb the footprint association system
This is in preparation for implementing more association actions
and an undo/redo system.
2019-08-12 14:19:01 -04:00
Ian McInerney 72120e0a96 Actionize cvpcb 2019-08-12 14:19:01 -04:00
Ian McInerney c0b80c67b9 Rename cvpcb footprint viewer tools
This is in preparation for the actionization of the main cvpcb window.
2019-08-12 14:19:01 -04:00
Jeff Young 77334628c4 Change default tool behaviour to skip unhandled events.
The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation
properly.  wxEVT_CHAR does, but we only get to that if we skip the
event at the end of the tool’s event processing loop, which most tools
don’t do.  (Selection tools, point editors, pickers, and a couple of
others do skip, which is probably why this didn’t get reported earlier.)

I played around with a couple of ways to fix wxEVT_CHAR_HOOK.  Most of
them don’t work, and the few egregious hacks I tried weren't cross-
platform.

So I’m changing it so that most tools now skip at the end of their
event loops.  I left out a couple that I felt were high risk (length
tuning, for instance).  But there’s still enough risk that I’m 100%
sure it will break something, I just haven’t a clue what.

Fixes: lp:1836903
* https://bugs.launchpad.net/kicad/+bug/1836903
2019-07-26 12:21:24 -06: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 2d17d2b91f Cleanup and commenting. 2019-07-14 10:36:48 +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
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 f9702aab87 Immediate actions for PlEditor, PcbNew, etc. 2019-06-25 11:34:28 +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 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
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
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
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 a3f3fb39de Convert 3DViewer to new hotkey architecture. 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 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 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
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
Seth Hillbrand a0ef3f81f4 cvpcb: Clear modules in board
The iterators are not removal safe outside of the class.  We provide a
safety clear function that frees the associated memory.

Fixes: lp:1831465
* https://bugs.launchpad.net/kicad/+bug/1831465
2019-06-03 15:06:02 -07:00
Jeff Young 9f1e2e34b7 Move some dupicated tools to common tools. 2019-06-03 21:08:30 +01:00
Jeff Young e517199794 Move ConfigurePaths and LibTable management to common ACTIONs. 2019-06-03 21:08:30 +01:00
jean-pierre charras cb83f8acdf Cvpcb: fix incorrect size of message panel.
It was due to the fact the frame size was set before the draw canvas panel was created,
thus creating incorrect size of the other panel (the message panel)

Fixes: lp:1831389
https://bugs.launchpad.net/kicad/+bug/1831389
2019-06-03 09:39:48 +02:00
Seth Hillbrand 6ddc2fe02d display_footprints: Use Add() method to push_back modules
Although we can get the reference from Modules(), Add() should be used
for future-proofing
2019-06-02 20:06:11 -07:00
Jeff Young 33773bad4d Yet more command conversions to ACTIONs. 2019-06-02 21:10:56 +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 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
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 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 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 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 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 1a3d0492f5 Push polar coords down into COMMON_TOOLS. 2019-05-18 00:21:49 +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 717b1d37be Defensive coding that will possibly fix a crash when scrolling through footprints.
Fixes: lp:1828289
* https://bugs.launchpad.net/kicad/+bug/1828289
2019-05-10 20:00:23 +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 42383ae871 Build out some of the modern toolkit context menus. 2019-05-05 17:12:59 +01:00
Jeff Young 4020b5689b Refocus control after doing our little raise/raise dance.
Fixes: lp:1821451
* https://bugs.launchpad.net/kicad/+bug/1821451
2019-04-11 19:45:10 +01:00
Jeff Young 77f15eeeaf Support synchronous messaging over KIWAY EXPRESS.
This allows us to make the various netlist and pcb update routines
more atomic and less reliant on carefully sequenced asynchronous
messages.

This is also a prelude to adding support for footprint testing
without a netlist.
2019-04-08 13:26:09 +01: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 ad5369fb1f Cvpcb: cosmetic enhancement in toolbar: add a text. 2019-03-19 18:18:19 +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
Seth Hillbrand 2948f8a6bc cvpcb: Testing theory on save hotkey override
Bug #1807567 states the entering 's' in the string search textbox does
not get passed to the text box correctly when in the German language
under windows.  This likely means that the main window is firing wxSave
when it detects the 's' key.  By adjusting the id for the save and
continue action, we hope to allow the signal to pass through to the
textbox. This commit should otherwise be a NOP.

N.B. This appears to be the result of hooking wxEVT_CHAR_HOOK into
EDA_DRAW_PANEL::OnKeyEvent() (commit
53b1ec8146) that reverses the cascade of
events from bottom up rather than top down.  Fixing that is a longer
project and will likely be a side effect of switching fully to the new
tool architecture.
2019-02-14 20:50:50 -08:00
John Beard e6a6266f3d Build: libpolygon provides its own includes
Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.

As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.

This resolves a circular dependency previously detected and also
simplifies CMakeLists.
2019-02-04 19:29:31 -08:00
John Beard bb2ae8e13b Bitmaps: move bitmap defs to bitmaps library
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.

Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.

This avoids a circular dependency that was previously reported
by static analysis.

Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)

Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
2019-02-04 19:29:31 -08: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
jean-pierre charras 7ad21fefe5 Cross probing: Trying to fix a crash, certainly due to a call to clear the HIGHLIGHTED flag of a structure that is not a EDA_ITEM.
Minor enhancement: use a specific message in cross probing to clear the HIGHLIGHTED flag.
2018-12-31 13:54:26 +01:00
jean-pierre charras fb35a7c8b4 Eeschema highlight symbols (cross probing) fix a few issues.
Fix highlight not cleared by Pcbnew.
Fix highlight not cleared by Cvpcb (missing code).
Add comments. Remove a few now useless printf used for debug
When clicking on a empty area, clear any highligthed symbols

Fixes: lp:1809977
https://bugs.launchpad.net/kicad/+bug/1809977
2018-12-29 12:48:24 +01:00
Maciej Suminski 766156ed87 Fix for dark mode on macOS Mojave
Thanks to Scott Rapson and Justace Clutter for the solution.

Fixes: lp:1797989
* https://bugs.launchpad.net/kicad/+bug/1797989
2018-12-07 09:03:56 +01:00
Jeff Young 647fa6547d Update grid drop-down when changing user grid. 2018-11-23 23:33:02 +00:00
Tomasz Wlostowski e439b17fa1 eeschema-gal: make sure all other Kicad apps compile after eeschema gal hacks 2018-10-09 11:08:52 +01:00
John Beard 445a9fa963 Put cursor and pan control in libcommon/tool, enable in Gerbview
Put the cursor and pan control TOOL_ACTIONs in ACTION,
and refer to them in that way.

The handlers are currently identical in Pcbnew and Cvpcb,
and Gerbview (and all canvases) can benefit from them as well
if they are in libcommon. Also saves duplicated code.

Fixes: lp:1795855
* https://bugs.launchpad.net/kicad/+bug/1795855
2018-10-04 11:41:06 +02:00
jean-pierre charras b70d0f43b6 Fix minor compil warnings. 2018-09-24 13:12:47 +02:00
Jeff Young dd9b0c2dc6 Select assigned footprint in right panel.
Fixes: lp:1793294
* https://bugs.launchpad.net/kicad/+bug/1793294
2018-09-22 16:23:13 +01:00
Seth Hillbrand f8784f30a8 Removing OpenMP
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt

std::thread is used instead for multithreaded computation
2018-09-21 12:44:20 -07: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 b95aa1aaf7 cvpcb: don't show board-level soldermask
Only show soldermask in cvpcb if it was defined in the footprint or pad,
not the board defaults.
2018-08-28 17:01:48 -07:00
Jeff Young 4b1a31ffad Regularize save-changes dialogs. 2018-08-12 00:02:37 +01: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
jean-pierre charras 3eb3db02c3 Cvpcb, DISPLAY_FOOTPRINTS_FRAME: add measurement and zoom to selection tools. 2018-08-09 11:15:43 +02:00
jean-pierre charras 274572bf20 Rename tool_cvpcb.cpp to toolbars_cvpcb.cpp 2018-08-09 10:08:32 +02:00
jean-pierre charras 15e0771ea8 Add GAL support to Cvpcb display footprints frame. 2018-08-08 16:33:29 +02:00
Jeff Young d788c9d479 Move library table dialogs from PLAYER to KIFACE interface.
Spooling up a full PLAYER in the background takes too long.

This also fixes bugs around how the tables are saved, although
that was just missing code rather than anything architectural.

Fixes: lp:1785436
* https://bugs.launchpad.net/kicad/+bug/1785436
2018-08-06 21:31:53 +01:00
Jeff Young 3bf2e2f9fc Try out headers in Cvpcb.
Note: it's easy enough to back out.  If you don't like it, please
speak your mind.  I'm ambivalent about them.

Fixes: lp:1782952
* https://bugs.launchpad.net/kicad/+bug/1782952
2018-08-06 13:48:17 +01:00
Wayne Stambaugh 8e7d6063fd Minor dialog and frame window improvements.
Drop all uses of wxRAISED_BORDER and wxSUNKEN_BORDER from dialogs and
panels used in main frame windows.

Drop use of wxSP_3DSASH options on all wxSplitterWindow definitions.

Minor dialog alignment and spacing fixes.
2018-08-02 13:00:41 -04:00
jean-pierre charras ce3760438c Fix a few wxWidgets minor asserts. Fix also a missing bitmap button initialization.
Fixes: lp:1783703
https://bugs.launchpad.net/kicad/+bug/1783703
2018-08-02 13:22:11 +02:00
Jeff Young d8d4f75fa1 Fix button order and genralize Exit dialog so it can be shared more.
This also fixes a bunch of bugs where an error during save would
still close the window (rather than cancelling the close action).

Fixes: lp:1785034
* https://bugs.launchpad.net/kicad/+bug/1785034
2018-08-02 11:01:03 +01:00
Jeff Young f8a5e2c1c8 Performance enhancements in fp loading, string cmp, etc.
Knocks about 1/3 off the first footprint load, and more than 1/2
off subsequent loads.
2018-08-01 09:35:46 +01:00
Jeff Young 97f7bd4cb9 Push component tree down into common.
Precondition to reusing component tree for footprints.
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 c1df78d531 Finish project frame library table editing.
Fixes: lp:1782761
* https://bugs.launchpad.net/kicad/+bug/1782761
2018-07-20 18:48:06 +01:00
Jeff Young eaf5b913b6 Add Manage Symbol and Footprint Library tables to project frame.
Fixes: lp:1780604
* https://bugs.launchpad.net/kicad/+bug/1780604
2018-07-19 21:46:41 +01:00
Jeff Young 829ba27206 Another round of dialog spacing/font adjustments for Windows. 2018-07-18 17:59:05 +01:00
Jeff Young 879ffa4d1c Adjust dialog spacing for Windows. 2018-07-17 22:18:27 +01:00
Jeff Young 5048260749 Turn on library filter when library is selected.
It's a pretty good clue that the user wants to filter the footprints
by library (as it has no other purpose).

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

(cherry picked from commit b9a56f1)
2018-07-17 15:13:55 +01:00
Jeff Young 7d71861015 If the user has a selection then show the footprint.
Don't be pedantic about it having to come from the footprint
list, the component list also has footprints assigned.

(cherry picked from commit 759fba1)
2018-07-17 15:13:32 +01:00
Jeff Young 34857d06c4 Create CvPcb's footprint viewer through Kiway().Player()
This allows it to participate in Kiway things such as updating
language or common settings.

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

(cherry picked from commit b3f8478)
2018-07-17 15:13:31 +01:00
Jeff Young 2060d63e3f Add context menu for footprint viewing to CvPcb.
Fixes: lp:594102
* https://bugs.launchpad.net/kicad/+bug/594102

(cherry picked from commit 800bb8e)
2018-07-17 15:11:20 +01:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +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 8f0aa68ab8 Fold 3D Search Paths dialog into Configure Paths.
Use in-place editing for both.

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

(cherry picked from commit 33622cd)
2018-07-17 15:11:01 +01:00
Seth Hillbrand bc7bd107d9 Fix a number of untranslated strings. 2018-06-12 17:05:25 -07:00
Wayne Stambaugh 6f65f835f4 Fix assert in CvPcb when opening footprint equate file dialog.
Fixes lp:1774726

https://bugs.launchpad.net/kicad/+bug/1774726
2018-06-04 10:09:06 -04:00
Maciej Suminski 145835661b Replaced footprint library wizard with a common file browser
As of v5 footprint library reorganization (one repo per library concept
is replaced with a common repo for all libraries), the Footprint Library
Wizard may handle only the old libraries. It has been replaced with
a file browser to select only local files.

Fixes: lp:1772209
* https://bugs.launchpad.net/kicad/+bug/1772209
2018-05-25 08:51:46 +02:00
jean-pierre charras 9704891c8f Cvpcb, fo viewer frame: fix a bug (close frame widget not active) due to a too zealous cleanup. 2018-05-12 11:32:06 +02:00
jean-pierre charras 2ed24a46b2 Try to fix Jenkins build error (link error). 2018-05-10 15:14:08 +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 75e91f4cfd Make sure Cvpcb doesn't use its own FP_LIB_TABLE.
It's just a vestige of when Cvpcb was a separate app.

Fixes: lp:1768251
* https://bugs.launchpad.net/kicad/+bug/1768251
2018-05-01 21:49:03 +01:00
Seth Hillbrand 48910f3efc Standardize colons in cvpcb display options dialog 2018-04-23 13:08:21 -07:00
Jeff Young e4feb315d5 Clean up some spacing issue with the Save button.
Also went back to using a smaller font for the status lines,
although this time using more system settings.
2018-04-18 22:26:18 +01:00
jean-pierre charras 90741a9d76 Cvpcb: allows more room to display messages to avoid long strings to overlap buttons 2018-04-18 09:25:33 +02:00
Maciej Suminski f42ca89bb4 cvpcb: Overridden SetStatusText() to use m_statusLine{1,2}
Fixes: lp:1763267
* https://bugs.launchpad.net/kicad/+bug/1763267
2018-04-12 13:02:46 +02:00
Jeff Young baef22df9a Fix memory leak and push menu change to other apps.
Fixes: lp:1761848
* https://bugs.launchpad.net/kicad/+bug/1761848
2018-04-07 14:14:55 +01:00
Jeff Young 611d5a0dc4 Standardize "assign footprints" terminology.
Fixes: lp:1760867
* https://bugs.launchpad.net/kicad/+bug/1760867
2018-04-06 11:26:59 +01:00
Jeff Young 778a3a4777 Count pins instead of using netcount as a proxy.
Fixes: lp:1703155
* https://bugs.launchpad.net/kicad/+bug/1703155
2018-03-26 19:57:08 +01:00