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
f90ca7408d
Legacy canvas: fix missing code to draw block outline.
...
Due to recent changes in legacy canvas code, when starting a block command,
the block outline was not drawn in pcbnew and pl_editor during block definition.
Fixes: lp:1803668
https://bugs.launchpad.net/kicad/+bug/1803668
2018-11-16 21:03:04 +01:00
Jeff Young
4050991d28
Move ERC marker focusing to GAL architecture.
...
Fixes: lp:1802537
* https://bugs.launchpad.net/kicad/+bug/1802537
2018-11-16 10:38:44 +00: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
7783290161
Add a tooltip
2018-11-11 08:29:13 +01:00
Wayne Stambaugh
f1f4473d8b
Footprint editor: add save view to PNG file.
...
Factor out save current canvas view to image file code from symbol editor
code so it can be used anywhere.
Add ability to save to any image format supported by wxBitmapType. See
https://docs.wxwidgets.org/3.0/gdicmn_8h.html#a90a1eb6d85b5044a99b706fd979f27f5 .
Currently only PNG output is implemented.
Please note that there is a minor bug that appears to be due to the
scroll bars which causes unfilled areas on the right and bottom edges
of the image. This always existed in the save symbol editor view
image but it was not as noticeable because by default the background
color is white. It is very noticeable in the footprint editor with
a black background.
The usual smattering of coding policy and comment fixes.
Fixes lp:1802127
https://bugs.launchpad.net/kicad/+bug/1802127
2018-11-09 08:32:36 -05:00
John Beard
4c355c32d3
Fix rounding in COLOR4D::ToColour
...
Due to the implicit floor of the cast from double to unsigned char,
there was a small rounding error in COLOUR4D's WX conversion function.
This fixes the failing tests.
Also make the cast to unsigned char explicit.
2018-11-08 14:40:42 -05:00
John Beard
075f428aca
Include directories are implied by legacy_gal linkage
...
This avoids having to manually specify include/legacy_gal
in and legacy GAL targets, and harominizes with legacy_wx.
This also means .cpp files in common/legacy_gal do not
need to specify the legacy_gal subdirectory, so they
will continue to work as needed when legacy_wx is removed.
2018-11-08 07:52:36 -05:00
Maciej Suminski
3e8b3e535a
Added a comment for close event handlers in DIALOG_PRINT_GENERIC
2018-11-07 09:31:40 +01:00
qu1ck
e789542ba4
Fix warning in dialog_print_generic.cpp
2018-11-07 09:26:47 +01:00
jean-pierre charras
238abad004
Gerber job file: fix incorrect GUID.
...
Fixes: lp:1801696
https://bugs.launchpad.net/kicad/+bug/1801696
2018-11-06 08:16:07 +01:00
Jeff Young
fec8ab372e
Don't set the viewport when switching screens.
...
That's the job of ZoomAutomatique().
Fixes: lp:1799436
* https://bugs.launchpad.net/kicad/+bug/1799436
2018-11-04 19:17:53 +00:00
Jeff Young
589e1f6a96
MSW and GTK need a separate dialog for opening/saving directories.
...
Fixes: lp:1801528
* https://bugs.launchpad.net/kicad/+bug/1801528
2018-11-04 12:35:01 +00:00
Jeff Young
3bfd32cdc5
Inherit grid settings from PCBNew.
...
Fixes: lp:1801428
* https://bugs.launchpad.net/kicad/+bug/1801428
2018-11-04 12:35:01 +00:00
Jeff Young
d7ff3f8af5
Allow text on margin layer.
2018-11-02 19:55:30 +00:00
jean-pierre charras
a55950bd68
DIALOG_COLOR_PICKER_BASE: fix a minor wxWidgets alert.
2018-11-01 16:51:14 +01:00
Maciej Suminski
08814b0512
Small layout adjustments in DIALOG_PRINT_GENERIC
2018-10-31 19:17:30 +01:00
Maciej Suminski
ca1687d7ce
Fixed disabling the block title for footprint editor printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
afda69c9cc
Removed default line width setting from the printing dialog
2018-10-31 19:17:30 +01:00
Maciej Suminski
cbf7d708b2
pcbnew: Draw title block normally even when the view is flipped
2018-10-31 19:17:30 +01:00
Maciej Suminski
64da77538f
Fix bitmap scale in printouts
...
Display GALs had an incorrect world unit value set. Now the world unit
value says how many internal units are in an inch, in accord with the comments
in the GAL header. Bitmap drawing code relied on the information about DPI,
so scaling worked differently for display and print GALs.
2018-10-31 19:17:30 +01:00
Maciej Suminski
7ab8171422
Disabled translucency in printouts as it is not supported by cairo
2018-10-31 19:17:30 +01:00
Maciej Suminski
42c5fc0ef8
Link GDI+ library when building libgal
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
90b6156448
Store line width setting for printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
b727b310b4
Fix 'fit to page' for print outs
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
562b8d7948
Printing code clean-up
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
8cb464b725
Handle drill mark options in pcbnew printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
3e5ee254cf
Fix for 'fit to page' scaled printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
347e21daaa
Handle printout settings: line width, color/mono, mirror
2018-10-31 19:17:30 +01:00
Maciej Suminski
47d0eaa2c6
GAL: changed line width setting to float type
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
Maciej Suminski
6c689305a6
Decouple GAL printing interface and its Cairo-based implementation
2018-10-31 19:17:30 +01:00
Maciej Suminski
e36f6b476d
Changed the CAIRO_GAL class hierarchy
...
There is a dedicated class for display (CAIRO_GAL) and another one
for printing. The common part has been moved to CAIRO_GAL_BASE.
2018-10-31 19:17:30 +01:00
Maciej Suminski
5a64343fb4
CAIRO_PRINT_CTX class
...
CAIRO_PRINT_CTX provides a Cairo context created from wxPrintDC.
It allows one to prepare printouts using the Cairo library and
let wxWidgets handle the rest.
2018-10-31 19:17:29 +01:00
Maciej Suminski
f948e46330
VIEW: changed wxASSERTs to wxCHECKs
2018-10-31 19:17:29 +01:00
Maciej Suminski
17205b4599
Added VIEW::DataReference() for sharing data with another VIEW instance
2018-10-31 19:17:29 +01:00
Maciej Suminski
1411e1f73a
GAL: added methods to modify rotation in the transformation matrix
2018-10-31 19:17:29 +01:00
Jeff Young
de971df4c6
Don't put up error dialogs after a Cancel of a dialog.
...
Fixes: lp:1800711
* https://bugs.launchpad.net/kicad/+bug/1800711
2018-10-30 23:13:32 +00:00
Jeff Young
f660ec7cf8
Eval when needed, but only replace text when killing focus.
...
Fixes: lp:1800718
* https://bugs.launchpad.net/kicad/+bug/1800718
Fixes: lp:1800476
* https://bugs.launchpad.net/kicad/+bug/1800476
2018-10-30 22:58:22 +00:00
jean-pierre charras
4b44cbe695
Kicad, Windows specific: disable a overzealous wxWidgets assert when reading a file.
...
When reading (and writing) a file, we must switch the current locale to "C" for LC_NUMERIC.
Unfortunately, on Windows, a wxWidgets assert was shown when reading some items (bitmaps images).
This wxWidgets assert (related to decimal separator) is overzealous and is now hidden only when reading/writing files.
2018-10-27 19:59:18 +02:00
jean-pierre charras
3dddca767e
fix a minor wxWidgets alert.
2018-10-27 13:40:52 +02:00
Jeff Young
16925cc74e
Implement RAII locking for GAL updating.
...
Fixes a crash when typing fast in the place footprint filter box.
Also adds a bunch more checking to GAL locking, including making
sure the same person unlocks as locked, and preventing piece-meal
calls (the RAII objects must be used).
2018-10-26 23:02:05 +01:00
Thomas Pointhuber
0e0b4d52a2
Add initial support for Phoenix (new wxPython binding)
...
Based on the work of @mmccoo:
https://kicad.mmccoo.com/2017/11/23/learnings-from-moving-kicad-to-wxpython-4-0/
and this additional patchset to remove wxpy_api.h dependency:
http://mmccoo.com/random/0001-Remove-dependence-on-pywx_api.h.patch
Please note CreatePythonShellWindow changed quite a lot. Throughful testing
should be made for the old as well as new wxPython version on all platforms
2018-10-26 13:21:11 +02:00
Wayne Stambaugh
2a170c9847
Update license to AGPL due to TTL license.
...
The decision to include the TTL library make KiCad a derivative work
under the terms of the AGPL version 3 or later license.
Add both the GPL3 and AGPL3 license text files and add a readme file
about the KiCad licensing. Contributing to KiCad still falls under
the GPL3+ license.
Fixes lp:1797095
https://bugs.launchpad.net/kicad/+bug/1797095
2018-10-22 12:28:48 -04:00
Maciej Suminski
f1b2855e80
Fix ENV_VAR_NAME_VALIDATOR typing characters backwards
...
Fixes: lp:1798869
* https://bugs.launchpad.net/kicad/+bug/1798869
2018-10-22 15:07:44 +02:00
Seth Hillbrand
44d416cafc
Move cursor in increments off grid
...
When the cursor starts off grid, we avoid snapping to the nearest grid
point to prevent movement in an unintended direction.
2018-10-21 14:28:33 -07:00
jean-pierre charras
f183b4f526
GAL, Opengl: Draw Arc: fix draw layer depth (previously, set to 0.0, which is not always the case)
2018-10-21 19:53:36 +02:00
jean-pierre charras
dafeb96765
Page layout bitmap size wrong in modern/GAL canvases.
...
The image scale set by pl_editor was not taken in account when drawing the page layout.
Fixes: lp:1798685
https://bugs.launchpad.net/kicad/+bug/1798685
2018-10-20 18:24:22 +02:00
jean-pierre charras
7be215249d
OPENGL_GAL: avoid crash when esotheric unicode chars are used in netnames/pad names in Debug mode.
...
It happens when the char is not found in the font used to display netnames/pad names.
When happens, a wxASSERT is raised.
Unfortunately it can crash the application if it is during a paint event or some critical time.
2018-10-20 18:08:36 +02:00
jean-pierre charras
1116acd74b
Libedit: Fix broken handling of "common to all bodu style" property of lib draw items.
...
Fix a minor wxWidgets assert.
2018-10-20 12:38:36 +02:00
Simon Richter
abe1ffabda
Replace WIN32 preprocessor symbol by the official symbol _WIN32, used almost everywhere
2018-10-20 09:22:24 +02:00
Thomas Pointhuber
f316b98f45
Fix conversation of Python 3 str -> wxString
...
Conversation of a NoneType for example failed before
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
88d04f3bcb
Get Action Plugins working with Python 3, fix some unicode string errors
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
8805706ccb
Fix incompatibilites between Python 2 and Python 3
2018-10-19 09:59:05 +02:00
Thomas Pointhuber
7548a3b1bf
Add KICAD_SCRIPTING_PYTHON3 flag to about dialog and doc
2018-10-19 09:59:05 +02:00
Thomas Pointhuber
284904b72c
Rewrite C extensions to also support Python 3
2018-10-19 09:59:05 +02:00
Seth Hillbrand
6d8a759c75
UTF8: Fix MSVC builds
...
MSVC does not support variable length arrays. Substitute a std::vector
instead.
2018-10-18 11:35:45 -07:00
Jeff Young
ff992f4a64
Keep track of which nets are currently in use.
...
Fixes: lp:1798006
* https://bugs.launchpad.net/kicad/+bug/1798006
2018-10-18 12:14:23 +01:00
Seth Hillbrand
441cac9f1b
UTF8: Correct MSW issue with previous commit
...
Linux does not handle the resize command with wide-character extended
table UTF-8. The solution did not work for W7-32bit. This is a
compromise, attempting first the preferred, previous solution and
falling back to the secondary solution.
(cherry picked from commit 6106210c87
)
2018-10-17 12:40:28 -07:00
Wayne Stambaugh
f584b30c73
Replace log debugging output with tracing.
...
Replace all instances of wxLogDebug with wxLogTrace in the common and
kicad folders to prevent unwanted debugging output.
Add new trace flags for locale and screen object tracing.
The usual smattering of code policy fixes.
2018-10-17 15:03:33 -04:00
Jeff Young
c22a247dbc
Fix undo issue primarily with libedit.
...
Fixes: lp:1797900
* https://bugs.launchpad.net/kicad/+bug/1797900
2018-10-17 13:10:36 +01:00
Jeff Young
e9a80a5d7f
Some minor dialog layout fixups.
2018-10-17 11:23:02 +01:00
Seth Hillbrand
594c1bded1
UTF8: Utilize the safe conversion from wchar
...
Invalid wchar characters would throw an exception. We need a defined
output from the += operator, even for unknown character.
Fixes: lp:1798144
* https://bugs.launchpad.net/kicad/+bug/1798144
(cherry picked from commit b37bc69476
)
2018-10-16 16:37:48 -07:00
jean-pierre charras
61f2dd21b1
Eeschema gal: fix some redraw issues for bitmap images and worksheet.
...
After edition, the worksheet was not updated on screen.
Bitmap images were not shown in opengl mode due to the fact all gal layers were cached.
2018-10-16 14:20:09 +02:00
Seth Hillbrand
bf164f7c4b
GAL: Lock context when triggering resize
...
This action adjusts the compositor, so it must have exclusive access to
the context.
2018-10-15 09:55:53 -07:00
Tomasz Włostowski
d66e0d4f7a
eeschema-gal: implemented EnableDepthTest() in GAL, fixed drawing order in eeschema
2018-10-15 00:09:59 +02:00
Jeff Young
0bd0558833
Auto-select reference numbers in PcbNew like we do in Eeschema.
2018-10-14 00:06:41 +01:00
Jeff Young
6a5744adb1
Show compile errors and go back to GLSL V120.
2018-10-13 12:39:53 +01:00
jean-pierre charras
7df4ddc74d
Use our DIALOG_COLOR_PICKER in 3D viewer to set a color.
...
the wxWidgets color picker is not the best for the 3D viewer that does not use transparency color.
2018-10-13 08:23:14 +02:00
Seth Hillbrand
cfaf7c1f23
pcbnew: re-organizing connectivity
...
The connectivity files were unwieldy. This separates them logically
into data, algo and items where the items classes are those that hold,
surprise, surprise, the items, lists and clusters.
2018-10-12 16:31:09 -07:00
Seth Hillbrand
4460313104
pcbnew: Separating connectivity to subdir
2018-10-12 16:31:09 -07:00
Jeff Young
6c34fdefd7
Better exception handling and context locking for GAL.
...
This prevents deadlocks when exceptions are thrown and the context
ends up not getting unlocked.
It also removes an earlier hack to try and minimize this which
didn't work anyway.
2018-10-12 23:44:49 +01:00
Tomasz Włostowski
a676034e36
OPENGL_GAL::DrawGrid(): flush drawing buffer after drawing small crosses grid so that it's correctly composited
...
Fixes: lp:1797642
* https://bugs.launchpad.net/kicad/+bug/1797642
2018-10-12 23:52:35 +02:00
Tomasz Włostowski
22300e4f02
Null pointer check in FOOTPRINT_LIST::GetInstance()
2018-10-12 23:51:31 +02:00
Tomasz Włostowski
7f132ca261
EDA_DRAW_FRAME: avoid cursor flickering in GAL when changing cursor size
...
Fixes: lp:1797437
2018-10-12 23:20:28 +02:00
Tomasz Włostowski
711b278248
gal/opengl: handle single-pixel line width clamping in hardware (new shader). Correct grid rendering in GAL for pixel-sized lines
2018-10-12 19:13:54 +02:00
Seth Hillbrand
4f672f0d39
Fixing a number of dynamic_casts
...
Dynamic casts should only be used when we explicitly check for the
resulting pointer to be NULL. Where we know the class is castable we
can use static_cast, save on overhead and ensure our resulting pointer
is non-null.
2018-10-11 15:24:12 -07:00
Seth Hillbrand
a16e21665a
view_layers: Initialize variables
...
Fixes a couple spots where uninitialized variables cause unknown results.
2018-10-11 14:08:35 -07:00
Jeff Young
a69635f539
Adjustment to net selector list sizing for GTK.
...
Thanks to John Beard.
2018-10-11 18:53:00 +01:00
Jeff Young
9f7bc6a9f9
A bit of a hack to keep OpenGL from puking.
2018-10-11 18:53:00 +01:00
Jeff Young
94cc1efbcc
Clear filter when poping up net selector.
...
Even when useful it's unexpected, and GTK has issues with focus
and selection inside the control, making it hard to clear.
2018-10-11 11:58:39 +01:00
Jeff Young
ff85798918
Increase list-item padding for GTK net selector.
2018-10-11 11:58:39 +01:00
jean-pierre charras
0dfd0c5f52
Minot cosmetic enhancement
2018-10-11 11:26:59 +02:00
Ronnie Gaensli
ab1f016132
Fix assert freeze of eeschema when ToHSV, h is Nan
...
Fixes: lp:1797006
* https://bugs.launchpad.net/kicad/+bug/1797006
2018-10-10 21:22:26 +02:00
Jeff Young
a0b8755f47
Filter <space> out of net filter box.
2018-10-10 19:49:06 +01:00
Jeff Young
01843290fc
Exclude space from net filter.
2018-10-10 19:49:06 +01:00
Jeff Young
609d497870
Remember settings in Global Track & Via Properties dialog.
2018-10-10 19:49:06 +01:00
Jeff Young
14721829d7
Hook up keyboard events to parent combobox of net selector.
2018-10-10 14:02:25 +01:00
Jeff Young
779ef044b7
Fix wxGrid column dragging bugs.
...
Close an open editor when dragging (as wxWidgets won't move it).
Make sure native column headers aren't in use where we need dragging:
their interaction with wxWidgets' dragging is buggy.
Fixes: lp:1796398
* https://bugs.launchpad.net/kicad/+bug/1796398
Fixes: lp:1796396
* https://bugs.launchpad.net/kicad/+bug/1796396
2018-10-09 21:33:43 +01:00
jean-pierre charras
37c2743fec
Fix a minor compil warning.
2018-10-09 17:03:43 +02:00
Jeff Young
bc69330fe0
Make sure filter text goes at the end.
...
Some platforms select-all on focus, meaning each character would
replace the pre-existing string.
2018-10-09 14:56:29 +01:00
Seth Hillbrand
81483a9670
ARC_ASSIST: Fix return type in bool check
...
The return for special angle check is boolean.
2018-10-09 05:37:48 -07:00
John Beard
c75d4b9ba1
Fix -Wreorder warning in common view-overlay.cpp
...
Simple fix - m_radius comes after m_{start,end}Angle in the class member list.
2018-10-09 11:08:56 +01:00
Jeff Young
9dfcc839a4
Fix color issues with cursor and sheet pins.
2018-10-09 11:08:56 +01:00