Commit Graph

135 Commits

Author SHA1 Message Date
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 1a301d8eea Stop using wxDialog::EndModal() from inside dialogs.
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal).  Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.
2021-07-21 17:38:14 -04:00
Wayne Stambaugh cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
luz paz 0446d35f0d Fix source comment/doc typos (follow-up)
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
2021-07-13 10:48:17 +00:00
Wayne Stambaugh 5395a7fe67 GerbView header housekeeping. 2021-06-03 14:32:24 -04:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Jeff Young 2d28ed8eda Move canvas backend selection to Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/7630
2021-02-21 20:12:43 +00:00
Marek Roszko 39fb968820 Fix broken map in findNumX2GerbersLoaded 2021-01-31 11:51:08 -05:00
Jon Evans ff4c01c4a4 Don't say a gerber is an X2 unless the whole attribute is loaded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7303
2021-01-27 17:17:44 -05:00
Wayne Stambaugh 4619d5e112 Fix more broken Doxygen comment specifiers. 2021-01-26 12:17:52 -05:00
Wayne Stambaugh 08cf9a1e20 Move headers from common folders to appropriate include folders round 1. 2020-12-17 08:12:18 -05:00
Marek Roszko 16e3e59495 Split out arrayDim and MIRROR templates from macros.h
These were not macros
2020-11-17 20:21:04 -05:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Marek Roszko e928b2d8fd Split EDA_UNITS out from common. 2020-10-25 00:02:52 -04:00
jean-pierre charras 539ac4c214 Remove a few include<wx/wx.h> in many files that do not actually use this include. 2020-10-19 09:00:50 +02:00
Ian McInerney 565bb268bb gerbview: Move more items to actions and tools
* Create a new inspection tool to hold the measure tool and
  the other inspection items
* Move some control functions from the frame to a tool and
  rearrange the code to be cleaner.
2020-10-09 01:55:31 +01:00
Ian McInerney 8b0fb9f4cf Remove units and polar settings from the preferences panels
These options are already available in menus, toolbars and hotkeys,
so having them in the preferences pane is more trouble than it is
worth.
2020-10-04 17:53:55 +01:00
jean-pierre charras 0b23cb7dbb more cleanup about removing useless include 2020-10-03 15:26:03 +02:00
jean-pierre charras 04aa5519d0 Gerbview: code cleanup. Remove many include, now useless. 2020-09-30 12:56:55 +02:00
Jeff Young d1371e513d Make sure Gerber print options have a color settings.
We probably don't need it, but some code attempts to dereference
it so safer to have one then to start checking everywhere for
dereferences.

Fixes https://gitlab.com/kicad/code/kicad/issues/5353
2020-08-25 14:08:09 +01:00
Peter Montgomery 5fd7064f76 Add Gerber filename to 'Select Layer:' dialog
The 'Select Layer:' dialog pops up directly over the dialog with the loaded
Gerbers and hides all Gerber file names.  This is just an aid so users remember
exactly which Gerber layer they're working on without having to move the dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4893
2020-07-22 02:03:43 +00:00
Peter Montgomery 73168a9405 Gerbview: Keep existing layer selected if user clicks Cancel on 'Select Layer' dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4752
2020-07-11 09:40:46 +00:00
Jeff Young 39d4e422ea Better approximation for pads in Export Gerber to Pcbnew
We can't get all the way there because we can't create pads outside
of modules and the Gerbers don't store any grouping/footprint info.
This change moves us from outputing a via for every flashed item
(some of which don't even have holes) to synthesizing pads from
flashed items using a via (when they have holes) and a copper polygon.

This is much better for SMD pads, perhaps better for regular pads,
and no worse for vias.
2020-06-06 16:38:14 +01: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
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00: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
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 33773bad4d Yet more command conversions to ACTIONs. 2019-06-02 21:10:56 +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 d2daab808c Remove some legacy cursor handling stuff. 2019-05-31 21:54:22 +01:00
Jeff Young 1a3d0492f5 Push polar coords down into COMMON_TOOLS. 2019-05-18 00:21:49 +01:00
Seth Hillbrand 1e5ba6f1b1 Replace DIM() macro
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time.  Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
2019-01-06 08:43:12 -08:00
jean-pierre charras 9dedbc74a3 Gerbview exporter: fix a wxASSERT. 2018-12-21 13:48:00 +01:00
jean-pierre charras f7cf40f2f4 Fix a few Coverity warnings.
Sometimes a dynamic_cast was used without testing the returned value.
Some are replaced by static_cast, when the dynamic_cast was useless.
2018-11-11 08:28:58 +01:00
Maciej Suminski afda69c9cc Removed default line width setting from the printing dialog 2018-10-31 19:17:30 +01:00
Maciej Suminski 3d15092643 Fixed loading layer visibility setting for printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski d3ea63e133 Removed a redundant parameter from BOARD_PRINTOUT constructor 2018-10-31 19:17:30 +01:00
Maciej Suminski dea778842b Grand printing dialogs refactor
Patch introduces a generic printing settings window that is customized by pcbnew and gerbview.
2018-10-31 19:17:30 +01:00
Maciej Suminski 92c5cb288e Fixed scale in Gerbview printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 698a380827 Clear selection before printing
Selected objects are hidden in VIEW, that makes them disappear from
printouts.
2018-10-31 19:17:30 +01:00
Maciej Suminski 1cce194c8a Handle layer settings in printouts 2018-10-31 19:17:30 +01:00
Maciej Suminski 5b94f20e6f Adapted printout controllers to the new printing routines 2018-10-31 19:17:30 +01:00
Jeff Young 977f27f3c4 Adjust spacing on preference panels.
Giving them the correct parent changed the spacing.

(cherry picked from commit 7f602f3)

(cherry picked from commit 718db46)
2018-07-17 15:14:25 +01:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +01:00
Seth Hillbrand f911ef5186 Standardize print scale label for gerbview 2018-04-23 13:14:06 -07:00
Seth Hillbrand ca06e67ffc Standardize colons in gerbview display options dialog 2018-04-23 13:11:53 -07:00
Seth Hillbrand aa0d67bdde Standardize colons in gerbview print dialog 2018-04-23 13:10:53 -07:00
Maciej Suminski cfa9916836 Prevent issuing a print command before the previous one is finished
Fixes: lp:1765965
* https://bugs.launchpad.net/kicad/+bug/1765965
2018-04-23 11:25:28 +02:00
Maciej Suminski 3cc0554e33 Code formatting 2018-04-23 11:18:51 +02:00