Jeff Young
941d7f94ad
Use safer UTF8 conversion routines to prevent crashes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10982
2022-02-26 19:03:00 +00:00
qu1ck
b06c2585d9
Change GetEffectiveTextShape() to return outline
...
instead of triangulated polygon
2022-02-26 00:55:07 +00:00
Seth Hillbrand
a7ea868282
Avoid overflow in textbox
...
Count() returns unsigned values. Since, we subtract 1 from this value,
if the count is 0, we will underflow the unsigned value, creating an
extremely large value that we multiply by the interline spacing.
(cherry picked from commit d29d981784
)
2022-02-25 11:14:53 -08:00
Jeff Young
107067ad05
On-the-fly translations for Grid and Zoom menus.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10961
2022-02-25 17:36:35 +00:00
Jeff Young
6d8507d44f
Formatting.
2022-02-25 17:36:35 +00:00
Jeff Young
a29968fa91
Make sure bitmap fallback is only used for non-cached text.
...
Also fixes backwards vertical justification for bitmap text.
Fixes https://gitlab.com/kicad/code/kicad/issues/10956
2022-02-24 18:16:45 +00:00
Jeff Young
d465eb6425
ADDED: automatic zone refilling.
...
This is for the out-of-box experience for novice users. It is presumed
that folks with larger more complicated boards will turn it off.
Fixes https://gitlab.com/kicad/code/kicad/issues/6413
2022-02-24 18:16:45 +00:00
Jeff Young
cb16ad7557
Debounce layer visibility buttons and fix issues with FP Editor.
2022-02-23 17:52:08 +00:00
Jeff Young
41f6e634c6
Partially integrate grid snapping with constraints.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10941
2022-02-22 22:19:55 +00:00
Marek Roszko
6420bd777f
Sprinkle some wxT
2022-02-21 18:49:36 -05:00
Marek Roszko
0b46c75197
Simplify locale data path setting...
2022-02-21 13:08:29 -05:00
Marek Roszko
ad251b7b8c
Simplify KICAD6_TEMPLATE_DIR default
...
The search_stack method is bugland
Fix https://gitlab.com/kicad/code/kicad/-/issues/10119
2022-02-21 12:22:23 -05:00
Jeff Young
47315864c4
EEschema features need to process ~ for empty string; not EDA_TEXT.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10918
2022-02-20 20:54:06 +00:00
jean-pierre charras
d2cf68bcdd
Plotters: add plot Arcs using EDA_SHAPE or center, start point and end point.
...
It avoid trying to calculate arc angles (start, end or arc angle) that
frequently create issues due to reverse Y axis, plot mirrored and/or
angle normalization with different criteria.
Fixes #10914
https://gitlab.com/kicad/code/kicad/issues/10914
2022-02-20 17:17:20 +01:00
Thomas Pointhuber
8ef7252330
altium: Don't use string concatenation for paths pointing in the compound file
...
* std::vector do not need to be split apart again
* supports backslash in footprint names
2022-02-19 16:46:20 +01:00
Jeff Young
c27ec5cae1
Don't paste into hidden columns.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10168
2022-02-18 17:12:46 +00:00
Jeff Young
9fb3032c77
Fix Mac button-text grid control spacing.
2022-02-17 12:42:10 +00:00
jean-pierre charras
0ed3bba108
Fix a wxWidgets alert
2022-02-17 10:06:19 +01:00
qu1ck
a041492736
SWIG mappings for all shapes
2022-02-16 20:58:52 +00:00
Jeff Young
d9507dbaf4
We handle variable replacements elsewhere.
...
The markup parser needs to ignore them so they get rendered when we're
not doing replacement.
2022-02-15 23:05:22 +00:00
Jeff Young
8e26946567
Don't shrink progress reporter when message changes; only grow.
2022-02-15 19:19:02 +00:00
Jeff Young
d1b8b68c68
No need to partition font glyph triangulation.
2022-02-15 19:19:02 +00:00
Roberto Fernandez Bautista
1b6fe615e5
Don't lock OpenGL context twice
...
Use GAL_DRAWING_CONTEXT as this unlocks the context in its destructor,
so that when an exception is thrown inside the `try` block, it should
automatically unlock before we switch backend.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10840
2022-02-13 21:09:54 +00:00
jean-pierre charras
f8d6dd1efd
Gerbview: fix a long standing issue: negative objects are now correctly printed.
2022-02-12 11:44:34 +01:00
dsa-t
68655540eb
Clamp cursor to limits of coordinates representation
...
Also improves large distance handling.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8846
2022-02-11 16:42:52 +00:00
Werni
946f62d949
Add separate wildcard for OrCAD netlists
2022-02-11 09:24:20 +00:00
Jeff Young
082c6f5bd6
Make sure plotter uses default font when specified.
2022-02-10 20:33:06 +00:00
Jeff Young
ca56de7816
Show DRC overflows in both tab titles and number badges.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10617
2022-02-09 17:04:32 +00:00
Ola Rinta-Koski
44c93e48e9
Markup parser fix: subscript/superscript/overbar handling
2022-02-08 18:50:53 +00:00
Jeff Young
f2440978ec
Fix some issues with ruler drawing.
2022-02-08 15:59:48 +00:00
Jeff Young
3b5474f190
Don't punt on TrueType char thickness; analyze it.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10740
2022-02-08 14:10:37 +00:00
Seth Hillbrand
d0d472f39d
Hide icon option when platforms disable
...
Mac and some Linux configs disable menu icons. We shouldn't offer the
option when the system does not support this as it leads to confusion
Fixes https://gitlab.com/kicad/code/kicad/issues/10425
2022-02-07 10:28:07 -08:00
Jeff Young
5ce559176d
Overhaul the font metrics calcs for overbar, italics and bboxes.
2022-02-07 17:36:40 +00:00
jean-pierre charras
2485648a54
Fix typo in a copy/paste and a minor compil warning
2022-02-07 17:32:19 +01:00
jean-pierre charras
bc710e3d97
Rework on commit 6a9607bto fix non printable char codes
2022-02-07 12:37:36 +01:00
jean-pierre charras
a37a7aa1d5
move a misplaced include
2022-02-07 08:22:43 +01:00
Marek Roszko
1f8d101b1d
Fix color4d distance return type
2022-02-06 21:05:44 -05:00
jean-pierre charras
b042e8cc41
outline_decomposer.cpp: fix a typo from commit 0a5ddb8
...
stroke_font.cpp better fix for commit 6a9607b
2022-02-06 18:09:30 +01:00
jean-pierre charras
6a9607b76f
Fix crash when trying to draw a text with non printable chars.
...
Fixes #10772
https://gitlab.com/kicad/code/kicad/issues/10772
2022-02-06 08:34:19 +01:00
Marek Roszko
d9c04da407
Sprinkle in some make_unique
2022-02-05 21:26:36 -05:00
Marek Roszko
0a5ddb8d40
Add some vector reservations
2022-02-05 21:12:29 -05:00
Marek Roszko
41f54349a5
Replace inserts/push_backs with emplace in some spots
2022-02-05 19:53:31 -05:00
Marek Roszko
18eda73f60
Initialize m_face in constructor PVS V730
2022-02-05 11:36:02 -05:00
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
jean-pierre charras
b084115a9e
BITMAP_BASE::DrawBitmap(): fix position of the clipping area when using matrix transform.
...
Fixes #10525
https://gitlab.com/kicad/code/kicad/issues/10525
2022-01-20 16:15:39 +01:00
Jeff Young
3ba89f50ef
Maybe, just maybe, fix LibEdit arc parsing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10455
2022-01-19 22:22:18 +00:00
Jeff Young
9d5322cfdf
Move rotation angle increments to UNIT_BINDER and EDA_ANGLE.
2022-01-19 15:15:33 +00:00
Jeff Young
0091c76a6f
Excise deci-degrees from UNIT_BINDER.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10495
2022-01-19 00:10:32 +00:00
Jeff Young
a808e2396b
Run font/laguage checks only on Mac.
2022-01-18 14:19:57 +00:00
Jeff Young
8445783216
Fix backwards arcs in legacy LIB_ARCs.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10455
2022-01-18 14:08:47 +00:00
Jeff Young
d4ff829c26
Trace logging for fonts.
2022-01-18 14:08:47 +00:00