Commit Graph

8306 Commits

Author SHA1 Message Date
jean-pierre charras e900e472ce Fix compil and Coverity warnings 2023-01-22 09:40:09 +01:00
Jon Evans 3a9ef02fdf Clean up handling of selection changes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13620
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13609
2023-01-21 17:37:29 -05:00
jean-pierre charras f14e24d2cf PDF_plotter: fix crash when the font used to plot texts is not specified.
(In this case the default Kicad font must be used)
Fixes #13615
https://gitlab.com/kicad/code/kicad/issues/13615
2023-01-21 20:12:30 +01:00
Marek Roszko b2421c7d9f Fix tiny bug in double 2 string formatting
- I forgot to handle the trailing dots when I added the fmt variant
- UIDouble2Str (the original) lacked the comma check
- Add unit test lol
2023-01-21 13:54:52 -05:00
Chris Morgan 2b128c79f2 sprintf -> snprintf to silence some compiler warnings 2023-01-21 18:39:51 +00:00
Seth Hillbrand 3465fe3e50 Allow variable recursion
Simple recursion of variable expansion allows for multiple use cases in
portability of designs.  This also includes basic prevention of
recursion loops

Fixes https://gitlab.com/kicad/code/kicad/issues/10398
2023-01-20 16:44:48 -08:00
Seth Hillbrand 9986eb5cf6 Don't show error when added new paths
Empty paths should be discarded instead of throwing an error about
missing data
2023-01-20 16:43:16 -08:00
Seth Hillbrand d8ac53d7b4 Fix 3D model resolution for older boards
Older boards use older 3d model environmental variables.  We need to
support both older environmental variables (if the user has them) as
well as updated environmental variables (if the user only has a single
3d model path)

This updated the environmental resolver to look first in the named
location and then substitute the new location if the old location is not
defined in the environment

Fixes https://gitlab.com/kicad/code/kicad/issues/10674
2023-01-20 15:59:23 -08:00
Seth Hillbrand e6dbca051c Force realtime connectivity on
The pressure relief valve was not useful for common work patterns as it
forced the recalculation on many common actions such as bus expansion.
This caused it to actually feel slower than with the pressure relief
valve off.

For most schematics, realtime is now fast enough to not need the valve
and for those that are extremely complex, removing the valve helps this
run more predictably
2023-01-20 15:17:57 -08:00
Seth Hillbrand 5347fbdbb1 Update languages to be installed for release
Languages that have been abandoned or are not yet sufficiently
translated are not shipped with release.  The po files and existing
translations remain and will be re-enabled post release for future
development
2023-01-20 13:23:13 -08:00
Jeff Young b0ba898a27 nullptr safety (necessary during startup before project exists)
Fixes https://gitlab.com/kicad/code/kicad/issues/13608
2023-01-20 19:28:18 +00:00
Jeff Young 2367c5cf1b Fix another early return while evaluating text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/13610
2023-01-20 19:20:15 +00:00
Jon Evans 6cce99e0d0 Support showing Value field in symbol chooser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13527
2023-01-19 22:14:10 -05:00
Seth Hillbrand da1707d5ba Place hidden PDF text behind words better
Rather than hiding a single line at once, we align each word in the
string with the approximate location of the output word.  This allows
better selecting text in the output pdf

Fixes https://gitlab.com/kicad/code/kicad/issues/12159
2023-01-19 15:53:46 -08:00
Mike Williams 7ab651f078 Common: make grid prev/next wrap
Consistent with our other keys like change track and via sizes.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9051
2023-01-19 11:47:03 -05:00
kliment 0e04c4b1da Add librarian credits 2023-01-19 16:28:31 +00:00
Wayne Stambaugh 774f3f9794 Use wxMessageDialog in IsOK() on GTK builds.
wxRichMessageDialog does not have the same appearance as the native
message dialogs on GTK builds so they look completely out of place.
2023-01-19 08:28:48 -05:00
Jeff Young 47ae8bdb86 Fix duplicated message. 2023-01-19 11:01:22 +00:00
Seth Hillbrand 7e5a2450b8 Move multiple wxMessageBox to DisplayErrorMessage
Also provide protection for headless running in multiple callsites

Fixes https://gitlab.com/kicad/code/kicad/issues/13575
2023-01-18 16:54:01 -08:00
Jeff Young ae55b1581e Use error message routine that checks for headless mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/13575
2023-01-19 00:19:00 +00:00
Dag Lem cff0560088 Eagle schematic import: Handling of escaped text 2023-01-18 12:33:36 +00:00
Jeff Young 3af9c658e6 Don't specify fonts in wxFormBuilder. It only leads to pain.
Fixes https://gitlab.com/kicad/code/kicad/issues/13547
2023-01-18 12:28:07 +00:00
Jeff Young f399dc0c3a Nullptr safety. (Sentry KICAD-4F) 2023-01-18 01:16:57 +00:00
Jeff Young 26c821962f Simplify and regularize text variable substitution architecture.
EDA_ITEMs are responsible for giving their parent a crack at it if
they failed to resolve it.  This recurses all the way up to the schematic/
board, and then to the project.

Cross-reference handling is also move to the EDA_ITEMs.  It must be done
before bubbling up so that we don't end up in loops.  (The aDepth parameter
will break the loop, but without having done anything useful.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-17 17:05:41 +00:00
Mike Williams 369c0efade Bitmaps: respect source DPI
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13565
2023-01-17 11:20:17 -05:00
Jeff Young ea1d7c5d97 Update Eagle imported variable mapping to better match Eagle output.
Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-17 13:43:47 +00:00
Jeff Young 8ac0543a5e Try a bigger hammer to keep wxFormBuilder from messing up grid fonts.
Fixes https://gitlab.com/kicad/code/kicad/issues/13547
2023-01-17 13:41:53 +00:00
Wayne Stambaugh 7361414f4c Fix GCC build issue on Linux. 2023-01-17 07:59:09 -05:00
Marek Roszko 1edf84d756 More wxS ugh 2023-01-17 07:43:04 -05:00
Marek Roszko d2c0f5fc2a More wxSing 2023-01-16 23:14:38 -05:00
Marek Roszko ac94995f70 Some more wxS 2023-01-16 19:07:50 -05:00
aris-kimi b1308d21c3 Calculator eseries, remove trailing spaces from 3R and 4R 2023-01-16 17:18:21 +00:00
Jeff Young 9315e885ee Substitute variables in imported symbol text.
Also allows mulit-line text items to be imported.

Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-16 16:01:45 +00:00
JamesJCode 3d6045a7c8 Supress wxLocale warnings when no matching locale found when setting default locale on MacOS
Re-fixes warning appearing in https://gitlab.com/kicad/code/kicad/-/issues/13371#note_1238532117
2023-01-16 14:12:16 +00:00
Jeff Young 62649b868c Ensure good fonts in grid headers.
Also moves rendering to a flat look for headers (instead of a beveled
border).

Fixes https://gitlab.com/kicad/code/kicad/issues/13547
2023-01-16 02:47:14 +00:00
Marek Roszko 789db0cecb Some more wxS 2023-01-15 21:32:23 -05:00
Marek Roszko 57c66a50ac Add some missing wxS wraps 2023-01-15 20:24:29 -05:00
Jeff Young ca1fb732c8 Share Eagle var substitution between board and schematic importers.
Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-15 22:27:19 +00:00
Roberto Fernandez Bautista 355e817302 Move DefaultTransform definition to transform.cpp, so it can be shared 2023-01-15 19:17:51 +01:00
jean-pierre charras 96a0bd556e Pcb calculator: fix not working calculation in E Series.
Fixes #13519
https://gitlab.com/kicad/code/kicad/issues/13519
2023-01-14 15:36:00 +01:00
Simon Richter dc9aaf7844 Fix mismatched deallocation
The strings are allocated via strdup() -> malloc(), and need to be freed
with free(), the array is allocated with operator new[], and needs to be
deallocated with operator delete[].
2023-01-13 14:48:26 +01:00
James Jackson 8f2f53192b On MacOS, ensure the application locale is set to the system default
Fixes #11046
2023-01-12 21:39:08 +00:00
Seth Hillbrand a5e6f11682 Fix crash when closing non-modal 2023-01-12 13:21:22 -08:00
Seth Hillbrand fa91d906d0 Fix event blocker on GTK
We block events when a modal window is active.  But detecting when the
modal window is closed is harder on GTK than just counting modal closes
because the modal flag can sometimes be unset before the wxEVT_SHOW
event fires.  Instead, we track the stack of modal windows opened and
close the window and subsequent windows when the object pointer matches

Fixes https://gitlab.com/kicad/code/kicad/issues/13372
2023-01-12 11:53:00 -08:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Jon Evans 05b578a9bb Bitmaps: use original size for caching
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13486
2023-01-11 21:15:07 -05:00
Jon Evans 253122dc78 BITMAP_BASE: update original when converting to greyscale
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13487
2023-01-11 21:07:50 -05:00
Seth Hillbrand a206f6717d Desaturate the symbols in DNP for print/plot
The desaturation should match screen display

Fixes https://gitlab.com/kicad/code/kicad/issues/13481
2023-01-11 13:44:08 -08:00
Seth Hillbrand 248399f771 Standardize print/plot terms
Use choice box for color/bw selection
"border and title block" -> "drawing sheet"

Fixes https://gitlab.com/kicad/code/kicad/issues/13128
2023-01-11 12:30:02 -08:00
Seth Hillbrand 481c2493a4 Fix comile on Linux 2023-01-10 19:49:36 -08:00
Jeff Young 30c9deb9d5 Flat(er) look for paged dialogs. 2023-01-11 01:11:25 +00:00
Roberto Fernandez Bautista 99d02ac7c0 CADSTAR SCH: Load symbol shapes with correct fill state
Changes architecture of importer to use SHAPE_LINE_CHAIN.

For now lets just load symbol shapes like this, but we could update code
for all other loading operations (also in PCB).

FIxes https://gitlab.com/kicad/code/kicad/-/issues/8060
2023-01-10 22:28:01 +01:00
Roberto Fernandez Bautista ee6e86d1db Add conversion from CADSTAR SHAPE to SHAPE_POLY_SET 2023-01-10 22:28:01 +01:00
Wayne Stambaugh c3ded7a03d Remove board editor standard dialog button static line separators. 2023-01-09 08:49:38 -05:00
Marek Roszko 9f71e9af03 Add arg to plot hidden symbol pins in cli 2023-01-08 22:39:38 -05:00
Jeff Young f17ddf5c88 Terminate overbar notation correctly.
Fixes https://gitlab.com/kicad/code/kicad/issues/13438
2023-01-08 20:08:53 +00:00
Wayne Stambaugh 9c0445ed98 Remove schematic editor standard dialog button static line separators. 2023-01-08 14:26:10 -05:00
Wayne Stambaugh f28ea5e784 Remove standard dialog button static line separators.
For the sake of consistency across all dialogs and window that behave
like dialogs, remove the static line that separates the main part of
the dialog from the standard buttons.  This only applies to windows
that have the standard button on the bottom of the frame.

This covers the 3D viewer, CvPcb, common, GerbView and KiCad dialogs.
2023-01-08 13:15:33 -05:00
Alex 53dedb2c99 Prefer later versions in import of previous settings 2023-01-08 00:24:23 +05:00
Jeff Young aeb0d1d887 Use a more reliable conversion to UTF8.
Fixes https://gitlab.com/kicad/code/kicad/issues/12722

Fixes https://gitlab.com/kicad/code/kicad/issues/13313
2023-01-07 13:13:13 +00:00
Jon Evans 2f7f41b090 Do not pattern-match against the empty net
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13412
2023-01-06 17:25:36 -05:00
Jeff Young e315eb871c Size columns after we've restored saved size of dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/13278
2023-01-06 14:33:44 +00:00
qu1ck 7dfa100ff0 Correctly refresh the board after action plugin run and maintain
selection
2023-01-05 14:05:15 -08:00
Jon Evans 1d9783ed32 Suppress wxWidgets popups when locale can't be loaded for some reason
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13371
2023-01-05 12:39:16 -05:00
Jeff Young 3d8d27caf3 Make sure ResetGridSizes works for SCH apps. 2023-01-05 16:30:55 +00:00
Jeff Young 3b021d98be Completely remove reading SCH grid sizes from config files.
It messes up too many things if you put metric grids in there.

Fixes https://gitlab.com/kicad/code/kicad/issues/13345
2023-01-05 12:25:43 +00:00
Seth Hillbrand 611fcc2f19 Initialize m_originalBitmap when loading PNG data
Fixes https://gitlab.com/kicad/code/kicad/issues/13374
2023-01-04 11:32:15 -08:00
Seth Hillbrand 98d55ce82f Avoid rebuilding with each commit
We shouldn't include the kicad_build_info.h outside of the wrapper
build_info.h.  Also adds an error directive to prevent re-introduction
of define dependencies
2023-01-04 11:32:15 -08:00
Roberto Fernandez Bautista f518d08bf8 Update the bounding box when printing "Fit to Page"
Fixes edge case from c5d8dffca4

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13370
2023-01-04 14:44:36 +01:00
Roberto Fernandez Bautista 00655f9f29 Default to Fast Antialiasing for OpenGL GAL 2023-01-04 14:44:36 +01:00
Roberto Fernandez Bautista 1eef438a96 Always default to Accelerated (OpenGL) rendering and fallback if required
When falling back the GAL, let's not update the user preference and instead
just keep track of the failure that happened this session.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11720
2023-01-04 12:58:19 +00:00
Jon Evans 8894b8e669 Implement bitmap rotation and mirroring without texture modification in opengl_gal 2023-01-04 00:26:45 +00:00
Jon Evans ac3ed02283 Rework bitmap cache and enable it
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12405
2023-01-04 00:26:45 +00:00
Marek Roszko 8ab9934143 Use our own cmake module path variable to avoid conflicting with the main ones listy functional 2023-01-03 19:18:16 -05:00
Roberto Fernandez Bautista 2d4ec7cab7 Happy New Year 2023! 2023-01-03 15:55:08 +01:00
Jeff Young 056349e5ea Units for footprint preview widgets. 2023-01-02 22:12:26 +00:00
jean-pierre charras 40e41d0129 Protect against null pointer use.
Fixes #13349
https://gitlab.com/kicad/code/kicad/issues/13349
2023-01-02 15:42:49 +01:00
jean-pierre charras e8114dc49a Minor compil and Coverity warnings fixes. 2023-01-02 10:21:42 +01:00
Alex c1ea90abc6 Handle view centering properly when drag-panning and zooming. 2023-01-02 14:20:43 +05:00
Gary Kim 8e8a3c7bdc
Do not translate name in version info
Leave the application name in version info untranslated when
viewed, copied, or used in a bug report.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13298
2022-12-31 20:28:45 -05:00
qu1ck 84ad38fd5d Add VECTOR2I_EXTENDED_TYPE template spec to swig
Allows access to Dot(), Cross() and other vector2i methods in python

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9967
2022-12-31 18:52:07 +00:00
Alex 3f34485013 Add missing limits header. 2022-12-30 14:44:48 +05:00
Jeff Young c0e0cbceb0 Move eseries helper class to common.
Also improves some terminology for english-speakers.

Also substitues [] vector access (which creates empty elements) over
at() (which throws if the item is not found).
2022-12-29 18:05:57 +00:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00
Mike Williams 6816ee937a Flags: remove unused IS_DRAGGING 2022-12-28 12:27:57 -05:00
Mike Williams f03fd5ad2d Schematic: remove IS_RESIZING
Is unused/redundant with IS_MOVING
2022-12-28 12:27:57 -05:00
Jeff Young fc15454dd1 Debounce button control drawing.
Fixes https://gitlab.com/kicad/code/kicad/issues/13288
2022-12-27 23:55:28 +00:00
Jon Evans 7e778c9856 KiWay: Make sure to mark closed windows as closed
Also make sure to veto project import if we couldn't close the existing project.

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

Maybe also fixes some other weird crashes, we'll see.
2022-12-27 10:31:45 -05:00
Jeff Young 572c10b2c4 If we don't recognize a var then it's an error, not 0.0. 2022-12-27 13:50:44 +00:00
Jon Evans ee0a41e3bc Remove excess calls to SelectedItemsModified
We really don't want to post these events unless the *selected* items
were actually modified, since it results in a redraw of the properties
panel (which disturbs edit state and causes flicker on MSW).

Now the COMMIT system is responsible for sending this event iff the
commit touches items that are selected.

Side note: UpdateMsgPanel is useless on every app except pl_editor, so
it can probably be refactored/removed at some point.
2022-12-26 20:57:58 -05:00
Jeff Young 542ff699cf Scale list columns with dialog width.
Fixes https://gitlab.com/kicad/code/kicad/issues/13278
2022-12-27 01:04:47 +00:00
Jeff Young a18c2043c4 Minor adjustment for bitmap button size for GTK. 2022-12-26 23:13:22 +00:00
Jeff Young 340a8fb154 Default a library item selection if there is none.
Fixes https://gitlab.com/kicad/code/kicad/issues/13261
2022-12-26 14:11:46 +00:00
Wayne Stambaugh 78e2f0fd4d Sheet instance handling improvements. 2022-12-26 08:30:03 -05:00
Jon Evans fbaf4af489 Properties: Allow dynamic update of read-only state 2022-12-25 20:35:44 -05:00
Jeff Young 91dc79169a CLang-tidy. 2022-12-24 22:20:03 +00:00
Pavel Dovgalyuk 9cd9d7a36a Fix STRING_LINE_READER buffer overflow
STRING_LINE_READER::ReadLine contains the code for expanding the buffer
for the current line. But it modifies length before expanding.
Therefore expandCapacity function tries to read the memory outside
the buffer.
This patch postpones m_length modification, until buffer resizing
is finished.
2022-12-23 17:25:03 +00:00
Jon Evans 826f641dff Properties: Add shape fill control 2022-12-22 17:45:16 -05:00
Jon Evans 4a0588db7a Properties: translation fixes 2022-12-22 17:45:16 -05:00
Jon Evans b16e4595d3 Properties: fix group display ordering 2022-12-22 17:45:16 -05:00
Mike Williams eceee28c99 Schematic: add TODO for multiple netclass assignments 2022-12-22 14:00:51 -05:00
Jon Evans 66799b60f8 DbLib: Reconnect if connection is lost 2022-12-22 12:15:04 -05:00
Mike Williams 0958b9778b Schematic: assigning netclass multiple times should replace, not add 2022-12-22 10:50:18 -05:00
Seth Hillbrand 1cc9792cdb Fix snapping dist when disabling grid
The disable grid hotkey should allow the snap scale to be completely
determined by the snapSize and world scale.  This prevents snapRange
from overriding in the case where grid is disabled.

Additionally, we disallow grid snapping when the grid scale is not
visible.  This means that when zoomed out sufficiently to not show the
minor ticks, these minor ticks will not override a snap

Fixes https://gitlab.com/kicad/code/kicad/issues/12303
2022-12-21 17:47:45 -08:00
Seth Hillbrand 73c4ec0b85 Update displayed information in bug reports
Include two new pieces of information:
- Running platform
- Compiled platform (where these are different)

Additionally, we include information about the linux distribution where
it is available.

Fixes https://gitlab.com/kicad/code/kicad/issues/13225
2022-12-21 16:54:13 -08:00
Jon Evans 1590e48ec1 Use translated strings for property display 2022-12-21 18:03:15 -05:00
Seth Hillbrand fcc4b202db Set interpolation/anti-alias in plots
This doesn't do much for Linux, but the interpolation modes for MSW and
Mac should clean up lines a bit in plotting

Fixes https://gitlab.com/kicad/code/kicad/issues/10239
2022-12-21 12:03:47 -08:00
Jeff Young e28f6ecc00 Fetch a better location for keepout area collsions.
Fixes https://gitlab.com/kicad/code/kicad/issues/13220
2022-12-21 18:22:15 +00:00
Tanay Gupta b0cbab5c4b Footprint Editor: Focus search field when window is first opened
The search field on the Symbol Editor is focused when its window 
is first opened. Similar behavior has been implemented in the search
field of the Footprint Editor with this change.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13100
2022-12-20 19:54:02 +00:00
Mike Williams 389f0655cd Schematic: re-enable old break wire functionality, add slice
Also fix break/slice wires for multiple wires. The shortcut and code
always allowed it, the context menu just didn't appear.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13163
2022-12-19 15:55:59 -05:00
Roberto Fernandez Bautista e3b8475a3d Special case unspecified property value (i.e. <...>)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13200
2022-12-18 17:07:08 +01:00
Jeff Young 9a8a25a596 Don't dismiss an infobar that isn't shown to start with.
On Mac (at least), we get a 1 second pause even if the bar wasn't shown.

Fixes https://gitlab.com/kicad/code/kicad/issues/13193
2022-12-18 10:55:37 +00:00
Jon Evans 13925074cb Remove assert on ReplaceProperty
We can't guarantee initialization order for these, so it results in false warnings
2022-12-17 14:05:50 -05:00
J RB 5f0d26cbe2 Remove argument to wxButton::GetDefaultSize on wxGTK-3.0.x
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13181
2022-12-16 22:40:37 +00:00
Jon Evans bc45e3f16e Suppress wx error popups when locale is missing 2022-12-16 17:07:57 -05:00
Jon Evans 5abf73e3c9 Never call ReCreateMenuBar inside a menu event handler
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
Jeff Young 0e2a4e3f15 Better handling of multi-monitor scaling. 2022-12-16 19:11:34 +00:00
Jeff Young 75a4de4744 Dim bitmap when button is disabled. 2022-12-16 01:22:50 +00:00
Seth Hillbrand e91c039ed3 Prevent event stackup when init pages
The paged book initialization (and others) can generate events,
re-laying out the whole dialog multiple times during initialization.
This halts events during the layout period

Fixes https://gitlab.com/kicad/code/kicad/issues/13158
2022-12-15 11:39:03 -08:00
Alex c66dc035c7 Clear loop points when resetting polygon/zone draw. 2022-12-15 19:02:22 +03:00
Wayne Stambaugh 84f927d057 Schematic import bug fix.
Check for already loaded schematics in the current sheet path as well
as the current project root sheet path to prevent multiple loads of
shared schematic.  This bug was causing shared sheets to be loaded more
than once which caused instance data to get separated by each copy rather
than saved in one copy of the schematic which would result in all instance
data being lost except the last saved copy of the schematic.  This bug has
been around forever and may be the cause of some unexplained schematic
instance data corruption issues.  This bug does not apply when opening
the full project.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11076
2022-12-15 09:58:39 -05:00
Jeff Young 5984a6dddd Fixup a few more collapsing textEditCtrls on Mac. 2022-12-14 15:13:29 +00:00
Mike Williams 756db0d542 Schematic: fix selection disambiguation not changing highlighted item
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13103
2022-12-14 10:08:19 -05:00
Jeff Young 77998d7c51 Better fix for not selecting all of netlist. 2022-12-14 14:13:25 +00:00
Jeff Young 355bfe1587 Blind attempt to fix MSW rendering bug. 2022-12-14 13:36:28 +00:00
Marek Roszko 2f8cc84551 Hotglue footprint to svg export
This needs additional work
2022-12-13 22:50:15 -05:00
Jeff Young c0872364d4 Get rid of bloated bitmap buttons on wxWidgets 3.2. 2022-12-13 20:48:02 +00:00
Marek Roszko f1f5fff072 Add cli export of symbols from kicad libraries 2022-12-12 22:44:26 -05:00
Jeff Young d3228dbab2 Differentiate search panel font between Mac and others.
Fixes https://gitlab.com/kicad/code/kicad/issues/13145
2022-12-13 00:47:19 +00:00
Seth Hillbrand ad9b983a27 Fix spelling
Fixes https://gitlab.com/kicad/code/kicad/issues/13144
2022-12-12 15:29:02 -08:00
Jeff Young 3144459939 Fix issue with text edit boxes being too narrow on wxWidgets 3.2. 2022-12-12 20:45:48 +00:00
Jeff Young 6d73d9a08e Split another couple of hairs in the never-ending "how big is a font".
Fixes https://gitlab.com/kicad/code/kicad/issues/13009

Fixes https://gitlab.com/kicad/code/kicad/issues/13115
2022-12-12 17:37:17 +00:00
Jeff Young 2a32bc4372 Pay attention to indeterminate state in onUnitsChanged().
Fixes https://gitlab.com/kicad/code/kicad/issues/13127
2022-12-12 17:37:16 +00:00
Seth Hillbrand c5d8dffca4 pcbnew printing: Handle scaling correctly
When scaling, we need to consider both the sheet size in pcbnew and the
paper size in the printer settings.  When scaling 1:1, the output box
should always be the sheet

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

Fixes https://gitlab.com/kicad/code/kicad/issues/12530
2022-12-12 08:38:20 -08:00
Marek Roszko 7e53663d5d Add a bulk gerber export that's a wee bit smarter 2022-12-11 20:13:26 -05:00
Jeff Young 56aae7a147 Reduce compiler warnings. 2022-12-11 13:39:59 +00:00
Jeff Young 4e47b5c25f Fix some layout and selection issues on Mac.
Some of these are due to moving to wxWidgets 3.2, but I'm not sure
all of them are.  In particular, the need for CallAfter() in the
search pane's selection handler is probably just a wxWidgets bug on
Mac (the control lies about the current selection inside the event
handler).

Also sets better column widths in the search pane.
2022-12-11 00:56:46 +00:00
jean-pierre charras 75f1067642 GRAPHICS_CLEANER: fix bad detection of short Bezier curves that can be cleaned
eda_shape: small enhancement: when generating a polyline from the Bezier curve,
filter the last point if the last segment is shorter than the given min lenght
2022-12-10 18:19:09 +01:00
jean-pierre charras f76811471e Avoid an annoying compil warning with GCC 12.2 2022-12-10 14:48:47 +01:00
Alex be43484bc7 Make build45DegLeader static. 2022-12-10 06:21:54 +03:00
Alex 3d2b1aaf90 Improve H/V/45 deg mode when drawing zones and polygons. 2022-12-09 19:11:56 +03:00
Mike Williams a417aa6e69 Selection: provide disambiguate for deselections of multiple items
Don't assume we're a delayed drag if the user is using selection
modifers.
2022-12-08 14:12:12 -05:00
Mike Williams 0e75bf02fa Selection: refactor modifier checking 2022-12-08 14:12:12 -05:00
Simon Richter 2214e853c1 Make a few variables const 2022-12-08 18:22:25 +00:00
Simon Richter d6c6116e67 Calculate weighted column width locally
Multiplying the global variable also modifies all columns to the right,
which is not a problem right now because none exist, but might be in the
future.
2022-12-08 18:22:25 +00:00
jean-pierre charras 966f7bfa4c Fix commit 0a881e09, not working on wxWidgets 3.1.5/msys2 2022-12-08 15:39:10 +01:00
Jon Evans 2b0d7f65d0 Properties: sync wxPGGlobalVars map state with editor global state
Thanks to @dsa-t for suggesting this

(maybe)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12297
2022-12-08 07:55:57 -05:00
Jon Evans 0a881e091c Fix build for gcc and wx < 3.1.6 2022-12-08 07:30:04 -05:00
Jon Evans 435651237c Properties: Support overridden availability functions 2022-12-08 00:09:51 -05:00
Marek Roszko 2fc0cd68ed Avoid crashing due to empty lib tables in cli
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13097
2022-12-07 23:56:03 -05:00
Jon Evans 33d76f63b0 Properties: save and restore splitter position 2022-12-07 21:38:33 -05:00
Alex e03a91c9c7 Reduce static ratsnest opacity when moving items; tweak colors. 2022-12-07 21:01:56 +03:00
Jeff Young b15913bd53 Support env variables in spice library paths.
Also removes a bunch of std::string stuff from the file handling in the
simulator.  All our file handling, env variable expansion, project path,
etc. stuff is wxString based, and jumping through std::string in between
just makes it more complex and increases the potential bug surface.

Also fixes a bug where you'd get two error messages when a spice model
library wasn't found.

Also fixes a bug where you'd get a spice model library not found error
when the text field was empty.

Also fixes a bug where we'd try to absolutize a path starting with an
unresolved text or environment variable.  If the path starts with a
variable it's probably absolute, and tacking on the project path in the
error message just obfuscates things.

Fixes https://gitlab.com/kicad/code/kicad/issues/13082
2022-12-07 15:07:25 +00:00
Marek Roszko c0b5fe58c3 Implement output targeting of symlib/fplib upgrade per request 2022-12-06 21:20:27 -05:00
Jon Evans ad8e5891d2 Properties: update evaluator locale when creating editors 2022-12-06 17:56:33 -05:00
Jon Evans d435ba6485 Properties: improve handling of enter/return 2022-12-06 09:10:59 -05:00
Jon Evans 1a0c774940 Properties: Space to toggle booleans; fix arrow keys 2022-12-06 08:56:13 -05:00
Jon Evans 071a2ec46d Properties: clean up some unit handling
Make sure units show up properly in editor on focus kill
Make sure editor shows correct value initially
2022-12-06 08:55:48 -05:00
Jon Evans 40f9a59255 Remove disconnects from SetControl
These aren't needed as the control is going to be destroyed by the grid,
and can cause a crash on exit if the control is destroyed before the unit binder.
2022-12-06 08:06:16 -05:00
Jon Evans 74fa88c0f6 Defer splitter calculation until next event
Windows doesn't have valid sizes in the size event

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13019
2022-12-06 08:05:28 -05:00
Jon Evans c326c57e05 Properties: make sure to reset binder units when changing rows 2022-12-05 23:47:00 -05:00
Jon Evans b673202a4e Remove extraneous event binding 2022-12-05 20:44:47 -05:00
Wayne Stambaugh 5001555f0e Fix crash in Altium schematic importer.
The crash was caused by an unhandled exception. The uncaught exception
caused a cacophony of null configuration setting pointers so guards were
added to prevent crashes should other exceptions occur that do not get
handled correctly.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13046
2022-12-05 20:20:01 -05:00
Jon Evans d0024bd9f7 Properties: clear text ctrl from unit binder before it is destroyed
The lifetime of this text ctrl is managed by the property grid, so
we need to catch when it is hidden before destruction in order to avoid stale pointers being used to handle unit change events.

Credit to @dsa-t for the fix
2022-12-05 19:33:20 -05:00
Seth Hillbrand 77b763f8ba Change binding with units 2022-12-05 15:34:23 -08:00
Seth Hillbrand 6f43915b25 Don't keep a stale iu reference around
The IU memory areas are const but we need to be able to update this when
the frame changes, so use pointers instead
2022-12-05 13:33:45 -08:00
Alex 6d513e7ecf Expose changing arc edit mode in arc button context menu and Preferences
Ctrl+Space can still be used to cycle through modes.

Fixes https://gitlab.com/kicad/code/kicad/issues/5412
2022-12-05 21:28:16 +03:00
Jeff Young 295ef6588d Fix uninitialized variable. 2022-12-05 14:42:05 +00:00
Jeff Young b7d41e0e56 Update simulator with NUMERIC_EVAL, decimal separator processing, etc.
Also includes fixes for instance data and resolving of textvar
references.

Also includes virtual d'tors for IBIS parser to get rid of all the
compile warnings on CLang.

Fixes https://gitlab.com/kicad/code/kicad/issues/12357
2022-12-05 12:40:29 +00:00
Seth Hillbrand 54dd494ff2 Remove frame dependency from UNIT_BINDER
Place the frame information into the event data instead of keeping a
pointer (potentially invalid) into the frame
2022-12-04 16:50:27 -08:00
Jon Evans a8cb0ee116 Properties: Use insertion order as display order 2022-12-04 17:20:34 -05:00
Alex fc062e8a19 Restore tooltip message. 2022-12-05 00:41:11 +03:00
Alex 4482e9f634 Minor UI fixes. 2022-12-05 00:37:25 +03:00
Jon Evans 6e1f075daa Remove debug code 2022-12-04 14:28:38 -05:00
Graham Keeth ef83d01455 Minor string changes: "eeschema" / "pcbnew" in tooltips, and power port terminology 2022-12-04 14:29:57 +00:00
Jeff Young f6822120b3 Enable tab and return commit in property grid. 2022-12-04 11:51:44 +00:00
Jeff Young f805fd267f Divorce UNIT_BINDER from wxFrame.
This allows us to supply Pcbnew or Eeschema as the unitsProvider when
called from the main frame.

Fixes https://gitlab.com/kicad/code/kicad/issues/13066
2022-12-04 11:51:44 +00:00
Jeff Young 96819f6c01 Better cache invalidation for text objects with references.
Fixes https://gitlab.com/kicad/code/kicad/issues/13059
2022-12-04 11:51:44 +00:00
Seth Hillbrand 234cda4197 Re-add PGInit call 2022-12-03 20:39:42 -08:00
Seth Hillbrand 9f551bfbf8 Remove the duplicate initionalize of pg globals
Testing to see if this is needed for windows builds anymore that we have
fixed the general init

Fixes https://gitlab.com/kicad/code/kicad/issues/12297
2022-12-03 17:14:36 -08:00
Seth Hillbrand 6a1acd84c2 Activate Clipper2 by default
Fixes https://gitlab.com/kicad/code/kicad/issues/git
2022-12-03 16:07:17 -08:00
Seth Hillbrand 92266635cc Add an advanced config value for the minimum sliver
The hard coded value was too small for certain calculations.  Better to
have a configurable value that is initially set to our error level to
allow for deviations that don't meet the visibility test for spikes.
These have become more apparent with Clipper2
2022-12-03 16:03:43 -08:00
Jon Evans 8f39dd69be Properties: fix caption text in dark mode on GTK 2022-12-02 22:43:11 -05:00
Jon Evans 4134db3c47 GCC fixes 2022-12-02 22:38:15 -05:00
Jon Evans 3cf3d15590 Properties: fix display ordering 2022-12-02 22:17:08 -05:00
Jon Evans 3d0fcfe8af Remove debug code 2022-12-02 21:55:52 -05:00
Jon Evans 70f9d8cab9 Properties: Add text orientation 2022-12-02 21:33:21 -05:00
Jon Evans 2091aaba2f Properties: Move angles to UNIT_BINDER
Also add support for unicode degree sign in evaluator
2022-12-02 21:25:42 -05:00
Jon Evans 5e352d2a66 Properties: improve handling of unit binders 2022-12-02 19:37:44 -05:00
Jon Evans 9b2f1ad0b1 Properties: show base class groups 2022-12-01 23:18:42 -05:00
Jon Evans ef3f2a8f1e Properties: ignore shape props for textbox 2022-12-01 21:54:12 -05:00
Jon Evans a5096bf28a CLI: Fix macOS binary dir
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12799
2022-12-01 16:55:12 -05:00
Marek Roszko bae8cb55c0 Rename the bom cli to pythonbom since we'll have a real bom system later 2022-11-30 19:56:59 -05:00
Jeff Young f5770fe7e0 Actually free the projects before the settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/10973
2022-12-01 00:05:21 +00:00
Alex 55a3946af8 Properties: Use a constant variable for PG_UNIT_EDITOR editor name. 2022-11-30 20:10:22 +03:00
Jon Evans cfd52d8362 Properties: Fix sort order for base class props 2022-11-29 18:56:15 -05:00
Jon Evans 12b7e68703 Properties: Skipped group should not assert
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13028
2022-11-29 18:12:28 -05:00
Jeff Young 31eb91e9e5 Infobar for slow zone auto-refill. 2022-11-29 21:09:16 +00:00
Seth Hillbrand 5fc5a2132b Fix Properties panel to reference the correct frame
The properties editors are global but the frame that they reference is
not static, so we need to be able to update the frame reference when
restarting pcb editor from the main window.  This updates the frame,
being careful to remove the signalling when closing pcbnew but keeping
the instance of the editor in place.

Fixes https://gitlab.com/kicad/code/kicad/issues/12297
2022-11-29 09:24:41 -08:00
Jeff Young 8260f0ee13 Add support for unitless values to PCB_EXPR_EVALUATOR.
Fixes https://gitlab.com/kicad/code/kicad/issues/13016
2022-11-29 14:24:20 +00:00