Commit Graph

3717 Commits

Author SHA1 Message Date
Jeff Young 2155dd6591 Simplify ExitDialog and make platform-compliant.
Put the buttons in platform-compliant order.
Get rid of SaveMultiOptions in favour of repeated standard save
dialogs with a "Apply to all" checkbox.

Fixes: lp:1783444
* https://bugs.launchpad.net/kicad/+bug/1783444
2018-08-01 15:27:54 +01:00
Jeff Young 196bdc05db Delete empty fields from Symbol Fields editor.
Fixes: lp:1784718
* https://bugs.launchpad.net/kicad/+bug/1784718
2018-08-01 09:35:46 +01:00
Jeff Young f8a5e2c1c8 Performance enhancements in fp loading, string cmp, etc.
Knocks about 1/3 off the first footprint load, and more than 1/2
off subsequent loads.
2018-08-01 09:35:46 +01:00
Jeff Young 0a35c5c97e Convert Footprint Editor to component tree.
Fixes: lp:1784178
* https://bugs.launchpad.net/kicad/+bug/1784178

Fixes: lp:1780363
* https://bugs.launchpad.net/kicad/+bug/1780363
2018-08-01 09:35:46 +01:00
Jeff Young 97f7bd4cb9 Push component tree down into common.
Precondition to reusing component tree for footprints.
2018-08-01 09:35:45 +01:00
Mark van Doesburg 91e3d21d68 Eeschema: Copy attributes from eagle.
Eagle allows for variants of components to be listed in the schematic.
This patch copies the variant data into the imported schematic item,
prefixing the alternate variant names with "VARIANT_" and keeping the
alternate values.
2018-07-31 11:58:01 -07:00
Wayne Stambaugh 61b68e2476 Eeschema: fix print dialog button sizer layout issue. 2018-07-31 10:34:30 -04:00
jean-pierre charras e750382e75 Fix a few wxWidgets minor asserts 2018-07-29 17:27:11 +02:00
jean-pierre charras f5e23e4f1a Fix a few wxWidgets minor asserts 2018-07-29 12:54:36 +02:00
jean-pierre charras d73db8c73a Make a few strings not internationalized, because they must not be translated (html format strings) 2018-07-28 12:47:23 +02:00
jean-pierre charras 3e5cd86288 Fix a few wxWidgets minor asserts. Fix a compil warning 2018-07-28 10:31:04 +02:00
Jeff Young 421204ae80 Improve Reset to Defaults button lable.
Also updates action buttons to a sdbSizer so the order is correct
on OSX.

Fixes: lp:1783584
* https://bugs.launchpad.net/kicad/+bug/1783584
2018-07-27 14:58:19 +01:00
Jeff Young 3c2c5c38ad Make icon buttons slightly wider for MSW.
Fixes: lp:1783703
* https://bugs.launchpad.net/kicad/+bug/1783703
2018-07-27 14:58:19 +01:00
Jeff Young 4dfae16c1b Consolidate to single menu actions for save, revert, etc.
There's no point in having both Save Symbol and Save Library when
only one can be selected at a time.

Also cleans up a bunch of extraneous icons, and fixes a few
copy/paste errors in menus and toolbars.
2018-07-27 14:58:19 +01:00
Jeff Young 0cca1c6721 Remove active library concept from footprint editor.
Also bring the menu system and toolbar in line with Pcbnew,
eeschema, and the symbol library editor, which includes moving
to a standard Save As paradigm for renaming/moving items.

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

Fixes: lp:1778202
* https://bugs.launchpad.net/kicad/+bug/1778202
2018-07-26 21:34:25 +01:00
Jeff Young cd3d4b106a Add event.Skip() call so someone else handles the focus.
DIALOG_EDIT_ONE_FIELD::OnSetFocusText() is only for setting the
selection correctly, not doing the actual focus.

Fixes: lp:1783615
* https://bugs.launchpad.net/kicad/+bug/1783615
2018-07-26 15:43:53 +01:00
Jeff Young cb61525394 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
2018-07-26 15:43:53 +01:00
John Beard 9ec6efbf13 Add icon for update PCB from Schematic
This previously used the "import board file" icon, which is a bit
confusing, as the action is not importing into a PCB.
2018-07-26 15:43:53 +01:00
Jeff Young b5634b1d08 Dialog spacing cleanup. 2018-07-26 15:43:53 +01:00
Martin Aberg f3983cc47f eeschema: fixed typo Brighened -> Brightened
This affects a color string in the eeschema config file.
2018-07-26 15:43:53 +01:00
jean-pierre charras f13a546c9b Fix a few wxWidgets asserts or alerts. 2018-07-25 20:26:55 +02:00
Jeff Young 05b2060e12 Replace missing growable-row spec.
Fixes: lp:1783545
* https://bugs.launchpad.net/kicad/+bug/1783545
2018-07-25 14:41:20 +01:00
John Beard f01cf15528 Add field properties icon: opamp + T
This was just a text icon, which was not clear about the function
of the button.
2018-07-25 14:41:20 +01:00
Jeff Young 822ebf6955 Move symbol management to a standard Save As... model.
Also brings horizontal toolbar in line with Pcbnew and Eeschema.
And updates the EDA_LIST_DIALOG to current practices.

This finishes the removal of the active library concept from the
Symbol Editor (started with the new component tree in 5.0).

Fixes: lp:1740717
* https://bugs.launchpad.net/kicad/+bug/1740717
2018-07-25 14:41:20 +01:00
Jeff Young 7fa3491616 Make it clear that we're append the content of a schematic.
Fixes: lp:1563477
* https://bugs.launchpad.net/kicad/+bug/1563477
2018-07-24 18:03:40 +01:00
Jeff Young 83a56263d0 Strip returns, tabs and linefeeds from SCH fields.
Fixes: lp:1783285
* https://bugs.launchpad.net/kicad/+bug/1783285
2018-07-24 16:41:19 +01:00
Jeff Young f79ca271e3 Replace missing #ifndef's.
We only process symlinks on POSIX kernels (Linux and OSX).

Fixes: lp:1548798
* https://bugs.launchpad.net/kicad/+bug/1548798
2018-07-24 09:05:39 +01:00
Jeff Young bc47f085df Support symlinks for .pretty and .lib files.
Fixes: lp:1548798
* https://bugs.launchpad.net/kicad/+bug/1548798
2018-07-23 23:50:13 +01:00
Jeff Young 4d3aeb3339 Make sure cur_lib_table is initialized.
The panel doesn't get Show() events so do it in the constructor.
2018-07-23 23:50:13 +01:00
jean-pierre charras 306729f3b7 DIALOG_ANNOTATE: fix a minor cosmetic issue, and make translation of 2 texts more easy. 2018-07-23 15:48:28 +02:00
Jeff Young 9ca9225977 Add elipsis to Page Setup button. 2018-07-22 23:39:18 +01:00
Jeff Young 2a9856ba34 Refresh eeschema print dialog.
Use standard button layout and remove extraneous heading.
Move to TransferDataTo/FromWindow.
Close dialog after printing.

Fixes: lp:1763319
* https://bugs.launchpad.net/kicad/+bug/1763319
2018-07-22 23:29:07 +01:00
Jeff Young 7f64f41242 Fix layout issues in Global Label dialog.
Fixes: lp:1782904
* https://bugs.launchpad.net/kicad/+bug/1782904
2018-07-22 16:21:51 +01:00
Jeff Young 07a665f4fd Improve validation of symbol fields editor.
Don't beep when inserting character from focused grid cell (but
before editor is opened).

Handle reference validation separately from name validation and
separately from user field value validation.  The old way of setting
the fieldId on the validator wasn't working because the validator
gets copied.

Run validation when leaving cell.  Don't just check for empty
(particularly for fields that CAN be empty).

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

(cherry picked from commit 79e04de)
2018-07-21 21:28:13 +01:00
Jeff Young b6934bf547 Remove duplicate labels from global label popup.
Fixes: lp:1782895
* https://bugs.launchpad.net/kicad/+bug/1782895
2018-07-21 14:51:35 +01:00
Jeff Young 6d2dfbb5c3 Add Select Footprint and Show Datasheet to Symbol Fields Editor.
Fixes: lp:1782848
* https://bugs.launchpad.net/kicad/+bug/1782848
2018-07-20 23:27:50 +01:00
Jeff Young c1df78d531 Finish project frame library table editing.
Fixes: lp:1782761
* https://bugs.launchpad.net/kicad/+bug/1782761
2018-07-20 18:48:06 +01:00
Jeff Young bd90341e91 Add Footprint & Datasheet buttons to Edit Symbol dialog. 2018-07-20 18:48:06 +01:00
Baranovskiy Konstantin c08ef3e8f9 Fix untranslatable label.
Column label "Qty" of the symbol fields editor is translatable now.

(cherry picked from commit e7b9b0e)
2018-07-19 23:09:41 +01:00
Jeff Young ba0c823673 Fix flicking issues on non-double-buffered platforms. 2018-07-19 21:46:41 +01:00
Jeff Young 3a67300001 Fix reference text smart selection for Windows and Linux.
Fixes: lp:1782382
* https://bugs.launchpad.net/kicad/+bug/1782382
2018-07-19 21:46:41 +01:00
Jeff Young eaf5b913b6 Add Manage Symbol and Footprint Library tables to project frame.
Fixes: lp:1780604
* https://bugs.launchpad.net/kicad/+bug/1780604
2018-07-19 21:46:41 +01:00
Jeff Young 829ba27206 Another round of dialog spacing/font adjustments for Windows. 2018-07-18 17:59:05 +01:00
Jeff Young 879ffa4d1c Adjust dialog spacing for Windows. 2018-07-17 22:18:27 +01:00
Jeff Young 977f27f3c4 Adjust spacing on preference panels.
Giving them the correct parent changed the spacing.

(cherry picked from commit 7f602f3)

(cherry picked from commit 718db46)
2018-07-17 15:14:25 +01:00
Jeff Young 909f850d16 Give panels the correct parent (the treebook, not the dialog).
(cherry picked from commit 7338533)

(cherry picked from commit 3ce75be)
2018-07-17 15:14:19 +01:00
Jeff Young 99db5cb543 Allow for reduced nagging with wider use of KIDIALOG.
(cherry picked from commit c2dd5df)
2018-07-17 15:13:53 +01:00
Jeff Young 7dcc8e346f Add Edit context menu item for EEschema graphic lines.
Fixes: lp:1779554
* https://bugs.launchpad.net/kicad/+bug/1779554

(cherry picked from commit 02b29ba)
2018-07-17 15:13:49 +01:00
Jeff Young 68e7a49b53 Add position to Eeschema's edit text dialogs.
Fixes: lp:1627467
* https://bugs.launchpad.net/kicad/+bug/1627467

(cherry picked from commit 07c7828)
2018-07-17 15:13:41 +01:00
Jeff Young 1bca706115 Move search status messages to Find/Replace dialog.
Fixes: lp:1777699
* https://bugs.launchpad.net/kicad/+bug/1777699

(cherry picked from commit 1ae8a2b)
2018-07-17 15:13:37 +01:00
Jeff Young 6a7e6e7735 Fix a few more missing language-change updates.
Fixes: lp:1779513
* https://bugs.launchpad.net/kicad/+bug/1779513

(cherry picked from commit 8389c5c)
2018-07-17 15:13:27 +01:00
Jeff Young 7c3a67191b Freshen the BOM dialog.
Layout freshened to include standard button layout.
Fall-behind Add Plugin dialog also fixed.

(cherry picked from commit 30dac89)
2018-07-17 15:13:22 +01:00
Jeff Young 420c2020fb Overhaul Symbol Library References dialog.
Fixes some layout issues and standardizes the action buttons.
Also works around a wxWidgets bug in row sizing.

(cherry picked from commit 7abc922)
2018-07-17 15:12:58 +01:00
Martin Aberg 41829162d2 eeschema: improve hierarchical sheet text placement
Take field name sizes and user preference line thickness into account
when calculating placement of the text fields of a hierarchical sheet on
the canvas.

The previous calculations contained some magic numbers which seem to
have been well suited to cases where line width is 8 and text size is
0.050. However, the text collided with the sheet outline as soon as text
size or line width was increased.

This commit has been evaluated with line widths ranging from 5 to 100
and text sizes ranging from 0.02 to 0.200. Also in combination with
characters such as qyg and ÅÄÖÜ in the file/sheet names.

(cherry picked from commit b1a60b2)
2018-07-17 15:12:55 +01:00
Martin Aberg 5b55a0d8e6 eeschema: clamp text line width on hierarchical sheets
When drawing a hierarchical sheet symbol, the text line width for
"Sheet: ..." and "File: ..." are now clamped (limited).
Clamp_Text_PenSize() is used for the calculation.

Before, without the clamping, these text widths grew with the line width
preferences option. That resulted in characters cluttering up.

(cherry picked from commit b76407e)
2018-07-17 15:12:47 +01:00
Jeff Young f72842405a Add existing label popup to properties dialog.
Fixes: lp:1639719
* https://bugs.launchpad.net/kicad/+bug/1639719

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

(cherry picked from commit 14ebff6)
2018-07-17 15:12:45 +01:00
Jeff Young 5db4a85430 Fix Update Fields to use alias values.
Fixes: lp:1778826
* https://bugs.launchpad.net/kicad/+bug/1778826

(cherry picked from commit 1de2a80)
2018-07-17 15:12:41 +01:00
Jeff Young 49ea6e1670 Fix occurrences of "edition" which should be "editing"
Fixes: lp:1778168
* https://bugs.launchpad.net/kicad/+bug/1778168

(cherry picked from commit bcb1220)
2018-07-17 15:12:39 +01:00
Jeff Young d5e88f574f Clean up units infrastructure after g_UserUnit removal.
Fixes: lp:1538239
* https://bugs.launchpad.net/kicad/+bug/1538239

(cherry picked from commit 96d7178)
2018-07-17 15:12:36 +01:00
Jeff Young 5f3ee1e7ce More g_UserUnit erradication.
(cherry picked from commit 3f08780)
2018-07-17 15:12:31 +01:00
Jeff Young 0358aee89e UNIT_BINDERize print and plot dialogs.
Fixes: lp:1778560
* https://bugs.launchpad.net/kicad/+bug/1778560

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

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

(cherry picked from commit 9df9743)
2018-07-17 15:12:29 +01:00
Jeff Young ef3e045a9b Eradicate g_UserUnit from ERC/DRC.
(cherry picked from commit 98b8cd4)
2018-07-17 15:12:16 +01:00
Jeff Young 3e062867de Move all the grid workarounds into our own WX_GRID class.
(cherry picked from commit 08b4463)
2018-07-17 15:11:38 +01:00
Jeff Young 68e23c9271 Clean up some ERC error messages.
Fixes: lp:1772297
* https://bugs.launchpad.net/kicad/+bug/1772297

(cherry picked from commit e98b6f6)
2018-07-17 15:11:35 +01:00
Jeff Young 06bf958bf1 UNIT_BINDERize eeschema's plot and text edit dialogs.
(cherry picked from commit 298ea70)
2018-07-17 15:11:26 +01:00
Jeff Young e4d9366fe4 UNIT_BINDERize Pin Properties dialog.
(cherry picked from commit c609087)
2018-07-17 15:11:24 +01:00
Jeff Young 52271d3195 Add an Add Field button to global Field Editor.
Fixes: lp:1747602
* https://bugs.launchpad.net/kicad/+bug/1747602

(cherry picked from commit 1e5b1b0)
2018-07-17 15:11:22 +01:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young 8f0aa68ab8 Fold 3D Search Paths dialog into Configure Paths.
Use in-place editing for both.

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

(cherry picked from commit 33622cd)
2018-07-17 15:11:01 +01:00
Jeff Young 99fb938b8f Add updating of visiblity, position, etc. to fields.
Fixes: lp:1752752
* https://bugs.launchpad.net/kicad/+bug/1752752

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

(cherry picked from commit 9f60005)
2018-07-17 15:10:50 +01:00
Jeff Young 23189f8e1b Move annotation confirmation dialogs to KIDIALOG.
(cherry picked from commit 05e04e8)
2018-07-17 15:10:45 +01:00
Jeff Young 31aebe6920 UI infrastructure enhancements and bug fixes.
Work around wxWidgets failure to send first key through validator.

Unify treatment of INDETERMINATE values (such as for multiple
selections with mixed values).

(cherry picked from commit 7308729)
2018-07-17 15:10:15 +01:00
Jeff Young c8b02674dc Direct editing of LIB_FIELDs and SCH_FIELDs in dialogs.
Fixes: lp:1676178
* https://bugs.launchpad.net/kicad/+bug/1676178

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

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

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

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

(cherry picked from commit b6aee79)
2018-07-17 15:10:08 +01:00
Jeff Young bcd9a7745d Make the pin table editable.
Also adds generic icon + text grid renderer and grid editor.

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

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

(cherry picked from commit 067f777)
2018-07-17 15:10:06 +01:00
Jeff Young 7be85deb32 GRID_TRICKS improvements.
Allow copy of a single cell demarcated by the grid cursor.

Paste of lib_table s-expressions should always start at 0,0.

Let caller or specialized sub-class do auto-sizing; don’t
do it from within the base GRID_TRICKS.

Don’t start GRID_TRICKS menu IDs at -1; wxWidgets doesn’t
like it when you get to 0.

Add column visibility menu.

(cherry picked from commit e5071ed)
2018-07-17 15:10:03 +01:00
Jeff Young 0f78f97232 Get rid of 5.0 dialog focus hacks.
It's time to fix the focus issues.  This adds a new SetInitialFocus()
routine to DIALOG_SHIM which will need to be called from a lot of
dialogs.

(cherry picked from commit 6d9647a)
2018-07-17 15:09:58 +01:00
Jeff Young a39fb03822 Remove some references to g_UserUnit
(cherry picked from commit 614d832)
2018-07-17 15:09:56 +01:00
Jeff Young 74acb76e7f Switch UNIT_BINDER and DIALOG_SHIM to local units.
The general idea is to support user-units inheritance.  The
UNIT_BINDER allows wrapped controls to inherit units from their
parent dialog, while KEYWAY_HOLDER and DIALOG_SHIM allow child
KEYWAY_HOLDERs or DIALOG_SHIMs to inherit units from their
parent.

The GetUserUnits() method signature has to move to KEYWAY_HOLDER
rather than KEYWAY_PLAYER (where it makes more sense) as it’s the
only common ancestor of KEYWAY_PLAYER and DIALOG_SHIM.

As long as we'll be using the UNIT_BINDER more widely, it also
makes sense to move evaluation and validation into it.

This commit also provides eeschema’s DIALOG_LABEL_EDITOR and
pcbnew’s DIALOG_TRACK_VIA_PROPERTIES and DIALOG_SET_GRID as
models of how to use the new user-units inheritance, eval, and
validation.

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

(cherry picked from commit c8bc53e)
2018-07-17 15:09:53 +01:00
Jeff Young 4f8c546140 Implement user units uniformly in EDA_DRAW_FRAME
Step 1 of the g_UserUnit global eradication.  This commit includes
basic hookup of hotkeys, units tool-buttons and grid dialogs.

(cherry picked from commit e0500ab)
2018-07-17 15:09:51 +01:00
Jeff Young b99ea159c8 Rationalize select menu texts.
Be consistent with order, formatting, etc.
Remove debug stuff such as zone timestamp and net code.
Clean up misleading pad messages.

(cherry picked from commit 2132109)
2018-07-17 15:09:48 +01:00
Jeff Young a1ef5401f4 More platform-standard presentation of DRC dialog.
Also makes better use of space to significantly increase number
of markers shown.

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

(cherry picked from commit a1d8097)
2018-07-17 15:09:46 +01:00
Jeff Young 3e190cee4b Implement selection brightening for DRC.
The old item pointers (which aren't safe to keep around) were
removed in favour of opaque references (void*) which are then
compared against existing items when needed.

Also improves brightening by brightening the whole footprint
(ie: its pads, drawings, reference and value) rather than just
its target cross.

(cherry picked from commit 30e90b0)
2018-07-17 15:09:40 +01:00
Jeff Young e9d877914d Dialog consistency and beautification.
Small icons for dialog browse, refresh, and row operations.
Icons in B&W so they don't over-emphasize with respect to other
controls in the dialog.

Layout cleanup for consistency.  Removal of the blank space to
left of the fields list in the Global Fields Editor, and addition
of column-sizing-to-list-width.

More even spacing for buttons in html report panel.

Honor platform conventions for action button order and layout.

Move netlist importer to update-pcb-from-schematic algorithm
(display messages and then update instead of "dry run" checkbox)

(cherry picked from commit b21e19d)
2018-07-17 15:09:01 +01:00
Maciej Suminski 8ba694e6fd eeschema: fix alias names in .dcm files
Fixes: lp:1781761
* https://bugs.launchpad.net/kicad/+bug/1781761
2018-07-17 14:27:41 +02:00
Jeff Young 01c5bdfb8f Fix bug with duplicate columns in Edit Symbol Fields. 2018-07-16 09:03:27 +01:00
Carsten Schoenert 9f7109826d fix misspelled 'allows to' -> 'allows one to'
Fixup small grammar issues around used 'allows to ...' almost in
code comments.
2018-07-11 10:35:03 -04: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
jean-pierre charras 840a8b1d36 Eeschema, renumbering components: Fix multiparts IC supply renumber problem.
With "reset but keep order of multi-units parts" option on, these units were incorrectly grouped.

Fixes: lp:1780876
https://bugs.launchpad.net/kicad/+bug/1780876
2018-07-10 17:53:06 +02:00
jean-pierre charras 3df27430c7 Fix eeschema crash when updating fields from libraries, and when a symbol in schematic is not found in libs
Fixes: lp:1779722
https://bugs.launchpad.net/kicad/+bug/1779722
2018-07-02 21:02:27 +02:00
Maciej Suminski 47c44b4d83 Unselect 'copy default sym-lib-table' when unavailable
It used to be selected as the primary choice even though the option was
disabled.
2018-06-29 09:19:41 +02:00
John Beard 8181646794 Fix -Wshadow warning in sch_sheet_path.cpp
Three instances of variables named "reference" shadow a typedef
within std::vector producing:

warning: declaration of ‘reference’ shadows a previous local [-Wshadow]
 note: shadowed declaration is here
           typedef typename _Alloc_traits::reference  reference;

This patch works around by renaming "reference" to "schReference".
2018-06-28 10:04:43 -04:00
Seth Hillbrand 06ff56325c eeschema: Fix assignment from d30ac2967 2018-06-28 05:58:22 -07:00
Seth Hillbrand d30ac2967a eeschema: Rescue symbols with illegal chars
When parsing component names, we need to account for the possibility of
illegal characters (e.g. "/", ":") in the names from v4 libraries.  They
are fixed internally by the cache parser but if we don't fix them
in the rescue routine, the symbol won't match it's cache name.

This standardizes all schematic illegal character routines into LIB_ID

Fixes: lp:1774774
* https://bugs.launchpad.net/kicad/+bug/1774774
2018-06-27 14:15:30 -07:00
Martin Aberg 9d1b5698e9 Standardize "assign footprints" terminology.
ref: 611d5a0dc4
2018-06-26 13:20:02 -06:00
jean-pierre charras f785d27498 Eeschema, label editor dialog: fix a very minor cosmetic issue when resizing the dialog. 2018-06-23 17:53:29 +02:00
jean-pierre charras b8bbb15aa1 Eeschema: fix a bug in sheet properties dialog that break the annotation of the symbols inside this sheet (Windows only)
For the path separator in full filename, the sheet filename from the dialog uses the Unix notation,
and the "old" sheet filename uses the default notation (it is the actual filename).

Therefore, on Windows, after closing the dialog, the filename was always seen as modified,
and the hierarchy was incorrectly modified (annotation cleared).
2018-06-23 16:58:00 +02:00
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
Jeff Young c30dd24cc1 Fixup sorting for expanded component groups.
Also adds shorthand notation for groups with adjacent components.
2018-05-13 12:21:55 +01:00
jean-pierre charras 54766bac40 fix minor compil warning (signed/unsigned compar) 2018-05-13 08:56:17 +02:00
Jeff Young 9311393016 Add expand/collapse to grouped rows in Fields Editor.
Fixes: lp:1767746
* https://bugs.launchpad.net/kicad/+bug/1767746
2018-05-12 23:05:04 +01:00