Commit Graph

8471 Commits

Author SHA1 Message Date
Jon Evans c5cdff6213 Fix crash launching editors with additional command line arguments 2023-12-04 12:22:26 -05:00
Wayne Stambaugh e1c0bddff3 Make paste special dialog a bit more user friendly.
Set a default control so that the escape key closes the dialog.

Select the OK button after the user selects an annotation option.  This
allows for keyboard navigation of the dialog and saves an extra mouse
move and click to when choosing an annotation setting.

(cherry picked from commit ef2f72697b)
2023-12-03 13:45:51 -05:00
Wayne Stambaugh 9fdda223f5 Fix broken symbol reference designators on paste special.
It appears that in our zeal to prevent file changes when saving shared
schematics, we (I) clobbered saving relative symbol instance data paths
to the clipboard.  This has be restored along with setting the correct
symbol unit for relative clipboard paths.

Fixed a serious issue with KIID_PATH::MakeRelativeTo() where the original
path was not restored when the incremental KIID object test fails.  This
also included a minor optimization using the actual KIID object for
comparison instead of converting it to a string and then comparing the
string.

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

(cherry picked from commit 6dc25f4775)
2023-12-01 15:30:51 -05:00
Jon Evans 27434e38f9 Database: handle more possible datatype exceptions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16090


(cherry picked from commit 44374c661f)
2023-11-30 22:26:02 +00:00
jean-pierre charras 1740aeca5e "Kicad PROJECT_ARCHIVER: do not store twice files with extension .gm?"
Better fix than commit 8255e091f0.
It also fixes duplicates for ext like *.g1
From master branch.
2023-11-21 15:51:19 +01:00
jean-pierre charras 8255e091f0 Kicad PROJECT_ARCHIVER: do not store twice files with extension .gm?
Files with extension .g?? and .gm? were stored in zip archive. but
*.gm? files also matches .g?? files so they were stored twice.
2023-11-19 19:58:20 +01:00
Alex Shvartzkop e2d8d53a10 Fix bad outline font glyphs when ligatures apply.
(cherry picked from commit b108e7058b)
2023-11-18 08:19:48 +03:00
Alex Shvartzkop 31e79ef54f PDF plot: match mirror state between hidden and plotted text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16066
2023-11-12 00:48:18 +03:00
Alex Shvartzkop 443da9943a SVG plotter: fix hidden text orientation when plot is mirrored.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15422

(cherry picked from commit 556120554e)
2023-11-10 00:27:39 +03:00
Alex Shvartzkop 2263535d3a Add Python API compatibility for GetEffectiveTextShape. 2023-10-25 00:03:28 +03:00
Alex Shvartzkop 53fe2a7203 Set UNPACK_ALIGNMENT properly for RGB bitmaps.
(cherry picked from commit 00904e8e23)
2023-10-24 06:59:53 +03:00
Alex Shvartzkop 480dfafb4f Fix variable shadowing.
(cherry picked from commit 0e4553b1fa)
2023-10-24 04:26:02 +03:00
Alex Shvartzkop f5e13c5ceb Fix up ccc29e9776 for masked images.
(cherry picked from commit 977912dcd5)
2023-10-24 04:00:30 +03:00
Alex Shvartzkop b461a3b64d OpenGL: Improve logic when bitmap cache memory is exhausted.
Don't remove the front entry, as it will likely be needed for the next bitmap.
Instead, implement neuristics based on access times.

(cherry picked from commit 71d0c7f6af)
2023-10-24 03:42:45 +03:00
Alex Shvartzkop 75c758e5f4 Improve bitmap caching performance.
(cherry picked from commit ccc29e9776)
2023-10-24 03:42:24 +03:00
Seth Hillbrand 6c91a3022e Fix stdlib assertion
The assertion checks if an element has been added to vector.  Since we
are merely manipulating the allocated data, the number of elements does
not change and the assertion check fails.  Using the pointer to the
allocated data is a cleaner/clearer way of accomplishing this
2023-10-23 12:54:31 -07:00
jean-pierre charras 82a1b02b4a Plotters (especially DXF) add more precision when plotting arcs (and others)
- in DXF coordinates were using 6 digits for coordinate mantissa:
this is not enough for coord in inches. Now use 16 digits
- Arc( VECTOR2I& aCentre, EDA_ANGLE& aStartAngle, EDA_ANGLE& aEndAngle, ...)
was using integers for coord.
This creates significant errors for start point and end points of the arc.
Now the center is given in double, and its position is calculated from angle end points
(and radius) to do not generate a position error for these end points
(previously the error could be 20 ... 50 nm)
From master branch
Fixes #15056 https://gitlab.com/kicad/code/kicad/-/issues/15056
2023-10-23 17:59:31 +02:00
Jeff Young e99a2fbc56 Score initializing is done by LIB_TREE_NODE::ResetScore().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15875

(cherry picked from commit bc0fe74f72)
2023-10-23 13:28:14 +01:00
Alex Shvartzkop cbf1b2af47 HPGL plotting: fix random lines connecting to circles.
(cherry picked from commit 45791ff8d6)
2023-10-22 13:56:21 +03:00
Alex Shvartzkop 4f5fca4e67 HPGL plotting: write rects as polygons to prevent always filling.
(cherry picked from commit d9c123b1ec)
2023-10-22 13:55:54 +03:00
Alex Shvartzkop e0158a8ed7 DXF plotting: write zero-sized rects and circles as points.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15862

(cherry picked from commit 3e82e59c24)
2023-10-22 13:55:54 +03:00
Alex Shvartzkop 40e7ba67d1 PDF plotting: fix zero-sized or too thick rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15862

(cherry picked from commit 843bd4f79c)
2023-10-22 13:22:42 +03:00
jean-pierre charras 58a6eb653b protect protect RC_ITEM::SetItems() against null pointer.
Fixes #15865
https://gitlab.com/kicad/code/kicad/-/issues/15865
2023-10-12 14:56:56 +02:00
jean-pierre charras f1c570d793 OPENGL_GAL: ensure 0 sized rect with thickness is shown (already shown by Cairo)
From master branch
Fixes #15850
https://gitlab.com/kicad/code/kicad/-/issues/15850
2023-10-11 20:08:15 +02:00
Marek Roszko 832af39f34 Unbind ACTION_MENU events in destructor
(cherry picked from commit d801037c93)
2023-10-11 00:17:03 +00:00
jean-pierre charras 87c8688f70 genDrillMapFile: reduce the pen width used to plot oval shapes (better look)
From master branch
2023-10-06 09:33:57 +02:00
Jeff Young 36c5719535 Fix logic screw-up in earlier commit.
(cherry picked from commit f2c0f4c87f)
2023-10-04 18:51:37 +01:00
Jeff Young 1f870bf76c Handle justification when hit-testing fields.
This steals the algo used in SCH_PAINTER to get the right coords
for the text.

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

(cherry picked from commit 6fbbf981f0)
2023-10-04 18:51:33 +01:00
Jeff Young c3446f9c2d Handle flipped state when checkging item against viewport.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15768

(cherry picked from commit 3c1478367f)
2023-10-04 18:48:42 +01:00
Marek Roszko 6096b5c4d8 Unbind event handlers in the DIALOG_SHIM destructor to prevent late event crashes
Fixes KICAD-1XF


(cherry picked from commit 3a567a3ae1)
2023-10-01 21:55:36 +00:00
Jon Evans 3533e8b119 DbLib: support columns with numeric data
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15662

(cherry picked from commit 6f9af10912)
2023-09-30 10:27:34 -04:00
Jeff Young c895816cb0 Fix arg parsing in ExecuteFile.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15326

(cherry picked from commit 0f94b467ba)
2023-09-30 13:34:26 +01:00
Jeff Young 9f814c0f6a Repair standalone application 3D plugin path resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15322

(cherry picked from commit 04214983cf)
2023-09-30 13:34:09 +01:00
Jeff Young e14aef9bd5 Correct path of pcb drawing sheet file on saveAs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15551

(cherry picked from commit 722a90213c)
2023-09-30 13:31:16 +01:00
Josue Huaroto bf2e34f32e Change variable substitution for paths in Windows.
(cherry picked from commit 74695b0995)
2023-09-29 12:10:07 -07:00
Seth Hillbrand 5f16f4ab99 Focus back to the main window after dialog
Mouse actions would focus the window but we explicitly set it here to
allow keyboard shortcuts

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

(cherry picked from commit b2ef620ea6)
2023-09-29 11:06:44 -07:00
Seth Hillbrand 686048dcce Be smarter about releasing lockfiles
If KiCad crashes or exits without deleting the lockfile, don't show the
warning message unless we are not the one who locked it or there are
other KiCad instances running locally.

This should catch 99% of the cases where the message is shown
incorrectly.  There may be some corner cases where the lock file is
created on a network drive using two different machines with the same
name and same user but these cases should be (famous last words)
sufficiently rare as to not be observed in practice

(cherry picked from commit 7fe83993cf)
2023-09-29 11:02:42 -07:00
Marek Roszko 7f1b891679 Save 470KB by not re-initializing lineTypeNames over a thousand cpp files it leaks into
I saved a bunch of money on my car insurance by switching to Extern


(cherry picked from commit 9deff07ca6)
2023-09-25 02:31:46 +00:00
Seth Hillbrand d3a8cb84a6 Make LIB_TREE_NODE sort irreflexive
std::sort requires explicit ordering of all elements.  It does not allow
for equality in its output

(cherry picked from commit 5c1b15f8e3)
2023-09-20 13:48:43 -07:00
Alex Shvartzkop c11ae8bd02 Fix a bug in RebuildBezierToSegmentsPointsList.
(cherry picked from commit 9f63820ed4)
2023-09-11 10:05:59 +03:00
Josue Huaroto 8f259211e7 Change behavior of ZOOM_FIT_ALL and ZOOM_FIT_OBJECTS for PCB_EDITOR
(cherry picked from commit 91d8dabca3)
2023-09-06 16:56:27 +01:00
Josue Huaroto 0d9d8c28f1 Flip Viewport when Flip board is enabled
(cherry picked from commit a8e18e2d8c)
2023-09-06 16:56:01 +01:00
Jeff Young 4d46e0ceb7 Include underscore in word chars.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14779

(cherry picked from commit 0dddb27408)
2023-09-06 16:33:02 +01:00
jean-pierre charras 955313e97d GAL_OPTIONS_PANEL: replace 2 wxSpinCtrlDouble to try to fix a locale issue.
Sometimes the grid thickness setting does not work, depending on some locale setting.
Core developers are not able to reproduce this issue related to a double conversion.
So these wxSpinCtrlDouble are replaced by a wxSpinCtrl (using ints) and a wxChoice.

From master branch
2023-09-05 18:56:24 +02:00
Jeff Young 480a9ac77d Implement undo/redo around Pad Edit Mode changes.
(cherry picked from commit 69a1b30b8a)
2023-09-02 11:18:34 +01:00
jean-pierre charras 07e13c51d1 UNIT_BINDER: allows more room to show values (especially inches need room)
Fixes #15539
https://gitlab.com/kicad/code/kicad/-/issues/15539
2023-08-30 09:14:28 +02:00
jean-pierre charras f9b59b4fdf PANEL_SETUP_SEVERITIES: fix a missing init (m_severitiesPage) creating a crash.
PANEL_SETUP_SEVERITIES::ImportSettingsFrom(): ensure the option to set
actually exists before setting it.
2023-08-29 10:56:40 +02:00
Marek Roszko 7ca59e24c6 Force fontconfig to look at the correct path for fonts.conf on windows
(cherry picked from commit 208d146a03)
2023-08-26 17:59:47 +00:00
Marek Roszko e1a2d60672 Don't call FcInitLoadConfigAndFonts after FcInit() already happened
We are only the default global FcConfig created by calling FcInitLoadConfigAndFonts inside FcInit().
Calling FcInitLoadConfigAndFonts does nothing but creating another FcConfig option that never gets disposed or used because we use the FcConfig functions with null


(cherry picked from commit 53bf7b71c6)
2023-08-26 17:59:28 +00:00
Jeff Young f3dd5b73f8 TestDanglingEnds needs to test sheet pins as well.
Also fixes a bug where zooming doesn't get a redraw until mouse moves.

Also fixes a couple of bugs where dangling markers on SCH_SHEET_PINs
and SCH_HIERLABELs weren't getting drawn.

Also simplifies drawing algorithm by removing aesthetic offset (which
wasn't implemented when pin is drawn as part of selection VIEW_GROUP).

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

(cherry picked from commit c8e8b71198)
2023-08-20 18:44:40 +01:00