Commit Graph

8475 Commits

Author SHA1 Message Date
Jeff Young 3521add640 Suppress newlines in RC_ITEM messages.
Fixes https://gitlab.com/kicad/code/kicad/issues/14569
2023-04-19 14:09:21 +01:00
Marek Roszko 6022979bfe Undo accidental commit change to kiway.cpp 2023-04-18 23:04:51 -04:00
Marek Roszko ea077bc34d Banish ignore.h to core 2023-04-18 22:44:04 -04:00
Seth Hillbrand 82ba67db82 Initialize settings for SINGLE_TOP 2023-04-18 19:27:32 -07:00
Jeff Young 2c34a08bf1 Ignore empty field-name-templates.
Fixes https://gitlab.com/kicad/code/kicad/issues/14552
2023-04-18 17:31:25 +01:00
Jeff Young f72cc6dd51 Amend overly aggressive assert. 2023-04-18 17:31:22 +01:00
Jeff Young 7e5fedef6a Markup fixes.
1) allow escape sequences inside markup sequences
2) keep overbar when inside nested markup
3) always place overbar at full height, not sub/superscript height

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13449
2023-04-17 17:56:54 +01:00
Nimish Telang 51e55dd750 Convert sprintf to snprintf in most files 2023-04-17 15:39:34 +00:00
Jeff Young 86ca90aa2d Fixes to allow copy/paste of pin data.
1) allow paste even if initial cell isn't writeable
2) allow paste to add rows if there's an addHandler defined

Fixes https://gitlab.com/kicad/code/kicad/issues/14508
2023-04-16 23:04:47 +01:00
Jeff Young c6d593a47b Formatting. 2023-04-16 23:04:47 +01:00
Jeff Young cc4a8dcc89 Small improvements to lifecycle safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/14521

Fixes https://gitlab.com/kicad/code/kicad/issues/14315
2023-04-16 18:47:04 +01:00
Jeff Young 6f59740953 Tighten up the lifecycle management of VIEW_ITEMs in
general, and the SYMBOL_VIEWER_FRAME's m_previewItem in
particular.

(Attempted fix for Sentry KICAD-G1.)
2023-04-16 14:21:23 +01:00
Jeff Young b74d964bff Handle legacy libraries with escaped symbol names.
Fixes https://gitlab.com/kicad/code/kicad/issues/14057
2023-04-15 17:47:32 +01:00
Marek Roszko 8fd4909f86 Init curl in InitPgm for thread safety
curl itself highly recommends not initializing curl from within a thread.
Due to the PCM, this can happen in a thread these days.

Pointed out by Érico Rolim in https://gitlab.com/kicad/code/kicad/-/merge_requests/855
2023-04-15 09:18:54 -04:00
Jeff Young d01c023d5a Retire the lib-tree scoring algorithm.
It appears to cause more confusion than help.

Fixes https://gitlab.com/kicad/code/kicad/issues/13905
2023-04-14 23:35:27 +01:00
Lucas Dumont 923f386f08 Dont' create new cell if editing one
Return key is used to change cell line. If cell was in edition, the edition is saved before changing line.

Before this change using return key in the last row, if edited, both saved the change and create new row.

After this change, it'll just save the just, and will need a second key press to create a new row.
2023-04-14 16:44:09 +00:00
Marek Roszko 0eefde6046 Fix build error pre wx 3.1.6 2023-04-13 18:20:16 -04:00
Alex 21103924f4 Don't crash when canceling initial setup in Manage Footprint Libraries 2023-04-13 22:16:56 +03:00
Mike Williams 33b2b5b09d STEP Export: Update options to reflect DNP and Unspecified filtering
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14125
2023-04-13 10:33:03 -04:00
Lucas Dumont 3c24017aa4 Check KiFACE return value
Avoid segfault when cancelling initial global library setup
2023-04-13 13:31:02 +00:00
Jeff Young 8e29a054f3 Performance improvement for GetShownColumns.
(This needs to be fast as it's called from OnUpdateUI events.)
2023-04-13 13:45:22 +01:00
Ian McInerney 6c05801d9e Make the property grid compatible with wx 3.3 2023-04-12 18:57:12 +01:00
Ian McInerney 73a1e63e8e Modify how we print the wx version compat macros 2023-04-12 18:57:12 +01:00
Ian McInerney 8f3bbf36f8 Replace __WXGTK20__ with __WXGTK__
We no longer care about a GTK2 vs 3 difference, we only support GTK 3.
2023-04-12 18:57:12 +01:00
Ian McInerney f0684510f0 Replace wxScopedPtr with std::unique_ptr
Upstream has deprecated wxScopedPtr and recommends users switch to using
std::unique_ptr instead.
2023-04-12 18:57:12 +01:00
Ian McInerney a77e94d16f Add hack to speed up font choice box widget creation
There are problems internal to GTK that mean creating choice boxes with
a lot of items is a very slow process. This hack works around one of
those issues to make it faster to create and display the menu in the
choice box.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14277
2023-04-12 15:23:34 +01:00
jean-pierre charras 8d206d6a67 LIB_TABLE_GRID_TRICKS, popup context menu: fix minor issues:
- add separator only if needed
- ensure selection parameters are up to date.
2023-04-12 08:12:22 +02:00
Marek Roszko bfad8bb0d5 Prevent VIEW::UpdateItems and onShowTimer from firing repaints if GAL did not complete init
This appears to be a possible event race on startup

Fixes sentry KICAD-10A
2023-04-11 22:09:05 -04:00
Jeff Young 01564a254f Make sure "Item" and "Description" end up in the translation database. 2023-04-11 23:56:12 +01:00
Jeff Young eef3492fc0 Make symbol/footprint trees sensitive to language change. 2023-04-11 23:51:58 +01:00
qu1ck 0c049eccc7 Fix a bunch of compiler warnings 2023-04-11 17:01:30 +00:00
jean-pierre charras b2554ad611 manage libraries dialog: show new state of widgets as soon as the context-menu
activate/deactivate changes their state
Fixes #14517
https://gitlab.com/kicad/code/kicad/issues/14517
2023-04-11 18:46:07 +02:00
jean-pierre charras e208685f85 DIALOG_SHIM: fix missing aEvent.Skip() in DIALOG_SHIM::onChildSetFocus().
This method was added in commit a914f6e9.
Missing Skip() created issues on Windows (text edit cursor not shown in dialogs)
2023-04-11 10:54:50 +02:00
qu1ck a6d10c8e97 Enable warnings on msvc 2023-04-11 00:17:50 +00:00
Mike Williams 32eb1ef77e Sch->PCB: propagate DNP from symbols to footprints attributes
Also add a 3D viewer toggle.
2023-04-10 13:11:21 -04:00
Jeff Young a914f6e992 First <ESC> after an edit in a textEdit cancels the edit.
(Second will exit the dialog.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14514
2023-04-10 15:13:43 +01:00
Jeff Young 374d3d52ef Rollback wxChoice -> wxComboBox changes for now.
wxComboBox still has serious issues on macOS.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/14413
2023-04-09 23:00:33 +01:00
Jeff Young 9252793fdb Add select-all to TEXT_ENTRY_TRICKS.
Fixes https://gitlab.com/kicad/code/kicad/issues/14237

Fixes https://gitlab.com/kicad/code/kicad/issues/13304
2023-04-09 21:25:09 +01:00
jean-pierre charras c6bcfda84c DIALOG_IMAGE_PROPERTIES: fix some issues:
- add missing dialog_image_properties_base.fpb file
- fix not displayed image.
2023-04-08 16:41:55 +02:00
jean-pierre charras 8ca0ba8118 add missing .fpb file 2023-04-08 16:41:55 +02:00
Ian McInerney a0b5de91f3 Move forgotten file to core library
Turns out, there was a cpp file for hte core library, so turn the
library into a static library.
2023-04-08 00:37:49 +01:00
Ian McInerney 07d613d0d2 Subclass wxDataViewCtrl to include our helpers
It is cleaner to just extend the class with these functions rather than
having the separate functions.
2023-04-08 00:07:33 +01:00
Seth Hillbrand 5fcc1135a8 Revert "Modernizes search for Cairo, Fontconfig, Freetype, HarfBuzz and Pixman"
This reverts commit 9efd24a69d.

Breaks MSW builds, so this is a non-starter for now
2023-04-07 10:12:43 -07:00
Seth Hillbrand 2cd854af14 Move Spacemouse to advanced config
The spacemouse driver, particularly on Mac, is extremely unstable and
causes crashes even when not being used.  This places the interface
behind an advanced config flag to ensure that users can affirmatively
opt-in to the potential for crashes
2023-04-07 10:08:43 -07:00
Nimish Telang 9efd24a69d Modernizes search for Cairo, Fontconfig, Freetype, HarfBuzz and Pixman 2023-04-07 16:15:53 +00:00
Alex e91b53fc39 opengl_gal: Remove extra padding of bitmap textures.
Since the format has been changed to RGBA8, default (UN)PACK_ALIGNMENT = 4
works correctly, so the texture width padding to 4 is not needed anymore.

Fixes https://gitlab.com/kicad/code/kicad/issues/14432
2023-04-07 13:52:43 +03:00
Ian McInerney 18ea3be3f2 Revert "Reintroduce constexpr to COLOR4D"
This reverts commit 33da9b2327 and the
following commit dc08c48f33.

C++17 changed the behavior of static class member variables that are
constexpr defined. Previously this definition/declaration split was
valid for constexpr members, but after C++17 the static constexpr member
variables are automatically inlined, so the declaration is no longer
exported in some compilers (GCC 9/10/11 seem to have problems).

An alternate way of constexpr member variables is putting the
initialization in the class definition, but we can't init a COLOR4D
object when defining the COLOR4D class.

For now, revert this change until we can figure out the proper way of
architecting these colors.
2023-04-06 20:18:31 +01:00
Ian McInerney ea62b145ff Introduce core interface library
This library is meant to move non-EDA items (language extensions,
library extensions, etc.) into the lowest-level of our dependency chain.
This library should never depend on anyother non-thirdparty code in the
kicad codebase.
2023-04-06 15:01:18 +01:00
Ian McInerney 33da9b2327 Reintroduce constexpr to COLOR4D
This fixes the initialization-order fiasco in the color initialization
sequence, which was originally fixed by making COLOR4D constexpr, but
was then reintroduced when the assert was changed to wxASSERT (wxASSERT
is not compatible with constexpr).
2023-04-05 14:07:01 +01:00
Wayne Stambaugh c3e6825d62 Add hashing to and unit tests for some low level objects. 2023-04-04 15:28:34 -04:00
Jeff Young a9b2234f4e Use a softer Reset for grid settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/14458
2023-04-04 17:05:21 +01:00
Jeff Young 13e79af8a0 Eagle template footprints don't actually belong to board.
Set their parent to nullptr before deleting (as the board may have
already been deleted).

Likely fix for Sentry KICAD-79.
2023-04-04 14:18:49 +01:00
Jeff Young b3e2cf218f Fix Mac crash-on-quit when timed infobar is up. 2023-04-03 23:44:40 +01:00
Seth Hillbrand d135295ac8 Update translator contributions
Adds a number of missing contributors to our translations
2023-04-03 13:07:15 -07:00
Jeff Young 9b4627e782 Don't pass a FRAME-based UNITS_PROVIDER to a modeless dialog.
(The dialog may outlive said frame.)
Should fix Sentry KICAD-3A.
2023-04-03 17:18:33 +01:00
Mike Williams 98e846459a BOM Presets: don't use designated initializers 2023-04-03 11:24:38 -04:00
Mike Williams 9c3d93eb34 BOM Generator: wire up forced exclusion, optional DNP exclusion 2023-04-03 09:07:52 -04:00
Mike Williams c5cc313da9 Symbol Fields Table: BOM presets saved in JSON settings 2023-04-03 09:07:52 -04:00
Mike Williams 753ae21fd4 BOM Generator: wire up to kicad-cli 2023-04-03 09:07:52 -04:00
Mike Williams 4ac0d71ad4 Grid Tricks: don't override paste into actively editing cell
Also strip linebreaks and tabs if we are in a single cell.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12276
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8361
2023-04-03 09:07:51 -04:00
Jeff Young 28028c941e Retire Local/Draw coords distinction from PAD (the last object to have it). 2023-04-02 18:02:41 +01:00
Jeff Young 7ca057ea02 Marginally increase sliver width checker's bogus segment tolerance.
Fixes https://gitlab.com/kicad/code/kicad/issues/14449
2023-04-02 16:43:29 +01:00
Ian McInerney 8351c8923a Make version info work without lsb-release installed 2023-04-02 00:30:36 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Wayne Stambaugh 28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
Jon Evans 65193487a6 Properties: Rename methods to better reflect their purposes 2023-03-26 19:43:16 -04:00
jean-pierre charras 4e27e91b2f KICAD_CURL_EASY: fix compil warnings (avoid using deprecated functions) 2023-03-25 10:18:05 +01:00
Marek Roszko 8a8589b9db Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2
2023-03-24 19:52:48 -04:00
Seth Hillbrand 0b54eb6edb Backout change unrelated to 19d0aceda3 2023-03-24 12:28:03 -07:00
Seth Hillbrand 19d0aceda3 Remove superfluous m_status variable
This used to be used to store information for the item similar to
m_state but it has been deprecated and no uses remained
2023-03-24 09:38:39 -07:00
Nimish Telang f7bf3011fb Use bundled Find{CURL,ZLIB}.cmake 2023-03-24 12:54:52 +00:00
jean-pierre charras 7aace908e1 Gerber plotter: fix incorrect arcs in regions when using a plot offset.
The arc center in Gerber units was incorrectly calculated.
Fixes #14402
https://gitlab.com/kicad/code/kicad/issues/14402
2023-03-24 11:25:25 +01:00
Marek Roszko c65e33ac13 Prevent crash in color settings due to dropdown weirdness
Fixes sentry reported crash KICAD-R6
2023-03-23 19:46:47 -04:00
Salvador E. Tropea 7e3f1b1a00 Adds the missing plot formats to `kicad-cli sch export` 2023-03-22 02:14:50 +00:00
David Holdeman 79fbde0894 Add option to use drill/place file origin for kicad-cli gerber export 2023-03-21 12:18:14 +00:00
Ian McInerney 016c958021 Always build spice simulator support
The simulator has advanced considerably, and it is seeing lots of active
development, so make it a required part of KiCad. Additionally, the
build without the simulator has actually been broken for a while, so no
one clearly is building without ngspice right now.
2023-03-20 16:54:32 +00:00
jean-pierre charras 10d4c63c31 EDA_SHAPE_DESC(): catch a std::runtime_error when emitted by
template<typename T> T Get( PROPERTY_BASE* aProperty ) to avoid a crash,
and displays in Debug mode the runtime error message.
Fixes #14347
https://gitlab.com/kicad/code/kicad/issues/14347
2023-03-20 16:07:08 +01:00
Chartreuse 0d5976c52b Diff Layer Transparancy Fallback for Low Framebuffer Count 2023-03-20 13:05:24 +00:00
Jeff Young a14c017def Save location of legend in worksheet.
Also provides a different cursor when over a legend (to make it clearer
that you can drag it).
2023-03-20 09:51:41 +00:00
Jeff Young ec6d709929 Make sure legend reflects gain/phase for AC small signal analyses.
Fixes https://gitlab.com/kicad/code/kicad/issues/14301
2023-03-19 23:02:58 +00:00
Jeff Young 6f44b85c13 Formatting. (No functional changes.) 2023-03-19 22:09:43 +00:00
Alex 10c4b948cb Support canceling initial global library table setup. 2023-03-19 14:30:53 +03:00
Alex 672c468342 Fix clashing error dialogs when can't load dynamic library. 2023-03-19 13:01:54 +03:00
Alex b89545e484 GTK: Fix settings import paths showing up twice. 2023-03-19 12:51:37 +03:00
Roberto Fernandez Bautista c5362c9b0a CADSTAR: Parse PINNOOFFSET and PINNOANGLE 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista a5dc528c88 CADSTAR: Fix edge case in parts grammar (symbol name can be quoted) 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista 59d88e1871 CADSTAR Parts: Add parsing of hierarchy tree 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista b70fe88145 CADSTAR Parts: Fix parsing of hidden pins (possible for several pins per net!) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 6ab2112135 ADDED: CADSTAR Parts Libraries (.lib) 2023-03-16 21:07:07 +01:00
Roberto Fernandez Bautista 8f83f27336 CADSTAR SCH: Refactor loading of symbols out of loading part info 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista c34207b726 CADSTAR: Remove wxPoint + improve formatting 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista e8ead30baf WIP: CADSTAR Parts now shows up in library tables and is handled correctly (todo: read cadstar header) 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista f45ab30fa6 Add parsing for symbols and pins (Parser now complete) 2023-03-16 21:07:05 +01:00
Roberto Fernandez Bautista e2a4d58e8f Extract CADSTAR PIN_TYPE and PIN::POSITION into a separate header 2023-03-16 21:07:04 +01:00
Roberto Fernandez Bautista 379e3b2fbb Add CADSTAR Parts Library (.lib) parser and qa tests 2023-03-16 21:07:04 +01:00
Alex fc6279a2ea Improve EC_CONVERGING behaviour when lines are almost collinear.
(somewhat)
2023-03-16 05:41:58 +03:00
jean-pierre charras 412368b7f9 PDF plotter: encode the letters ( and ) in strings with context CTX_JS_STR
They are separators and cannot be used in user strings.
Fixes #14302
https://gitlab.com/kicad/code/kicad/issues/14302
2023-03-15 09:31:49 +01:00
Jeff Young 1058d36315 Unrotate/unflip board footprint to match library copy.
Fixes https://gitlab.com/kicad/code/kicad/issues/14276
2023-03-13 22:36:25 +00:00
Jeff Young 7b3e01ce52 Select correct face from a .ttc file.
Fixes https://gitlab.com/kicad/code/kicad/issues/13314
2023-03-13 18:29:55 +00:00
Jeff Young 0fb1ccff21 Commenting and formatting. No functional changes. 2023-03-13 18:29:55 +00:00