Commit Graph

61 Commits

Author SHA1 Message Date
Jeff Young f606679164 Proper numeric sorting for intersheet refs.
Also expunges the horrifically named std::remove and std::remove_if
(neither of which remove anything).
2021-10-01 18:29:21 +01:00
Sylwester Kocjan ddba9e2351 eeschema: fix of not updating spice primitive field
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8835
2021-08-31 06:27:36 +00:00
Wayne Stambaugh cb72da294a More NULL expunging. 2021-07-16 16:13:41 -04:00
jean-pierre charras 4df3ba6a56 DIALOG_SPICE_MODEL: expand env var to open lib file selection dialog in the previous selected lib 2021-07-12 19:40:03 +02:00
jean-pierre charras 928c4e8ed7 DIALOG_SPICE_MODEL: expand environment vars in spice library path. 2021-07-09 18:22:59 +02:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Jonathan Haas baca70e748 Fix description: FETs have a gate, not a grid 2021-04-05 16:15:25 +02:00
Julian Fellinger de12ebf16f Check if symbol is disabled first
By checking for disabledness of the symbol first we skip potentially unnecessary
validation that in turn would throw an unnecessary warning

Fixes https://gitlab.com/kicad/code/kicad/issues/7338
2021-03-15 08:39:46 -07:00
Jeff Young 10e68daa37 Fix some bugs in Change Symbol and Update Symbols.
In particular, there was a typo that kept library values from being
updated, and there was missing logic to fetch the various field names
from the library parts (and the change-to part).

Also implements some performance gains by desisting from copying
LIB_FIELDs around every time we want to look at them.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/6749
2020-12-15 16:12:17 +00:00
Marek Roszko e928b2d8fd Split EDA_UNITS out from common. 2020-10-25 00:02:52 -04:00
Seth Hillbrand 316ca120e8 Don't translate spice prefixes or numbers 2020-10-20 12:51:23 -07:00
ferdymercury b0af66afc7 Allow empty value field if simulation is disabled 2020-08-26 02:42:50 +00:00
jean-pierre charras fd4fb61acc DIALOG_SPICE_MODEL: fix incorrect readonly setting of m_libraryContents.
This wxStyledTextCtrl was set to readonly before writing its contents,
so nothing was shown, at least on wxWidgets 3.1.4.
2020-08-24 17:30:36 +02:00
Jeff Young 6a5644d981 Make spice model library contents read-only.
Fixes https://gitlab.com/kicad/code/kicad/issues/5062
2020-08-22 16:20:18 +01:00
jean-pierre charras f971e1267b Fix typo and remove a I18N marker in a sentence containing keywords
(keywords cannot be translated)
Fix also use of a deprecated constant.
2020-05-26 17:47:58 +02:00
jean-pierre charras 17fad3a9a4 Minor cosmetic fix and enhancement is 2 dialogs. 2020-05-23 09:48:05 +02:00
Jeff Young 4990d1e7b2 Variable substitution framework.
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00
Sylwester Kocjan c7daca1e78 Eeschema: Adding new source types in SPICE model
NEW: Adds support in eeschema for three new source types
used in .TRAN simulation: single frequency FM, AM, and random.
2020-03-23 16:49:21 +00:00
jean-pierre charras 2ca16c0b29 eeschema: fixes some issues related to translated and not translated field names.
When searching for fields, the code was sometimes comparing translated and not translated names.
This is an issue for mandatory fields, in non English languages.

Translated field names should be used only in messages.
2020-02-16 17:52:53 +01:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
jean-pierre charras e6346c7408 Pcbnew: fix crash on Linux (when opening Edit Spice model in component properties)
It happens when the spice library model shown in dialog is a large file.
Looks like the wxTextCtrl used to displays the library content
creates the crash ( GKT bug?) for large texts.

The fix is to replace this wxTextCtrlt by a wxStyledTextCtrl.
It has advantages (does not crash... and much faster display) and
inconvenients (cannot disable editing).

Fixes: lp:1853161
https://bugs.launchpad.net/kicad/+bug/1853161
2019-11-21 13:13:15 +01:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Seth Hillbrand fb3d1bdb59 Clear some compile warnings 2019-06-13 15:16:54 -07:00
Seth Hillbrand 813578eba6 Fix a few coverity errors 2019-02-15 20:15:04 -08:00
Seth Hillbrand 634d02bd04 libedit: Check proper field grid type
Fixes segfault where pointers are not zeroed

Fixes: lp:1811519
* https://bugs.launchpad.net/kicad/+bug/1811519
2019-01-12 06:51:09 -08:00
Seth Hillbrand 170ff66cbb libedit: Allow SPICE parameter editing
This fixes a regression to allow SPICE parameters to be added to the
symbol in libedit.

Fixes: lp:1793062
* https://bugs.launchpad.net/kicad/+bug/1793062
2019-01-09 21:43:23 -08:00
John Beard 658cc8fd96 Wildcards: unify handling of all files wildcards
Use the AddFileExtListToFilter() to also generate the
wildcard for "all files". This is because:

* Users can use AddFileExtListToFilter for the all files WC
  with the same interface as for any other extensions.
* Users do not need to worry about wxGetTranslation, as the
  _() is applied in the same way as the other *Wildcard() helpers,
  and it is a function just like the others, so it is consistent
* There is a testable interface to document the expected result.
  The test is added.
2019-01-09 08:57:42 -05:00
Simon Richter 1253020a8b Add missing header 2018-09-24 10:47:15 -04:00
jean-pierre charras b70d0f43b6 Fix minor compil warnings. 2018-09-24 13:12:47 +02:00
Maciej Suminski e6f2c49eae Spice model editor: support for JFET models 2018-09-22 19:05:01 +02:00
Maciej Suminski f2f6dffd16 Refactored logic in Spice model editor dialog
- Removed redundant enums
- Stored Spice model description in an array
- Made code generic by using the model description array
2018-09-22 19:04:54 +02:00
Maciej Suminski 14ce518208 Speed-up Spice model library loading
Thanks to Jeff Wheeler for determining the slow down cause.

Fixes: lp:1779566
* https://bugs.launchpad.net/kicad/+bug/1779566
2018-07-10 20:55:37 +02:00
Maciej Suminski 70cd27314b Autocompletion for Spice model selector 2018-05-03 11:58:13 +02:00
jean-pierre charras d54418c14a Fix minor compil warnings 2018-01-26 09:35:22 +01:00
Maciej Suminski 60963fe2fc Fixes for 590cac9d
The original patch did properly recognize the case when all transient
source definition fields are empty, which is perfectly valid.
2018-01-17 10:37:57 +01:00
Dan Weatherill 590cac9d55 Fix transient SPICE source field check logic
Fixes: lp:1743486
https://bugs.launchpad.net/kicad/+bug/1743486
2018-01-17 10:36:35 +01:00
Maciej Suminski 7fe6249ac3 Alternative fix for lp:1741050
Calling wxListBox::SetSelection( wxNOT_FOUND ) changes the internal
state of the widget without the intended visual effect (show nothing
selected). It leads to a situation when the default choice is overridden
with wxNOT_FOUND, even though the list box shows a valid value.

As there is no point in calling wxListBox::SetSelection( wxNOT_FOUND ),
the confusing call has been removed.
2018-01-08 16:02:34 +01:00
ludovic leau-mercier 31902f967a Fixed an assert when selected the default semiconductor model
Fixes: lp:1741050
* https://bugs.launchpad.net/kicad/+bug/1741050
2018-01-08 12:53:57 +01:00
Wayne Stambaugh 652b969193 GTK+ file dialog wildcard improvements.
The GTK+ file dialog is case sensitive however it does support regular
expressions.  Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.

A note to developers: make sure to add a file extension when setting
when setting the default file argument.  If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.

There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.

Fixes lp:1720542

https://bugs.launchpad.net/kicad/+bug/1720542
2017-11-11 19:32:26 -05:00
Maciej Suminski 2b052265b2 Added library contents preview to Spice model editor dialog 2017-10-27 17:10:37 +02:00
Maciej Suminski 162d445ce4 Spice Model Editor upgrades
- set a proper title for the dialog
- changed the library parser delimiters to all whitespaces
- sorts the model list in the alphabetical order
- one tab to select subcircuit and semiconductor models
- model type is automatically selected
2017-10-27 16:53:04 +02:00
Maciej Suminski acbe30af51 Improved Spice library parser
Now the parser filters out models placed inside .subckt sections.
2017-10-27 16:53:04 +02:00
Diogo Condeco 75ffcbcef5 MACOS Setfocus and CancelButtonIssue moved into dialog_shim.
Setfocus now works on macos dialogs by setting DLGSHIM_USE_SETFOCUS.
This option is only enabled __WXMAC__ is defined.

FixOSXCancelButtonIssue() is now called inside DIALOG_SHIM::SHOW.
All other calls from within the dialogs were removed.
2017-01-29 23:51:35 +01:00
Maciej Suminski efdfaebf62 Support subdirectories in relative paths in Spice model dialog 2016-10-07 16:07:38 +02:00
jean-pierre charras cd94da7972 Spice simulator and netlist generation: use only netnames (outdated option "use net numbers as net names removed" removed)
netlist generation: remove option "replace IC and U ref by X" (broken option).
All component refs are now prefixed by the Spice_Primitive field value.
Therefore the netlist used by Kicad ngsipce simulator and the spice netlist generated from dialog are the same.
(note: like previously, forbidden chars like ( and ) are replaced by _ in netnames)
2016-09-16 20:36:19 +02:00
jean-pierre charras 13cfe74956 Simulator dialogs: fix minimal sizes and best sizes. 2016-08-20 17:25:51 +02:00