Graphic lines and polygons are drawn to fit specific areas for which it
is helpful to have the endpoint controlled by the cursor even when
constraining the angle.
Fixes: lp:1805502
* https://bugs.launchpad.net/kicad/+bug/1805502
Append the appropriate file extension to the file name if the file name
does not have a file extension. This is a know issue with the GTK+ file
dialog.
Make the last 3D viewer screenshot last file used code more coherent.
Add the 3D viewer main frame trace string to the trace environment
variables doxygen group.
Doxygen comment and other minor code cleaning.
Fixes lp:1804980
https://bugs.launchpad.net/bugs/1804980
Under GTK3, the scrollbars fade in and out, causing a cascade of
re-paint events. These cause KiCad to be unresponsive while the repaint
events occur. By default this is 1s fade in 1s fade out but can be
configured by the user/wm.
Area mapping the repaint events to just scrollbar areas will be a good
solution but until/unless that happens the scrollbars in GTK3 are
problematic.
On GTK+3, the zoom events are smaller and faster, so
the trigger the zoom acceleration.
A simple fix is to use the non-accelerated Mac-style
zooming and an appropriate constant. This can be tweaked
further as needed.
Fixes: lp:1786515
* https://bugs.launchpad.net/kicad/+bug/1786515
GTK3 smooth scrolling is enabled by wxWidgets but not to the exclusion
of normal scroll up/down events. wxWidgets maps these both to the same
scroll handler and will fire them both if they are not handled before
being queued. Testing timestamps allows us to mark and ignore the
dupes.
This is set to GTK3 only for now as it isn't listed as a problem for
other platforms. But it shouldn't cause issues if it is enabled
elsewhere in the future.
The libeval grammar can now be rebuilt with "make libeval_grammar".
This is only possible when lemon is installed.
Also a couple of modifications to the lemon grammar to
account for external changes since the grammer was last generated.
Also move the grammar defines into grammar.h - this is how
Lemon produces them, and by manually copying into the target .cpp,
it make automated regeneration impossible.
This adds a check for contiguous board outlines to the DRC. It also
uses the calculated outline to ensure that traces are not crossing the
outlines.
Fixes: lp:1648055
* https://bugs.launchpad.net/kicad/+bug/1648055
The reduces a little bit of WX dependency, and makes
the timing code a bit more type-safe.
Also adds a more testable interface for the accelerated
zoom controller.
This is done to avoid a big chunk of conditionally-compiled code
in the middle of the event function.
Also separates the zoom logic from the WX_VIEW_CONTROLS object
and isolates it in a separate class behind a clearer interface.
Add some simple tests for sane steps on GTK+3-sized scroll
steps.
This syncs the "All" checkbox with the state of the report options such
that selecting "All" automatically selects the other boxes and
deselecting a box results in the "All" box also being unselected. This
allows a single click filtering of report messages.
Fixes: lp:1796992
* https://bugs.launchpad.net/kicad/+bug/1796992
When the error switching to OpenGL is triggered by the requested switch,
we want to fallback to the cairo GAL renderer instead of the
GAL_TYPE_NONE, which defaults to legacy.
Fixes: lp:1799017
* https://bugs.launchpad.net/kicad/+bug/1799017
This makes using Scrollbars more easy to use, especially for "small" page sizes like A or B.
Note also the working/drawing area size is bigger than the page size (3 times)
This parameter defines the working area (full page) size.
The fix is not perfect, because it does not take in account the page size.
However it is similar to the "old" initialization, before Eeschema GAL.
In Eeschema, a reasonable boundary size is used.
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
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
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.
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.
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.
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.
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.
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).
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
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.
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)
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.
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)
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.
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.
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.