Commit Graph

1014 Commits

Author SHA1 Message Date
Jeff Young 0021ecf51e Don't double-escape netnames.
Netnames in wxChoice or wxListBox are already in internal format
and don't need escaping again.

Fixes: lp:1823863
* https://bugs.launchpad.net/kicad/+bug/1823863
2019-04-12 00:28:58 +01:00
bobo87 ca7aec2d4e Fix crash in gerbview when legacy disabled
Fixes: lp:1822877
* https://bugs.launchpad.net/kicad/+bug/1822877
2019-04-11 14:25:11 -07:00
Jeff Young b7c12b238f Increase GervView layers to 51.
This also makes its use of LSET consistent with PCBNew.

Fixes: lp:1809019
* https://bugs.launchpad.net/kicad/+bug/1809019
2019-04-10 21:21:00 +01:00
Jeff Young 684bb62fd8 Escape slashes in labels and netnames.
Also re-allows spaces, as they can already come in through sheet
names.

Fixes: lp:1798621
* https://bugs.launchpad.net/kicad/+bug/1798621
2019-04-07 00:24:10 +01:00
Michael Kavanagh b0674b8802 Add Ctrl+, hotkey to preferences dialog
Also change interactive router settings from Ctrl+, to Ctrl+Shift+,
2019-04-02 12:57:27 -04:00
Michael Kavanagh fe6bc411dd Fix 'hokey' -> 'hotkey' typo 2019-04-02 12:57:26 -04:00
Wayne Stambaugh f20a1314ff GerbView: remember last open gerber file dialog wildcard.
This is only for the current GerbView session.  When GerbView is closed,
the last open gerber file dialog wildcard setting is lost.
2019-04-01 12:46:11 -04: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 e1d3df54eb Kicad and Gerbview: add .nc and .xnc file ext to files seen as drill files.
.nc is an other usual Excellon drill file ext, and .xnc will be soon also in use.
2019-03-27 16:47:13 +01:00
jean-pierre charras ff73f69d3e Gerbview: fix crash when reading a .gbrjob, and when a file given by the .gbrjob is not found.
A incorrect gerber image was created, creating crash on exit or when enable the layer view.
2019-03-24 17:32:57 +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
Michael de706635cc Add high contrast hotkey to GerbView
Also add all existing hotkeys to menubar.

Fixes: lp:1795388
https://bugs.launchpad.net/kicad/+bug/1795388
2019-03-03 19:25:53 -08:00
Seth Hillbrand c4fe6785ad gerbview: Fix arc filling
Arcs in gerbview should not be filled.

Fixes: lp:1817246
* https://bugs.launchpad.net/kicad/+bug/1817246
2019-02-21 21:26:10 -08:00
Tomasz Włostowski bbee30671a gal: pixel alignment hacks, works for Retina display too now.
gal: pixel alignment for Cairo.
gal: pixel alignment for OpenGL

Cleanup of pixel alignment patches

gal/opengl: more pixel alignment patches:
- works on Retina displays now
- pixel alignment for circles
- correct 1-pixel strokes
- fixed unfinished 1-pixel line ends

GAL: Restore antialiasing options in Cairo
GAL: Fix arc drawing

Removes DrawArcSegment, which drew arcs whose edge was optionally
stroked (a feature that we did not use).  Fixes Cairo arc drawing issue
where arcs were not visible in pcbnew.

gal: further cleanup
gal: removed unused shader parameter
2019-02-16 20:03:13 +01: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
John Beard 658cc8fd96 Wildcards: unify handling of all files wildcards
Use the AddFileExtListToFilter() to also generate the
wildcard for "all files". This is because:

* Users can use AddFileExtListToFilter for the all files WC
  with the same interface as for any other extensions.
* Users do not need to worry about wxGetTranslation, as the
  _() is applied in the same way as the other *Wildcard() helpers,
  and it is a function just like the others, so it is consistent
* There is a testable interface to document the expected result.
  The test is added.
2019-01-09 08:57:42 -05: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
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
Seth Hillbrand 6662891f34 string update: Help->List hotkeys
The hotkey name "Help (this window)" does not describe what the hotkey
and associated action does.  It displays the current hotkey list, so the
action name should reflect that behavior
2019-01-02 15:44:13 -08:00
John Beard e856a7a09c Disable legacy canvas on GTK3
This make the use of legacy canvas on GTK3 a default-off
advanced config. Legacy is substantially broken on GTK3
and is of basically no use at all to general users on this
platform.

If the program starts with legacy canvas in the config,
it is forced into a GAL mode, as otherwise it could happen
that the user is stuck and unable to get into pcbnew to change
the setting.

Fixes: lp:1803156
* https://bugs.launchpad.net/kicad/+bug/1803156
2018-12-28 11:36:09 -05:00
jean-pierre charras 9dedbc74a3 Gerbview exporter: fix a wxASSERT. 2018-12-21 13:48:00 +01:00
jean-pierre charras 388397f97d Protect TesselatePolygon() against degenerated polygons (less than 3 corners) to avoid crashes.
Use TesselatePolygon() to draw polygons in Gerbview instead of GLU tesselation, much slower.
Add helper methods in GAL to know if the current GAL engine is Cairo, OpenGL or something else,
useful to optimize drawing code.
2018-12-18 12:49:14 +01:00
jean-pierre charras d546fce7c4 Gerbview: drill file dialog selector: add .nc and .xnc to drill file extension list.
Therefore file extension list is ".drl .nc .xnc" for NC (Excellon) drill files.
2018-12-07 11:25:30 +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
D4p0up e94752a6cf Added help string to select buttons.
Also moved highlight text string to help_common_strings.h

Fixes: lp:1497737
* https://bugs.launchpad.net/kicad/+bug/1497737
2018-12-05 20:13:03 -08:00
jean-pierre charras 2cb4187f52 Gerbview: small fix to speed up switching to opengl canvas.
* workaround to speed up switching canvas from legacy or Cairo to opengl (this is a workaround, not a fix)
2018-12-03 18:31:36 +01:00
jean-pierre charras ecfe564f4d Gerber viewer: Ensure arc interpolation is used only after a arc command.
Remove also non existing G command codes.
2018-12-01 18:52:27 +01:00
jean-pierre charras 3e2f8bcb1d Gerbview: fix broken behavior of "Reload file" tool.
Previous code was unable to reload drill files: they were reloaded as gerber files.
2018-11-26 12:49:13 +01:00
jean-pierre charras 542c57ff27 Gerbview, Excellon (NC) drill files reader: routing mode: better handling of malformed files.
Routing mode starts by M15 (or G01, G02, G03) and ends by M16 or M17.
Accept now a end routing if a G00 (start move) G05 (switch to drill mode) or M30 (end of file) is encountered.
2018-11-26 10:55:36 +01:00
jean-pierre charras 0e705cd338 Fix a minor issue in Legacy mode: DCodes were displayed regardless the visibility of the layers. 2018-11-24 10:14:33 +01:00
jean-pierre charras 73b52f2e23 Gerbview: fix incorrect initialization of WorldUnitLength.
Fix incorrect min zoom level to show D Code texts.
2018-11-20 10:27:59 +01:00
Jeff Young 0de9cb345c Add shortcuts to setting dialogs for track widths, via sizes and grid sizes.
Fixes: lp:1803671
* https://bugs.launchpad.net/kicad/+bug/1803671
2018-11-17 00:35:06 +00:00
jean-pierre charras 8c8ccf83e6 Fix a few I18n minor issues. 2018-11-16 09:43:40 +01:00
jean-pierre charras ffe4b745dd Opengl gal: Fix bug: segments with 0 length are not drawn. However the are equivalent to circles.
Using 0 length segments happen with oval pads having the same X and Y size, and in some other cases.

Fixes: lp:1801923
https://bugs.launchpad.net/kicad/+bug/1801923
2018-11-15 13:10:42 +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
jean-pierre charras 0980f7232c Gerbview: minor fixes. 2018-11-08 16:49:50 +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 e81c3a59a2 Refactored and unified board editor and footprint editor print dialogs 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 3158273c1a Revert window-locking change which didn't fix preferences crash. 2018-10-13 15:53:54 +01:00
Jeff Young 6a5744adb1 Show compile errors and go back to GLSL V120. 2018-10-13 12:39:53 +01:00
Seth Hillbrand d03b08a03f gerbview: Prevent NULL dereference
There was a possible NULL dereference when executing tool_up even
though we should never hit it, we protect against bad files.

Also converts a couple untranslated error strings.
2018-10-11 14:23:07 -07:00