Commit Graph

7273 Commits

Author SHA1 Message Date
jean-pierre charras 07e1278c05 fix incorrect calculation EDA_TEXT::GetTextBox() for empty texts.
It generates KiROUND alert.
2022-02-04 19:22:33 +01:00
Marek Roszko ca7840334c Mark some limits as constexpr
gcc doesn't need it and computes during compile regardless, but experimenting in godbolt, both clang and MSVC actually do need it or else it's partially computed at runtime
2022-02-04 07:50:13 -05:00
jean-pierre charras ac7cbcce61 WX_GRID: highlight the selected cell after selection by tab or arrow keys.
Fixes #9290
https://gitlab.com/kicad/code/kicad/issues/9290
2022-02-04 12:36:27 +01:00
Jeff Young 7dadc9d2f0 Fix text bounding boxes. 2022-02-03 23:07:41 +00:00
Jeff Young b9eb3e9b05 Be more explicit about string conversions. 2022-02-03 23:07:41 +00:00
Seth Hillbrand 168ad58eef Convert strings to wide when using wxString routines
WxString does not allocate space for wide strings needed during
conversion unless the string is explicitly wide.  This can cause buffer
over/underflow

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

(cherry picked from commit 7601a3385f)
2022-02-03 13:08:33 -08:00
jean-pierre charras ff277a36af EDA_SHAPE::MakeEffectiveShapes(): protect against empty polygons.
Fixes #10713
https://gitlab.com/kicad/code/kicad/issues/10713
2022-02-02 20:40:54 +01:00
Jeff Young 0634cf261a Don't try to move bounding box caches. 2022-02-01 21:55:09 +00:00
Seth Hillbrand 098e8f7d9b Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1.

Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
Alex 4c4089e836 Allow overlay scrolling on GTK, except for GAL canvases.
This prevents glitches when both scrollbars
are visible and scrolling to the end.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10559

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9988
2022-01-31 18:45:47 +03:00
Roberto Fernandez Bautista 8393e02524 text boxes: remember to add the original newline characters back in!
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10665
2022-01-30 14:35:55 +00:00
Roberto Fernandez Bautista 6cf170c2c9 Text boxes: Return full word even if it doesn't fit in the column width
It does mean that the text now can be outside the text box, but this is
better than an infinite loop.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10668
2022-01-30 14:35:55 +00:00
Marek Roszko 7ec326c003 Fix compilation error 2022-01-28 20:19:42 -05:00
Seth Hillbrand 16e802aff4 Don't count zero-length as duplicate
We were checking for duplicate tracks by looking to see if the two
tracks had two shared points.  A null track always matched this case,
which removed the valid track.  We solve this by avoiding null tracks in
the duplicate checker.  They are removed separately in the null track
stage.

This also fixes a GTK-specific tree issue where we require the
BeforeReset()/AfterReset() calls instead of Cleared() to prevent GTK
from dereferencing a parent after freeing

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

(cherry picked from commit 8753051db6)
2022-01-28 16:34:34 -08:00
Davide Gerhard ea9f960cc1 cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
Jeff Young c6a8100d46 Schematic and symbol text boxes.
Also fixes some plot bugs with arcs.

Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.

Fixes https://gitlab.com/kicad/code/kicad/issues/5017
2022-01-28 21:38:15 +00:00
Jeff Young 3409783d9f Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
2022-01-28 21:38:15 +00:00
Jeff Young 0036f44e37 Support (and save/recall) zoom in/out in Custom Rules editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/5796
2022-01-28 21:38:15 +00:00
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
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
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 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
Tom Keddie 8c907f1fdc hotkeys: add missing function key strings 2022-01-27 17:20:52 +00: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
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
jean-pierre charras f651e31965 Fix minor compil and Coverity warnings. 2022-01-25 12:52:13 +01:00
Wayne Stambaugh 8426ffa238 Fix wxWidgets invalid string specifier assertion.
(cherry picked from commit ab184ba9f3)
2022-01-24 15:50:40 -05:00
Marek Roszko 8030bf1cc4 Implement use of the kicad nightly icon where needed 2022-01-23 09:21:07 -05:00
jean-pierre charras 1b42152ba0 Teardrops: store parameters in BOARD_DESIGN_SETTINGS. 2022-01-23 10:57:08 +01:00
Jeff Young a187076438 Use natural order sorting for FP libraries.
Fixes https://gitlab.com/kicad/code/kicad/issues/10349
2022-01-22 12:16:07 +00:00
Jeff Young de49f5090d Formatting (and auto reduction). 2022-01-22 12:16:07 +00:00
Marek Roszko 65d4d6eada Fix typo in comment 2022-01-22 00:07:07 -05:00
Marek Roszko 3ede5f42be Set curl to use the Windows cert store 2022-01-21 22:09:34 -05:00
Jeff Young 09d0f6e17c Map zone layers before checking their visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/10509
2022-01-21 23:26:10 +00:00
Jeff Young d5a2059c21 Error messages for zone merging.
Also fixes a bug where zones meeting at a point would get merged
resulting in a self-intersecting zone.

Also fixes a bug where undo would not be handled correctly when zones
could not be merged.

Fixes https://gitlab.com/kicad/code/kicad/issues/10466
2022-01-21 19:55:57 +00:00
Jeff Young 6dc8cd3f18 Add FreeType version to version info.
Fixes https://gitlab.com/kicad/code/kicad/issues/10393
2022-01-21 13:21:21 +00:00
jean-pierre charras 4ffea8aae4 code cleaning. 2022-01-21 14:10:26 +01:00
jean-pierre charras 0bc5cb33ed Fix a few issues in plotting code. Fix bug in EDA_ANGLE::IsCardinal()
Fixes #10547
https://gitlab.com/kicad/code/kicad/issues/10547
2022-01-21 12:35:58 +01:00
Jeff Young c8a50d9b50 Remove unit-less angles from VECTOR2I/D APIs. 2022-01-20 23:58:20 +00:00
Jeff Young 4eac8d7c66 Remove unit-less angles from geometry lib APIs. 2022-01-20 21:10:04 +00:00
Jeff Young ba3a810e55 Prefer EDA_ANGLE to naked degrees. 2022-01-20 21:10:04 +00:00
Jeff Young 4a05b36bc6 Prefer EDA_ANGLE to naked radians. 2022-01-20 21:10:04 +00:00
Jeff Young 854987f663 Remove unit-less angles from geometry manager APIs. 2022-01-20 21:10:04 +00:00
Jeff Young fbab335128 Retire DPOINT and DSIZE. 2022-01-20 21:10:04 +00:00
Jeff Young 67eb3116ce Remove DPOINT from drawing sheet stuff. (Use VECTOR2D instead.) 2022-01-20 21:10:04 +00:00
Seth Hillbrand 881af75029 Always use the project directory for default save
Fixes https://gitlab.com/kicad/code/kicad/issues/10478

(cherry picked from commit dd7029ea07)
2022-01-20 11:51:45 -08:00
Seth Hillbrand 4c8f556b80 Prevent UI updates from changing zoom selection
The zoom selection should only change when requested by the user, not in
response to UI updates.  This can cause unexpected zoom shifts when the
calculated zoom is within a range of one of the presets.  It also adds
unneeded calls during the UI update cycle

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

(cherry picked from commit 6810479a19)
2022-01-20 10:10:06 -08:00