Commit Graph

3520 Commits

Author SHA1 Message Date
Wayne Stambaugh 8394e2b71e Fix broken LIB_ID library nickname illegal character tests.
During the symbol library table implementation, the legal character
tests for the footprint library table were changed and the forward
slash '/' character became illegal.  This change broke editing some
users footprint library tables that already had '/' in library table
nicknames.  This change split the library nickname and library item
name illegal character tests.
2018-06-20 14:36:40 -04:00
jean-pierre charras 5411b951ae Minor compil warning (signed/unsigned compare) fix 2018-06-13 08:05:10 +02:00
Jeff Young 660aed71b4 Make sure initially loaded footprint is rendered.
Also sets the initial footprint to the current footprint when
doing a Choose Footprint from the Eeschema Edit Property
dialog.

Fixes: lp:1776126
* https://bugs.launchpad.net/kicad/+bug/1776126
2018-06-12 13:41:53 +01:00
Seth Hillbrand 4186626069 Fix overzealous checking in 2798035f8
Checking for NULL fields prevents a useful dialog from being displayed
now that the exception is handled.
2018-06-11 20:49:13 -07:00
Seth Hillbrand 2798035f85 eeschema: Catch parameter errors in SPICE sim
Any errors in the dialog should be handled and, at worst, allowed to
redo.  SPICE_VALUE throws KI_PARAM_ERROR, so we catch that explicitly.

Fixes: lp:1776051
* https://bugs.launchpad.net/kicad/+bug/1776051
2018-06-11 18:02:20 -07:00
Jeff Young 5c65881fde Allow Global Fields Editor to Cancel with no changes. 2018-06-11 12:10:19 +01:00
Ben Gamari da61285a29 field editor: Save checkbox states
This refactors the symbol field editor's checkbox state-saving code to
deal with multiple projects with disjoint field sets more consistently.

For instance, imagine I have a two projects

 * Proj1 has fields A, B, C
 * Proj2 has fields A, B, D

Under the old scheme, when I switch from one project to the other the
state of fields C and D will be forgotten. With the new approach,
however, they are retained.

Not to mention, the implementation is considerably simpler.  Fixes
2018-06-11 12:08:59 +01:00
Ben Gamari 3f783d2318 field editor: Find components when reference field is clicked
This makes it significantly easier to find a particular component when
using the field editor, as I often do for part selection.

Fixes: lp:1772169
* https://bugs.launchpad.net/kicad/+bug/1772169
2018-06-11 10:27:49 +02:00
Jeff Young 9edfd25b95 Select best-matching component when filtering.
This also fixes the old bug of scrolling to the selected best
match.

Fixes: lp:1774110
* https://bugs.launchpad.net/kicad/+bug/1774110

Fixes: lp:1744703
* https://bugs.launchpad.net/kicad/+bug/1744703
2018-06-10 23:21:05 +01:00
Simon Richter 8444b1b617 Add missing header 2018-06-08 17:15:17 -07:00
Jeff Young b9874da3a6 Remove background fp loading from Choose Symbol dlg.
There are a bunch of problems with event processing and closing
documents, etc., when enabled.  See the bug report for more
info.

Fixes: lp:1774777
* https://bugs.launchpad.net/kicad/+bug/1774777
2018-06-09 00:51:39 +01:00
Seth Hillbrand fb9ccd855d eeschema: Check for dangling ends when switching sheets
When you search for an item that exists on a separate sheet in the
schematic, the newly loaded schematic sheet needs to have the dangling
flags set so that we don't have a mess of non-connected "o" markers.
2018-06-08 12:51:54 -07:00
Seth Hillbrand 72238e260a Fix overload compile warning 2018-06-08 11:25:27 -07:00
Seth Hillbrand 7558c71aca When clearing annotations, keep units
Clearing annotations should only clear the settings that can be set by
the matching annotate function.  Even in components where the units are
functionally the same, the unit choice should be retained as there are
often other considerations when chosing the unit.

Fixes: lp:1769457
* https://bugs.launchpad.net/kicad/+bug/1769457
2018-06-08 10:51:56 -07:00
Seth Hillbrand a5c213c23d Set footprint splitter window canvas to transient
The splitter window can not be the parent to any additional windows.
If it acquires a child that persists past the lifetime of the splitter
window, we get a segfault.
2018-06-06 10:03:00 -07:00
Maciej Suminski 64e98c8e54 Fixed Symbol Library editor crash on start
Added a null pointer check missing in 51c7381f

Fixes: lp:1775414
* https://bugs.launchpad.net/kicad/+bug/1775414
2018-06-06 17:01:06 +02:00
Maciej Suminski 228881f552 Eagle SCH import: validate package (footprint) names 2018-06-06 10:12:04 +02:00
Maciej Suminski 51c7381fd5 Fix Choose Symbol dialog freezes in eeschema
Scrollbars are always enabled to prevent an infinite event loop caused
by alternating CreateLayout() and OnSize event handler.
More details: http://trac.wxwidgets.org/ticket/18141

Fixes: lp:1767848
* https://bugs.launchpad.net/kicad/+bug/1767848
2018-06-06 09:11:15 +02:00
Damien Espitallier 5263558eaa Fix crash when delete button of footprint filter is clicked and no footprint is selected
Fixes: lp:1775296
* https://bugs.launchpad.net/kicad/+bug/1775296
2018-06-06 00:01:47 +01:00
Jeff Young e0c881b639 Output descriptions to components in generic netlist.
Also hooks up the Python netlist reader to the descriptions so
that they appear correctly in BOMs.  (The BOM generators used
to always get the root component's description rather than the
alias's description.)

Fixes: lp:1774358
* https://bugs.launchpad.net/kicad/+bug/1774358
2018-06-06 00:01:47 +01:00
Jeff Young aaf47bbe71 Replace "unsaved changes" dialog to Global Fields Editor. 2018-06-06 00:01:47 +01:00
jean-pierre charras da392728d4 spice_value.cpp: replace std::invalid_argument by KI_PARAM_ERROR (replacement forgotten in commit a288d6199)
see commit a288d6199 for the reasons of this replacement.
2018-06-05 16:07:47 +02:00
jean-pierre charras a288d6199e Add KI_PARAM_ERROR, similar to std::invalid_argument but using wxString instead of std::string to throw errors.
std::invalid_argument does not work fine with translated strings as argument for message.
(the translated message is incorrectly or not displayed if it contains non ascii8 chars, at least on Windows).
KI_PARAM_ERROR can be throw-ed with a translatable/translated string (a wxString)
2018-06-05 13:29:51 +02:00
Wayne Stambaugh 7343e78347 Fix some Coverity uninitialized field warnings.
Fixes Coverity CIDs:

- 175824
- 169337
- 163191
- 175827
- 175440
- 175438
- 157136
2018-06-04 13:48:57 -04:00
Maciej Suminski f51f30fb1e eeschema: Disabled an assert checking if project path is empty
Empty project path is a valid case when eeschema is executed in
standalone mode without any file loaded.

There were no observed harmful consequences of running eeschema without
the project path set, but to stay safe the project specific
sym-lib-table load code is executed only when the project path is set.
2018-05-31 09:09:01 +02:00
Maciej Suminski c5cde53dff Symbol Editor: fixed a crash when modifying a symbol
In the scenario described in the bug report, the SCH_SCREEN current item
pointer stores an address of a stale object that had been deleted when
the symbol was reloaded. To prevent the crash, the current item pointer
is reset whenever a symbol is loaded.

Fixes: lp:1774296
* https://bugs.launchpad.net/kicad/+bug/1774296
2018-05-31 09:01:59 +02:00
Baranovskiy Konstantin 36504b3071 SymLibEditor: synced state of search tree tool button with its panel
Button "Toggle the search tree" from left toolbar of Symbol Library
Editor does not show actual state of visibility of the search tree
panel. State of this button (checked or unchecked) changes on clicking
only. Toggling panel visibility from menu does not make effect on tool
state.

Applied changes makes tool state (checkd/unchecked) synced with panel
state (shown/hidden).
2018-05-30 16:55:55 +02:00
Jeff Young d03e92a3a2 Field Name Template (aka Default Fields) fixes.
Move from a "default" fields model to a "seed" fields model.  See
discussion on devlist:
https://lists.launchpad.net/kicad-developers/msg35823.html.
2018-05-30 09:46:52 +01:00
Maciej Suminski 8c63dac0c3 Component Chooser: do not create FP list when the FP preview is disabled 2018-05-30 09:53:58 +02:00
jean-pierre charras 52fceb3243 Eeschema: sheet filename renaming: fix a old issue that can set incorrect filenames in sheets inside a complex hierarchy.
Fixes: lp:1773500
https://bugs.launchpad.net/kicad/+bug/1773500
2018-05-29 19:57:18 +02:00
Maciej Suminski 94f161b8c2 Eagle SCH import: validate imported symbol names
Fixes: lp:1753189
* https://bugs.launchpad.net/kicad/+bug/1753189
2018-05-29 09:29:22 +02:00
Maciej Suminski e789523632 Eagle SCH import: do not crash if nothing was imported 2018-05-29 09:29:21 +02:00
Jeff Young f914558e7b Remove overly-strict assert.
Fixes: lp:1773807
* https://bugs.launchpad.net/kicad/+bug/1773807
2018-05-28 20:37:14 +01:00
Marco Ciampa 2cb65f9c19 Make the Simulator error strings translatable 2018-05-28 14:51:10 +02:00
Maciej Suminski 61597db12d Make the Simulator dialog strings translatable 2018-05-25 11:24:25 +02:00
Jeff Young cb925a6646 Output defined default fields to netlists & BOMs.
Fixes: lp:1746814
* https://bugs.launchpad.net/kicad/+bug/1746814
2018-05-24 18:24:59 +01:00
Jeff Young 8f5cb32598 Don't write empty fields from Global Edit Fields dialog. 2018-05-23 21:35:23 +01:00
jean-pierre charras 3893c43eb0 Fix compil issues. 2018-05-23 11:31:13 +02:00
Seth Hillbrand 8c5037a48b Optionally sort reporter messages
It can be useful to have similar class messages grouped together so that
error messages in a larger report don't get lost among the
warning/info/action messages.

This patch allows sorting of messages for dialogs that benefit from
organization.  Default behavior of reporter messages remains
unchanged by this patch.

Fixes: lp:1772090
* https://bugs.launchpad.net/kicad/+bug/1772090
2018-05-22 13:55:02 -07:00
Jeff Young c4b447f3f9 Initialize field visibility checkboxes in Fields Editor. 2018-05-22 19:24:37 +01:00
Jeff Young e3c4a96f5c Default field bug fixes.
1) Commit in-progress edits before closing preferences.
2) Handle default fields in Symbol Fields Editor.
3) Save state of checkboxes in Symbol Fields Editor.
2018-05-22 12:55:39 +01:00
Maciej Suminski 8f6ae70400 Deterministic algorithm for picking field values in multiunit components
The original algorithm picked the value from the last component having
non empty value for a given field, but the processing order was
dependent on the layout of the components in the memory. It means that
for each component, the field values could have been taken from any
unit, randomly.

The patch improves the algorithm, trying to get all values from the unit
with the lowest number and resorts to other units only when there are
field values left empty.
2018-05-19 18:43:23 +02:00
Seth Hillbrand d62b4f36a6 Save hotkeys to combined app-based file
Unifies the different sections of hotkeys so that we are not storing two
[eeschema] or [pcbnew] sections in two different files.

Previous hotkey definitions are loaded at start if they exist but are
overwritten by the new format, if it exists.  Changes to hotkeys save
only in the combined format.

Hotkey editor for each application only shows the hotkeys relevant to
that application.

Fixes: lp:1741757
* https://bugs.launchpad.net/kicad/+bug/1741757

Fixes: lp:1668799
* https://bugs.launchpad.net/kicad/+bug/1668799
2018-05-18 12:57:38 -07:00
Seth Hillbrand d09445cf34 Fixing signed/unsigned warning 2018-05-17 16:47:51 -07:00
Jeff Young 5e30e4d475 Don't allow replace on Power Symbol value fields.
Fixes: lp:1771398
* https://bugs.launchpad.net/kicad/+bug/1771398
2018-05-18 00:43:40 +01:00
Jeff Young df495b1d65 Fix typo in loading of preferences Reference ID Notation menu.
Fixes: lp:1771898
* https://bugs.launchpad.net/kicad/+bug/1771898
2018-05-17 23:46:32 +01:00
jean-pierre charras afc28ef5db fix a minor compil warning 2018-05-16 18:14:06 +02:00
Maciej Suminski 538ab0eb3f kicad_netlist_reader.py: Handle gracefully the case when a library symbol is not available for a component 2018-05-14 17:58:24 +02:00
jean-pierre charras 509793a5b4 Symbol editor: Inversion sign ("~") incorectly ùmanaged in graphic texts.
It was always replaced with space in a graphic text, but it should happens
only in non quoted texts
Now graphic texts containing ' ' or '~' or '"' are always quoted
(work fine with 4.0 version)

Fixes: lp:1771105
https://bugs.launchpad.net/kicad/+bug/1771105
2018-05-14 17:49:30 +02:00
Jeff Young 1a6e8d4713 Fix typo. 2018-05-13 21:48:13 +01:00