Commit Graph

31470 Commits

Author SHA1 Message Date
Seth Hillbrand 3b87ab630e There is one source of truth in AC
Don't store default values in two separate places.  Passes the existing
by value as the default.

Issue identified by @axemagn

Fixes https://gitlab.com/kicad/code/kicad/issues/10221
2022-01-28 13:33:28 -08:00
Seth Hillbrand 79403ef075 Readd yield call to give slice to system.
Note:
- wxYield does not work here, indicating the need for locking
- wxYieldIfNeeded does not work, possibly for the same reason as wxYield
- Both Layout() and m_fieldGrid->Layout() need to be called even though
  the first should call the second.

Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2022-01-28 13:02:39 -08:00
jean-pierre charras 5b8eb8f9ec SVG plotter rework: use mm as units in file. Remove useless inch option.
Use 4 digits in mantissa as default and when exporting SVG.
Allow 0 as line width: this is the right value to draw filled shapes with no outline thickness.
2022-01-28 19:33:51 +01:00
jean-pierre charras 901a9387e9 Fix python fp wizards according to last kicad code changes, especially EDA_ANGLE 2022-01-28 19:33:51 +01:00
Seth Hillbrand d32a72ddde Fix PCAD arc import 2022-01-28 10:20:18 -08:00
Franck a6203617d9 Fix Altium schematic port component import assertion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10322

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10401
2022-01-28 15:52:30 +00:00
markus-bonk 09886bac38 Fix missing pcbcommon dependency declaration.
The pcbnew_navlib library didn't have a proper dependency chain. It
relies on headers that come from pcbcommon.
2022-01-28 12:21:42 +00:00
markus-bonk 233b537170 Fix code style. 2022-01-28 12:21:42 +00:00
markus-bonk 8663a399ac Move pcbnew_navlib compilation into pcbcommon.
Although pcb_base_frame.cpp is in the pcbnew source tree, it is compiled
and included in pcbcommon.lib. Because pcb_base_frame has a dependency
on pcbnew_navlib, the latter also needs to be included in pcbcommon to
avoid linkage issues.

The superfluous references to pcbnew_navlib in the qa projects have been
removed.
2022-01-28 12:21:42 +00:00
markus-bonk bb542e5959 Fix compilation when KICAD_USE_3DCONNEXION is undefined. 2022-01-28 12:21:42 +00:00
markus-bonk b263e89dfe Enable 3D mouse support in Footprint viewer.
The 3D mouse support is  moved from PCB_EDIT_FRAME to PCB_BASE_FRAME.
This allows all PCB_BASE_FRAME derived windows to have 3D mouse enabled
2D navigation support.
2022-01-28 12:21:42 +00:00
markus-bonk 8e43409d27 Invoke correct base method in PCB_BASE_EDIT_FRAME::handleActivateEvent.
The base class of PCB_BASE_EDIT_FRAME is PCB_BASE_FRAME. Invoking
EDA_DRAW_FRAME::handleActivateEvent in the PCB_BASE_EDIT_FRAME override
will skip the definition in PCB_BASE_FRAME.
2022-01-28 12:21:42 +00:00
markus-bonk be58ab679b Fix coding style policy violations and CMake version.
Fix violations of 4.2.2 Function Definitions and 4.2.3 Control
Statements.
Set the minimum CMake version required to build to 3.1.
Removed the Visual Studio solution and project files.
2022-01-28 12:21:42 +00:00
markus-bonk 91d261d735 Fix "Error loading editor" when no 3Dconnexion driver installed. 2022-01-28 12:21:42 +00:00
markus-bonk b9a27a8fab Fix build issues macOS and msys2
Added #if USE_DECLSPEC_PROPERTY condition to control use of
__declspec(property). The -fdeclspec now is not needed to compile using
clang.

Removed use of the IS_INTRESOURCE() macro to the inline method bool
IsIntResource() as the former depends on Windows.h.
2022-01-28 12:21:42 +00:00
markus-bonk 87d7bdbd5e * PCB_EDIT_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Added full support for using a 3Dconnexion device in PCB_EDIT_FRAME. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

Use build option KICAD_USE_3DCONNEXION (default = ON) to control whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk aec7802fcf EDA_3D_VIEWER_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Full support for using a 3Dconnexion device in the 3D viewer has been added. Full 3D navigation is available for both the orthographic and perspective projections. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

ADDED: A build option KICAD_USE_3DCONNEXION (default = ON) has been added to the main CMakeLists.txt. The option controls whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk f61c798295 Fix compilation errors in Fedora pipeline. 2022-01-28 12:21:42 +00:00
markus-bonk c99a4f4d85 Include the required third party code for the SpaceMouse implementation
The commit only adds the headers and code required by the SpaceMouse
implementation to compile and link. This extract from the 3Dconnexion
SDK is added to the third party directory to allow developers to build without
needing to acquire a cmake enabled version.
2022-01-28 12:21:42 +00:00
markus-bonk cd82a927c2 TRACK_BALL: Allow two input devices to simultaneously pan & rotate
Instead of the mouse pan and drag algorithms calculating the new
position or rotation values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or rotate the view at the same time
without its change being undone by the mouse.
2022-01-28 12:21:42 +00:00
markus-bonk 27063688b3 CAMERA: Fix spelling of method MakeRayAtCurrrentMousePosition.
EDA_3D_CANVAS: Fix spelling of method getRayAtCurrrentMousePosition.
2022-01-28 12:21:42 +00:00
markus-bonk 5b9f56613e CAMERA: Make the CAMERA_FRUSTUM structure values for nw, nh, fw and fh consistent.
The CAMERA_FRUSTUM structure values for nw, nh, fw and fh to always mean width and height for both perspective and orthographic views instead of half-width and half-height in perspective.

The orthographic / perspective view toggle has been modified to keep the viewed plane at m_camera_pos_init * m_zoom the same dimensions in both projections.
2022-01-28 12:21:42 +00:00
markus-bonk 47603fbc76 Wx_view_controls: Allow two input devices to simultaneously pan & zoom
Instead of the mouse move and zoom algorithms calculating the new
position or scale values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or zoom the view at the same time
without its change being undone by the mouse.
2022-01-28 12:21:42 +00:00
Fabien Corona 8282130bbe PCB_calculator: use treebook 2022-01-27 20:54:57 +00:00
Tom Keddie 8c907f1fdc hotkeys: add missing function key strings 2022-01-27 17:20:52 +00:00
Mike Williams ecb32b1fb0 Eeschema: hover start from wire end should copy wire properties
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10128
2022-01-27 17:17:45 +00:00
alexfanqi 01f0aad7c0 Add riscv64 support for libcontext
modified to match function arguments different from upstream

Author: Andreas Schwab
2022-01-27 13:12:43 +00:00
jean-pierre charras 2345e09a12 Pcbnew, export svg: Fix incorrect saving of layer set. 2022-01-27 13:03:00 +01:00
Seth Hillbrand 9ab2eb391f Move delay selection out of UpdateUI
Calling actions from within UpdateUI can cause loops that crash or
substantially slow

Fixes https://gitlab.com/kicad/code/kicad/issues/10616
2022-01-26 16:05:40 -08:00
Seth Hillbrand b87e4efc68 Add additional buffer space around cell text buttons
The baseline -1 buffer works for some GTK themes but not others.  -3
appears to work for chunky themes like those used in KDE (and others).

Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2022-01-26 12:44:11 -08:00
jean-pierre charras 810a49ef1b Fix broken PDF plotter for arcs. 2022-01-26 20:15:17 +01:00
jean-pierre charras 8a17fb8d19 SCH_SEXPR_PARSER::parseArc(): fix a very annoying issue: each time the lib or
sch files are saved and reopened, 180 deg arcs were flipped.
This fix is a workaround, but avoid flipped arcs after saving/reopening these files.
2022-01-26 18:19:52 +01:00
Wayne Stambaugh 9af365b5b3 Fix broken environment variable substitution on Windows.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10303
2022-01-26 09:24:36 -05:00
Seth Hillbrand 2dc031ee34 Prevent auto-column sizing when editor opens
On GTK, some configurations will trigger a column resize, which will
close the current editor.  This blocks the column resize while the
editor is open, unless the resize continues, which indicates dragging of
the window edge

Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2022-01-25 17:59:15 -08:00
Thomas Pointhuber 744bc0bd18 altium: Fix pcb arc import using a hack with PCB_SHAPE as intermediate object
It would be nice to not use the workaround with PCB_SHAPE, but better than creating wrong geometries in the first place. This should be improved when I'm more in the mood to think about geometric.
2022-01-25 22:24:01 +01:00
Thomas Pointhuber 5a2f351f28 altium: Refactor shape based region parsing to make it reusable for footprint import 2022-01-25 21:54:25 +01:00
Seth Hillbrand b6ecbc596e Fix mistaken use of `m_width`
This is a protected var in Linux but doesn't exist in Mac/MSW.  We use
the new m_fieldsSize
2022-01-25 12:45:09 -08:00
jean-pierre charras f651e31965 Fix minor compil and Coverity warnings. 2022-01-25 12:52:13 +01:00
jean-pierre charras 6e9516925c French translation update 2022-01-25 09:14:05 +01:00
Seth Hillbrand efb323d57d Another stab at https://gitlab.com/kicad/code/kicad/-/issues/5690
This time, ensure that the grid is increased and the main form gets an
event
2022-01-24 16:30:30 -08:00
Seth Hillbrand a054a46136 Force a size event to avoid multiple yields
When the grid editor is shown, we also want to ensure that the grid gets
resized to account for the new editor.  Queuing the event will ensure
that happens after the editor is emplaced in the grid

Fixes https://gitlab.com/kicad/code/kicad/issues/5690

(cherry picked from commit fddfce4fb1)
2022-01-24 15:32:17 -08:00
Wayne Stambaugh 8426ffa238 Fix wxWidgets invalid string specifier assertion.
(cherry picked from commit ab184ba9f3)
2022-01-24 15:50:40 -05:00
Seth Hillbrand be5bb8c4bd Enforce strictly weak ordering in sheets
This ensures that irreflexivity is given in sort ordering.  This may
have been triggering issues in MacOS when adding sheets

Fixes https://gitlab.com/kicad/code/kicad/issues/10557

(cherry picked from commit a1615cce7e)
2022-01-24 10:41:21 -08:00
Seth Hillbrand 175c4fe67c Allow time to update editor
On GTK, the full editor needs to be shown and, for some systems, the
editor will not show correctly.  By yielding we should allow the time to
recalculate sizes for the editor in the grid

Fixes https://gitlab.com/kicad/code/kicad/issues/5690

(cherry picked from commit 871556ebda)
2022-01-24 09:58:10 -08:00
Mike Williams 20788897ee Gerbview: display Start and End position of drawable items
Originally written by Tarun Johar.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8426
2022-01-24 08:40:49 -05:00
Mike Williams 6ddd5ec37f Gerbview: Add menu item to open files with autodetection
Needs an icon at some point
2022-01-24 08:40:49 -05:00
Mike Williams 8692014691 Gerbview: consolidate some dialog code
Preparing also for a third usage where we autodetect the file type
2022-01-24 08:40:49 -05:00
Mike Williams db407a1c0b Gerbview: clean up loading files to prepare for more autodetection 2022-01-24 08:40:49 -05:00
Mike Williams eee20f9f67 Gerbview: reduce redundant file loading code 2022-01-24 08:40:49 -05:00
Mike Williams 4140ab118e Gerbview: remove extra linebreaks from errors messages 2022-01-24 08:40:49 -05:00