Commit Graph

1053 Commits

Author SHA1 Message Date
Maciej Suminski 97f8a3361e Renamed ERC rule: "Test unique global labels" to "Test single instances of global labels" 2018-03-22 18:20:02 +01:00
Maciej Suminski e1c8822b9e Component Properties dialog: catch IO_ERRORs when showing footprint viewer 2018-03-22 11:44:13 +01:00
Jeff Young 79fe134495 Init Footprint Viewer with current FPID.
Fixes: lp:1757421
* https://bugs.launchpad.net/kicad/+bug/1757421
2018-03-21 23:11:55 +00:00
Jeff Young 1a845bc4ad Safer way to commit in-progress changes in wxGrid.
In some cases the wxGrid would attempt to close the editor in
the middle of the d'tor, resulting in segfaults.
2018-03-19 12:13:28 +00:00
Jeff Young df924a5e68 Follow standard FBP naming conventions. 2018-03-18 22:17:27 +00:00
Jon Evans 0a81782b5d Add ERC check that a pin appears in only one net
Fixes: lp:1680638
* https://bugs.launchpad.net/kicad/+bug/1680638
2018-03-15 11:11:43 -04:00
Jon Evans 935a5cada8 Fix typo in conditional check
Fixes: lp:1755265
* https://bugs.launchpad.net/kicad/+bug/1755265
2018-03-12 22:15:27 -04:00
Jeff Young f32f14dc8f Add WX_TEXT_ENTRY_DIALOG which inherits from DIALOG_SHIM.
Fixes: lp:1754977
* https://bugs.launchpad.net/kicad/+bug/1754977
2018-03-12 22:45:51 +00:00
hauptmech eeeed88425 Use fixed width on first Symbol Table column
Autosize when the reference field is a list of all components was too long.

Fixes: lp:1753330
* https://bugs.launchpad.net/kicad/+bug/1753330
2018-03-08 20:59:46 -05:00
Jeff Young 4693fd6200 Resolve env vars when looking up documentation files.
Fixes: lp:1729276
* https://bugs.launchpad.net/kicad/+bug/1729276
2018-03-08 23:51:10 +00:00
Seth Hillbrand 33423fe88d Standardize capitalization
Messages should start with capitalized letter
2018-03-08 12:33:32 -08:00
Seth Hillbrand 3cbf5f4942 Spelling indentifier -> identifier 2018-03-08 12:33:32 -08:00
Seth Hillbrand 9c44d67f3b Eeschema: Simplify transformation representation
Fixes: lp:1752745
* https://bugs.launchpad.net/kicad/+bug/1752745
2018-03-05 01:05:21 +00:00
Jeff Young f4eb63f871 Size fields list correctly in symbol edit.
Fixes: lp:1753323
* https://bugs.launchpad.net/kicad/+bug/1753323
2018-03-05 00:07:50 +00:00
Wayne Stambaugh ce1bd4c6b7 Eeschema: fix remapping backup project with schematics in subfolders.
The backup code was designed for a project with all of the schematics
in the project folder which is not always the case.  Fix the schematic
backup to keep the schematic folder structure in tact during backups.

Fixes lp:1751662

https://bugs.launchpad.net/kicad/+bug/1751662
2018-02-28 11:42:05 -05:00
jean-pierre charras 9a462d9414 dialog_bom: modify the way a command line is created (python scripts on windows only) to call python scripts
For some reason, when calling python and giving a full filename script, the last separator in the filename
must be '/', not '\'.
Otherwise the import command inside the script does not find files to import in the same folder as the script.

We cannot replace blindly '\' to '/' in command line because it does not work for file on a server (name starting by \\server_name\).
So the fix is just replacing one '\' in python script full filename.
This is not perfect, but at least it works for newly created plugin commands.
2018-02-23 09:50:15 +01:00
Jeff Young c47821a689 Stop nagging me about annotating.
Adds a checkbox to turn off confirmation dialogs.
2018-02-20 19:12:59 -05:00
jean-pierre charras 0e493a3f91 Disallow '/' in labels, Step 2: disallow not allowed chars in all labels (local, global, hierarchical, and sheet pin)
Currently, if a old label already containing a '/' (or a space) is edited, it is accepted,
but no new not allowed char can be added to the label.
(Previously, a sheet pin label was not filtered)
2018-02-19 18:15:53 +01:00
Jeff Young 04d1d503ee Disallow '/' in labels.
Fixes: lp:1749232
* https://bugs.launchpad.net/kicad/+bug/1749232
2018-02-19 18:08:09 +01:00
Jeff Young 447fd1bf02 Add a start number to annotate.
This also makes the dialog modeless so that one switch between
sheets while annotating to choose the base numbers for each
sheet (assuming they don't like the base number we pick because
of the order of the sheets).

Fixes: lp:1154131
* https://bugs.launchpad.net/kicad/+bug/1154131
2018-02-19 09:32:54 -05:00
Jeff Young b3884669cf Proper error reporting for Annotate dialog.
Also fixes:
- forcing the annotation scope to "full schematic" when run
  as a prerequisite to Generate Netlist.

- a long-standing bug where displaying extra items in a dialog
  would mess up the height of the HTML_REPORT_PANEL (becasue
  we were setting the html window's height rather than its
  parent flexgrid.

- initializing the annotation radio buttons to safe values
  (full schematic and keep existing)

Fixes: lp:1750062
* https://bugs.launchpad.net/kicad/+bug/1750062
2018-02-18 15:08:24 -05:00
Jeff Young e7d98f89a1 Fix display of datasheet URLs and shorten them if necessary.
Fixes: lp:1676174
* https://bugs.launchpad.net/kicad/+bug/1676174
2018-02-15 22:01:35 +01:00
jean-pierre charras 4012aa70da Fix a few minor Coverity warnings 2018-02-15 10:16:17 +01:00
Jeff Young ac09cfaef4 Wire up <return> for eeschema find dialog.
Fixes: lp:1749026
* https://bugs.launchpad.net/kicad/+bug/1749026
2018-02-12 19:41:34 -05:00
Jeff Young 0bbf961881 Clean up Cancel vs Close buttons in dialogs.
Many had already been fixed but weren't working on Mac because
of the DIALOG_SHIM hack (now fixed).  Others hadn't been updated
yet.  Also includes some cleanup for elipses in buttons and
layout.

Fixes: lp:1748506
* https://bugs.launchpad.net/kicad/+bug/1748506
2018-02-10 17:53:12 -05:00
jean-pierre charras dba198e576 Fix code after renaming files
Change class names according to the new name of the main dialog
2018-02-09 17:36:54 +01:00
jean-pierre charras 35a0688bf7 rename dialog_bom_editor* files to dialog_fields_editor_global*
rename also associated files
2018-02-09 17:36:52 +01:00
jean-pierre charras 07fff6ed35 Eeschema, choose component dialog: remember the relative size of the component tree and the symbol viewer canvas during a session 2018-02-09 08:08:14 +01:00
Michael Geselbracht b04b1dcfb5 Update fields: Add option to omit empty fields
Fixes lp:1747405

https://bugs.launchpad.net/kicad/+bug/1747405
2018-02-08 21:05:10 -05:00
Jeff Young 6c61a46721 Rationalize label orientations for dialog display.
Fixes: lp:593795
* https://bugs.launchpad.net/kicad/+bug/593795
2018-02-08 20:16:26 -05:00
Chris Pavlina d1a45d1476 Remove icon scaling diagnostic from eeschema 2018-02-05 19:49:07 -07:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
jean-pierre charras 795a36c9fe Fix code after renaming files, and a bit of code cleanup (remove useless includes and multiple includes of the same files) 2018-01-30 09:57:25 +01:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01:00
Jeff Young f88c4ccb02 Add an Edit button to the Symbol Properties aliases list
Fixes: lp:1248451
* https://bugs.launchpad.net/kicad/+bug/1248451
2018-01-27 18:57:33 -05:00
jean-pierre charras 54ebd45749 DIALOG_EDIT_COMPONENT_IN_SCHEMATIC: ensure mandatory field names are always correctly translated after changing the locale. 2018-01-26 20:21:12 +01:00
Tomasz Włostowski 7a6e3bf3ed eeschema: remember last browsed directory in the Symbol Lib Table dialog 2018-01-26 18:39:09 +01:00
jean-pierre charras d54418c14a Fix minor compil warnings 2018-01-26 09:35:22 +01:00
Maciej Suminski 8e18aea11d New ERC rule verifying if all units of a component use the same footprint 2018-01-25 12:19:41 +01:00
jean-pierre charras 270a63daac DRAWSEGMENT, S_POLYGON shape: remove useless copies or conversion to std::vector<wxPoint> of SHPE_POLY_SET polygon shape.
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)

Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
2018-01-24 14:22:43 +01:00
Jeff Young c6d0075076 Keep value, footprint and datasheet in sync in multi-unit parts
Fixes: lp:1731743
* https://bugs.launchpad.net/kicad/+bug/1731743
2018-01-23 11:46:27 -05:00
Jeff Young 76885169c4 Fix delete issues in symbol aliases list in libedit.
The alias list now displays the user model (multiple aliases *of*
a root part, rather than a collection of names *including* the
root part).  This simplified the error detection logic, fixing
the first bug in the bug report.

Updating the part in the library is now done uniformly on OK
(which was the second bug in the bug report).

Fixes: lp:1744656
* https://bugs.launchpad.net/kicad/+bug/1744656
2018-01-23 14:49:20 +01:00
Jeff Young 6b9866de8b Sort pins in pin-table.
Fixes: lp:1744509
* https://bugs.launchpad.net/kicad/+bug/1744509
2018-01-21 08:47:26 +01:00
jean-pierre charras 448dbf476c Dialog symbol lib table editor: fix incorrect tool tips
Fixes: lp:1744416
https://bugs.launchpad.net/kicad/+bug/1744416
2018-01-20 10:47:19 +01:00
jean-pierre charras d4dbdcd638 Symbol editor, Pin table editor: always display a icon in Pin Type column
At least on Linux, if a null icon is used as icon in Pin Type column, other icons are not
displayed. So the workaround is to use a neutral icon when a specific icon cannot be used
(i.e. when pins are grouped)

Fixes: lp:1559542
https://bugs.launchpad.net/kicad/+bug/1559542
2018-01-20 09:59:15 +01:00
Jon Evans 10b635ffe2 Clear autoplaced flag when modifiying field orientation/justification
Fixes: lp:1743893
* https://bugs.launchpad.net/kicad/+bug/1743893
2018-01-19 10:09:00 +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 ac1771a9f0 Handle block selection removal of libraries in SYMBOL_LIB_TABLE dialog
Fixes: lp:1741543
* https://bugs.launchpad.net/kicad/+bug/1741543
2018-01-17 09:59:48 +01:00
Wayne Stambaugh 3c9316957d Eeschema: allow remapping if a project symbol library table exists.
Change the behavior of the remapping algorithm to remap even if a
project symbol library table exists in the project file in case a
previous attempt to remap failed.  The existing symbol library table
is backed up to the back folder and rebuilt.

Fixes lp:1741983

https://bugs.launchpad.net/kicad/+bug/1741983
2018-01-12 10:13:41 -05:00
jean-pierre charras de9161be85 Larger dialog size. 2018-01-11 14:21:36 +01:00
jean-pierre charras 47dfabc6c8 Add size control to HTML_MESSAGE_BOX. Fix incorrect default size of a few dialogs.
Clean code: remove useless code and not used parameters.
2018-01-11 10:48:52 +01:00
Chris Pavlina 7e6a6540c8 Implement primitive icon scaling for high DPI
This is meant as a stopgap for 5.0, with plans to add proper scaled
icons in the 6.0 cycle. A function KiScaledBitmap() is added, which
works like KiBitmap() except it scales the bitmap according to the
calling window's font size. Controls have been added to all the main
applications to let the user select scaling manually (these were omitted
from smaller apps that didn't already have a place to put them).

In addition, in eeschema only, the pixel height of the system font is
shown in the options dialog for diagnostics. This is only for collecting
feedback before 5.0 release from users with different displays and will
be removed.
2018-01-10 21:26:06 -07:00
Wayne Stambaugh 998d9179e9 Eeschema: fix library naming bugs in symbol rescuer and re-mapper.
File names with spaces were causing invalid symbol names in both the
rescue library and the cache which would cause both libraries to fail
to load because library symbol names are not escaped so the spaces
tripped up the library parser.  Replace the spaces in the file names
with hyphens and in both the rescuer and the remapping code so the
library nickname in the symbol library table does not contain spaces.

Update the symbol library table dialog to prevent users from defining
library nicknames with spaces.  This is different than the footprint
library table which allows nicknames with spaces.  This solution is
a temporary fix until the new symbol library and schematic file formats
are implemented.

Fix off by one row in illegal nickname error message in the symbol
library table editor.
2018-01-10 16:04:32 -05:00
Maciej Suminski 12041551a1 Removed unnecessary debug messages 2018-01-10 12:03:53 +01:00
Camille f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Wayne Stambaugh 69560ec587 Eeschema, fix bug in edit one field dialog.
Verify the library symbol of the field being edited still exists rather
than use an assertion because it is entirely feasible that the library
symbol or library containing this symbol has been deleted and will cause
a segfault.  Unfortunately there is no way to determine if the symbol is
a power symbol or not so just set it as a regular symbol so the user can
still edit the schematic symbol field.

Fixes lp:1742111

https://bugs.launchpad.net/kicad/+bug/1742111
2018-01-09 09:20:54 -05: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
Chris Pavlina 6cee19d37d eeschema: neatly wrap placeholder text in symbol chooser 2018-01-07 19:30:56 -07:00
Chris Pavlina 7b1c9c145f DIALOG_BOM_EDITOR: DPI-independent size 2018-01-06 20:37:49 -07:00
Chris Pavlina e971b0e698 Don't call FinishDialogSettings in DIALOG_EDIT_COMPONENTS_LIBID
Dialogs displaying a lot of scrollable data should use SetSizeInDU()
instead, as FinishDialogSettings() will set a minimum size equal to
whatever can contain all the data (making it overflow the screen for
large amounts).
2018-01-06 20:08:57 -07:00
Chris Pavlina 119a0f665b DIALOG_SYMBOL_REMAP: raise after remap is complete
On macOS in particular, there is a tendency for this to fall behind
other windows where the user has no clue it's still up.
2018-01-06 14:51:53 -07:00
Chris Pavlina 13bc706518 Fix several dialogs with bad default sizing
- Add helper methods for DPI-independent sizes
- Make splitter sashes visible on macOS
- Remove SetSizeInChars() - wx has a built-in way that I missed
- DIALOG_CHOOSE_COMPONENT: DPI-indep splitter sizes
- DIALOG_RESCUE_EACH: DPI-indep default size and sensible HTML window
  size
- COMPONENT_TREE: DPI-indep sizing
- DIALOG_FP_LIB_TABLE, DIALOG_SYMBOL_LIB_TABLE
2018-01-06 14:39:17 -07:00
Chris Pavlina 57fe3739ca Symbol chooser: base default size on font for DPI flexibility 2018-01-05 22:02:05 -07:00
Chris Pavlina 0945c319f0 eeschema: make footprint preview optional
The footprint preview and selection has been problematic for some users;
I'd rather option it out for 5.0 and work on polishing it for 6.0.
2018-01-03 18:28:44 -07:00
Wayne Stambaugh 202cd43864 Eeschema: minor remapping improvements.
Create separate folder in project path to backup files changed during
remapping.

Add time stamp to backup file names in case multiple remappings are
performed.

Add backup file information to report panel instead of using debug
trace messages.

Disable the remap button if the user does not have write privileges to
the current project path.
2018-01-03 11:25:19 -05:00
Wayne Stambaugh bf44d394c3 Eeschema: fix remapping bug on windows builds.
The Windows drive specifier C: was being interpreted as a valid URL by
wxURI which was performing a URL comparison instead of a file comparison
which always failed in LIB_TABLE_BASE::FindRowByURI().  Change test for
URI to search string for "://" to determine if the comparison should be
a URI (string) comparison or a file (wxFileName) comparison.

Don't run final rescue unless the user performs the remapping.
2018-01-03 08:37:54 -05:00
jean-pierre charras c5b8c749da minor fix: use right parent to show the symbol or footprint viewer in dialog 2018-01-01 18:06:02 +01:00
jean-pierre charras 7d6230ab38 Eeschema: Cannot close opening Library Browser frame when reassigning symbols from the Library Browser (wxGTK specific)
Fixes: lp:1740607
https://bugs.launchpad.net/kicad/+bug/1740607
2018-01-01 13:40:23 +01:00
jean-pierre charras 6bb349e933 Better management of KIWAY_PLAYER frame when called in modal mode, and having the wxFLOAT_ON_PARENT style option.
(previously, did not use the actual parent)
2018-01-01 10:41:43 +01:00
Jeff Young fb597f4298 Enable tab navigation and shift-return-for-OK in multiline text controls for text objects.
Fixes: lp:1420916
* https://bugs.launchpad.net/kicad/+bug/1420916
2017-12-31 09:08:42 -05:00
Wayne Stambaugh 09cff5d8ed Eeschema: minor UI string spelling and coding policy fixes. 2017-12-29 10:44:33 -05:00
Wayne Stambaugh 1175d50486 Eeschema: fix default ERC dialog tab. 2017-12-28 14:17:47 -05:00
Wayne Stambaugh 71ea6dc2b9 Common, 3D viewer, CvPcb, and Eeschema dialog tweaks.
Improve dialog layout and fix UI policy issues with all of the dialog
boxes in the common, 3D viewer, CvPcb, and Eeschema code paths.

Updated the use of component to symbol.
2017-12-26 09:38:45 -05:00
Wayne Stambaugh f7ab50f791 UI string normalization.
Replace all instances of "component" and "part" with "symbol" when
referring to schematic and library symbols.

Replace all instances of "component" with "footprint" when referring to
board and library footprints.

Minor dialog layout fixes to some of the dialogs impacted by the UI
string changes.
2017-12-24 10:04:32 -05:00
jean-pierre charras fe6ade185a DIALOG_UPDATE_FIELDS: make it resizable and fix a few very minor UI policy issues. 2017-12-24 10:38:10 +01:00
Wayne Stambaugh 8f0e6469ca Minor symbol remapping fixes.
The remapping utility would create a new project specific library when a
symbolic link pointed to a library already defined in the symbol library
table.  Now the comparison checks to see if the library path and file
name are actually a symbolic link if the file names are not the same when
the symbol library table entry is a file name rather than a URL.  URLs
are simple string comparisons.

Disable the remap button after the remapping completed.

Remove some commented out code from the edit symbol in schematic dialog.

Fixes lp:1738634

https://bugs.launchpad.net/kicad/+bug/1738634
2017-12-22 08:03:49 -05:00
jean-pierre charras 2398d5ef8b DIALOG_EDIT_COMPONENTS_LIBID: enhancement in orphan automatic remap:
add dialog to choose the right candidate when more than one is found
2017-12-16 14:50:37 +01:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
Wayne Stambaugh 7ca7d9078e Eeschema: fix potential symbol cache library name collisions.
If a schematic contains two symbols with the same name from different
libraries, the cache will contain the last symbol saved with that name.
Prepend the library nickname with the original schematic symbol library
nickname when saving the cache library to prevent name collisions.
2017-12-08 08:32:23 -05:00
Bernhard Stegmaier 1e88695001 Fix initial sizing of 'Fields' table columns in component table view. 2017-12-06 07:30:44 -05:00
jean-pierre charras c0a539959e Fix a few Coverity warnings 2017-12-04 12:46:11 +01:00
Wayne Stambaugh 694ad93385 Move LIB_PART save code to legacy schematic plugin.
This is the last of the object save/load code that was not moved into
the SCH_LEGACY_PLUGIN object.  All schematic and library I/O is now
performed in the SCH_LEGACY_PLUGIN object and as been removed from the
schematic and library objects.

The old single symbol file format has been replaced with the normal
symbol library file format since there was no difference between them
except the SYMBOL token.  The SYMBOL token was no longer being read
since the introduction of the SCH_LEGACY_PLUGIN symbol library loader.

Update the Doxygen comments in all of the modified files.
2017-12-01 11:49:44 -05:00
Seth Hillbrand 692fecea9a Eeschema: don't cleanup unseen schematics
Changes to the schematic shouldn't be made
where the user isn't looking.  Removing the
cleanup in ERC and netlisting prevents
unintended consequences

CHANGE: ERC and Netlist calls do not modify schematic
2017-11-30 10:01:34 -05:00
Wayne Stambaugh b4e9d9b6f7 Symbol rescue dialog improvements.
Make the user prompt an HTML control for improved layout.

Fix some column title sizing issues.  This is not a complete fix but
it seems better than the default sizing done by wxWidgets.

Use symbol terminology instead of part and/or component.

Create trace string source files for a common place for them and their
Doxygen comments.
2017-11-26 18:14:10 -05:00
Wayne Stambaugh 84e360dd0d Symbol library table remapping improvements.
Don't back up schematic files unless the user requests a remap.

Back up all files that could be changed by a remap including the
schematic file(s), cache library, project file, and rescue library
files.

Use an HTML control instead of a static text control for improved layout
of the user remap prompt.

Improve the user prompt in the remap dialog to make it clear that changes
will be made to project files.
2017-11-24 11:43:42 -05:00
jean-pierre charras cd9d81d720 dialog_edit_components_libid: add a tool to remap orphan components.
Orphan components are components that have a link (lib_id) pointing to a non existent symbol in any loaded libraries.
2017-11-23 19:49:53 +01:00
jean-pierre charras d52fd5769d Show a tooltip if dialog_choose_component has no symbol selected. 2017-11-23 13:24:02 +01:00
jean-pierre charras fea9d121b7 dialog_edit_components_libid: UI enhancements, and use viewlib for LIB_ID selection 2017-11-23 10:40:14 +01:00
jean-pierre charras 76d08c8bd2 UI fixes and enhancements in dialog_edit_components_libid. 2017-11-22 17:54:17 +01:00
jean-pierre charras 4d0d56fbd7 Fix incorrect handling of the last component in the component list. 2017-11-22 17:54:16 +01:00
jean-pierre charras 656d4d0dff dialog_edit_components_libid: shows orphan components (components with no symbol found in library) 2017-11-21 18:06:37 +01:00
Oliver f85ce87e44 Toggle LIB_TABLE_ROW enabled/disabled in grid editor
- Checkbox editor for enabled / disabled status
2017-11-21 08:18:17 -05:00
jean-pierre charras f17f604072 Add warning message in dialog_edit_components_libid 2017-11-21 13:09:13 +01:00
jean-pierre charras 8507ea45fc Add a dialog to edit/change components LIB_ID inside a schematic.
This is useful for instance after moving a symbol from a lib to an other lib.
2017-11-21 11:52:40 +01:00
Wayne Stambaugh 8b2b1381c4 Fix symbol library table editor plugin type selection bug.
Remove the placeholders for the upcoming s-expression schematic and
symbol library file format plugin type.  The lack of a valid plugin
implementation was causing an undefined plugin type string in the
plugin type selection cell when new rows were added to the table.

Fixes lp:1733116

https://bugs.launchpad.net/kicad/+bug/1733116
2017-11-19 16:53:31 -05:00
jean-pierre charras 06d0e593ba dialog_sym_lib_table: gives an existing plugin type when creating a new entry in symbol library table
It avoids a strange (for an user) error message on creation.
2017-11-19 10:04:38 +01:00
Maciej Suminski 4c623daa1d Added 'Browse Library' button to Symbol Library Table dialog
NEW: File browser for the Symbol Library Table dialog
2017-11-18 20:05:54 +01:00
Maciej Suminski 759359f602 Moved path normalization functions to a separate file
Normalizing paths to environmental variables might be useful in
many places, therefore it is better to keep them accessible.
2017-11-18 20:05:08 +01:00
Seth Hillbrand d24c88f254 Eeschema: Show abbreviated units
CHANGED: Edit Line Style shows "in" and "mm" instead of full word
2017-11-17 08:20:00 +01:00
jean-pierre charras bdc6a5950b rename plot_common.h to class_plotter.h, a better name, consistent with other class definitions. 2017-11-16 15:53:30 +01:00
jean-pierre charras df6d005fd3 A few cosmetic enhancements in dialog_edit_line_style 2017-11-15 20:28:44 +01:00
Wayne Stambaugh 41a9007b6d Fix assertion in symbol library remap dialog.
Do not attempt to normalize environment variables that are not valid
paths, paths that do not exist, or paths that the user does not have
read access to.

Fixes lp:1731655

https://bugs.launchpad.net/kicad/+bug/1731655
2017-11-15 12:24:51 -05:00
Seth Hillbrand 634fc80916 Eeschema: Update line syle colorbox
Line style colorbox is updated to follow Kicad colorbox
convention.  The alpha channel is also forced to opaque.
2017-11-15 08:10:51 +01:00
Seth Hillbrand 7c0a7f9f7b Adds plot functionality to Eeschema line formats
Dotted, dashed and dash-dot lines are provided in
HPGL, PDF, PS and SVG plot outputs along with line
width and color formatting.

DXF format does not currently provide any dashed
line functionality

A bug in HPGL plotted is corrected.  Previous HPGL
dashed line commands were incorrect, plotting all
lines as solid.
2017-11-15 08:10:51 +01:00
Seth Hillbrand b576189a00 Eeschema: Adding line styling options
NEW: Adds support in eeschema for changing the default line style,
width and color on a case-by-case basis.

CHANGED: "Wire" lines now optionally include data on the line style,
width and color if they differ from the default.

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

Fixes: lp:1405026
* https://bugs.launchpad.net/kicad/+bug/1405026
2017-11-15 08:10:51 +01:00
Wayne Stambaugh d98fc85a83 Improve assert message in symbol table remap dialog.
Fixes lp:1731655

https://bugs.launchpad.net/kicad/+bug/1731655
2017-11-13 14:17:49 -05:00
Wayne Stambaugh 7e7d3004fb Fix UI string typo in rescue dialog error message. 2017-11-12 11:38:31 -05: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
Baranovskiy Konstantin 1412296398 Fix field align settings in dialogs of Eeschema. 2017-11-11 19:48:28 +01:00
Wayne Stambaugh 5181c0ac75 Minor symbol library table edit dialog fix.
A copy and paste error was causing to footprint library table file name
and path to be shown in the symbol library table edit dialog.  Factor
out code in PROJECT::FootprintLibTblName() to PROJECT::libTableName()
to handle both symbol and footprint library table names and create a
new PROJECT::SymbolLibTableName() method to fix the path and file name
in the symbol library table edit dialog.
2017-11-11 10:33:06 -05:00
jean-pierre charras 4af85239ba Internationalize dialog_symbol_remap_base 2017-11-11 11:35:06 +01:00
Baranovskiy Konstantin 0b34d09bc0 Fix double "choose to" in symbol remap dialog. 2017-11-10 07:31:27 -05:00
Wayne Stambaugh 610ff7485f Fix more bugs in the schematic symbol rescuer.
In the rare case when something goes wrong with the symbol library
table remapping, do not attempt to rescue symbols that are neither
in the cache nor in any of the libraries.

The legacy rescue library code overwrote the existing library so
previous rescues would get lost.  If the rescue library exists,
copy it's contents into the new rescue library before adding the
new rescued symbols so no previously rescued symbols are lost.

Fix a null pointer bug in the symbol library editor when no symbol
is loaded.

Set LIB_ID item name to name passed to LIB_PART ctor.

Copy LIB_ID in LIB_PART copy ctor.
2017-11-09 21:24:43 -05:00
Wayne Stambaugh a2e7e7aed4 Clear symbol library list from project file after remapping.
The old symbol library list save/load code does not get called in the
schematic project file configuration code.  Use the LibNamesAndPaths
static function from the PART_LIBS object.

Bump schematic file version from 3 to 4 which represents the switch to
the library table symbol linking which is incompatible with all previous
versions.

Refresh the schematic after running remapping dialog manually.
2017-11-09 18:50:23 -05:00
Wayne Stambaugh 44d81e4005 Minor fixes broken by symbol library table changes.
Add missing CMP_TREE_NODE_LIB_ID type that was inadvertently deleted by
the symbol library table implementation that broke the preselected symbol
tree expansion and highlighting.

Changed CMP_TREE_NODE_LIB_ID type from ALIAS to LIBID for more accurate
description.

Use LIB_ID in COMPONENT_SELECTION object instead of strings of the
library and symbol names.
2017-11-09 18:50:22 -05:00
Wayne Stambaugh 8fd89c881d Final symbol library table changes before merge.
Remove all symbol libraries from the project file after remapping to
prevent symbols that should be loaded from the cache being loaded from
a library further up the search order.  Save the project file to clear
all of the libraries so they never get reloaded again.

Remove the symbol library management dialog and menu entries.

Rename the symbol library table dialog menu entry.

Remove all symbol libraries from default project file to prevent clashes
with the cache library.

Fix illegal symbol naming in Eagle plugin.
2017-11-09 18:50:21 -05:00
Wayne Stambaugh c1f7c1778a Revise symbol rescuer to support symbol library table.
Refactor rescue objects so that they can support derivation.

Factor out legacy rescuer code to perform legacy project rescues.

Create new symbol library table rescuer for rescuing symbol library table
based projects.

Perform the correct rescue type on project load.

Add symbol library table remapping support to the tools menu for run on
demand as applicable.

Add flag to SCH_SCREENS::UpdateSymbolLinks() to allow forcing the symbol
link updates when the library modification hash has not changed.
2017-11-09 18:50:20 -05:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
Wayne Stambaugh 329fc18732 Convert component chooser dialog over to use symbol library table.
Change all of the component tree helper objects to use LIB_IDs instead of
LIB_ALIAS pointers.  LIB_ALIAS pointers are dangerous to use because they
can be deleted in the symbol library editor while the component chooser
dialog has copies of them.  With LIB_IDs, the LIB_ALIAS pointer is found
on demand and can be guaranteed to be valid.

Update the chooser dialog to load the symbol library table instead of the
libraries defined in the project file and return a LIB_ID instead of a
LIB_ALIAS pointer.

Modify SCH_BASE_FRAME::SelectComponentFromLibrary() to handle the LIB_IDs
returned from the component chooser dialog.
2017-11-09 18:50:18 -05:00
Wayne Stambaugh 81e8d8fd89 Symbol library table remapping fixes.
Use GetPath() instead of GetFullPath() when initializing environment
variable table entries KICAD_SYMBOL_DIR and KICAD_PTEMPALTE due to
unexpected trailing path separator which was causing find libraries
by URI to fail.

Don't create a project symbol library table when there are no libraries
not found in the global symbol library table.

Don't add non-existent libraries to project symbol library table.

Clear symbol library table when loading a new schematic.

Minor remapping status message improvements.
2017-11-09 18:50:18 -05:00
Wayne Stambaugh 96c3d5ff21 Enable symbol library table remapping.
Check the if the schematic being loaded has been remapped (no symbol
library table nicknames defined) and remap accordingly.

Fix issues when resolving the library symbol links in the schematic
symbols.

Add cache library fallback when resolving symbols that cannot be
remapped.

Add remap complete message to remap dialog.

Add HasLibrary() helper to LIB_TABLE_BASE.

Fix issues when loading library symbols using symbol library table.

Add hashing function to symbol library table.

Improve the symbol panel message to warn user when cache library is
used to resolve symbol.
2017-11-09 18:50:17 -05:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
jean-pierre charras 08a9dc01c5 Fix minor coding style issues 2017-11-03 10:22:34 +01: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
Kristoffer Ödmark a562525ec9 Use schematic symbol field to show documentation link.
This instead of using the library alias property. But to not break any
library. When adding new components to the schematic, copy the value
from the library into the Field variable only if the field variable would
otherwise be empty.

This way, the context menu for showing the docs is more understandable
for users, and is also changeable from the schematic without having to
modify the actual libraries.

Fixed: lp:1723104
2017-10-23 16:58:56 -04:00
Russell Oliver 869743d573 Kicad Eagle Project Import Improvements. -- schematic and board files are both visible in file selection dialog. -- Allows for the selection of either the board or schematic file. -- silently fails on not detecting the corrosponding board or schematic file. -- all new kicad files are generated in new project directory -- Silently read netlist without generating annotation warnings which synchronises timestamps and paths based on given eagle references, otherwise renumbering schematic references will break links accross schematic and pcbnew. 2017-10-20 08:58:40 +02:00
Ingo Kletti df15e63d41 Fix Unit naming typo in eeschema spice model config 2017-10-16 20:07:26 +02:00
jean-pierre charras e0b9a21417 Modify a few messages to make translations more easy. 2017-10-12 10:39:32 +02:00
jean-pierre charras e626136e29 Eeschema: boom generator: ugly fix on Windows to allow xsltproc.exe working from the command line created from bom dialog.
(On windows, xsltproc.exe does not accept '\' in output filename, only '/' like on Unix, so this separator is converted when possible)
Minor code cleanup
2017-10-09 20:57:41 +02:00
jean-pierre charras 06a59022e4 minor fixes (compil warning and a very minor fix) 2017-10-02 20:39:09 +02:00
Maciej Suminski 85faa0e101 Added a dialog to select fields to be updated 2017-10-02 15:57:23 +02:00
Maciej Suminski d90ac8299d Added 'Update Fields' button in schematic component properties 2017-10-02 15:57:23 +02:00
Wayne Stambaugh 39b27e39a9 Eeschema: silently save project file after schematic plot setting changes.
Don't prompt the user to save the project file after the schematic plot
settings change.  It is not done this way anywhere else in KiCad.

Fixes lp:1478131

https://bugs.launchpad.net/kicad/+bug/1478131
2017-09-26 08:32:04 -04:00
jean-pierre charras 4122aa1c01 Fix translation (I18n) problems 2017-09-20 09:32:37 +02:00
Maciej Suminski 85be485c34 Enable long names for pin numbers and pads
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
2017-09-19 18:19:49 +02:00
Wayne Stambaugh 3d1bebe9f8 Fix tooltip in the edit library symbol properties dialog. 2017-09-18 13:18:49 -04:00
Oliver Walters f299266107 Added button logos to DIALOG_EDIT_COMPONENT_IN_SCHEMATIC dialog 2017-09-14 08:49:55 -04:00
Oliver Walters f529e3100c Altered text buttons to image buttons
- Used same tooltip messages
- Added "MoveFieldDown" button / function
2017-09-14 08:47:43 -04:00
Jean-Samuel Reynaud 21c104fcc7 Fix incorrect (missing) initialisation of m_cur_grid in symbols libraries table dialog box 2017-08-31 09:49:28 +02:00
Wayne Stambaugh ee43728b18 Fix bug when adding symbol library with $ as first character of path name.
Test the result of wxFileName::MakeRelativeTo() before testing to see if
the resulting relative path starts with '.'.  When a library with relative
path that contains a path name with $ as the first character,
MakeRelativeTo() calls Normalize() which attempts to do an environment
variable substitution that concatenates consecutive paths i.e. the path
/foo/$bar ends up being foo$bar which is obviously incorrect.  This fix
is only a fix for absolute paths and files that contain path names that
begin with $.  This still does not resolve the issue when adding a
library file relative to one of the search paths that contains a path
name that begins with a $.  Fixing this would potentially break paths
that are expecting environment variable substitution.

Fixes lp:1712361

https://bugs.launchpad.net/kicad/+bug/1712361
2017-08-24 11:37:10 -04:00
Wayne Stambaugh f781691049 Eeschema: add symbol library table editor dialog.
Create a new dialog to edit global and project specific symbol library
tables.

Add menu entries for new symbol library table editor in schematic editor
and symbol library editor main frame menus.

Add command event handler for symbol library table editor dialog to
SCH_BASE_FRAME so it is accessible from derived frames.

Fix bug in default environment variables initialization.  A test for
existing user defined environment variables was preventing any new
default environment variables added to the list from being initialized.
2017-08-12 08:10:34 -04:00
jean-pierre charras 6bdc9cd25e fix a minor issue in dialog netlist, and add comments in code. 2017-08-11 09:44:06 +02:00
jean-pierre charras 4e96f9990d Use the new color4Dpicker to choose a color in Eeschema.
However, the opacity is not modifiable because the wxDC used in Eeschema does not know the alpha channel.
2017-08-06 10:42:11 +02:00
Wayne Stambaugh 7bf9f8e1c7 Eeschema: add global symbol library configuration dialog.
Create a dialog to give the user options to configure the global symbol
library table the first time Eeschema is run when no global symbol library
table exists.
2017-08-04 15:51:53 -04:00
Dick Hollenbeck 19e6bde09a Rewrite class UTF8 to contain rather than extend std::string storage.
This forces the compiler class specific features rather than borrowing
from the base class's std::string.  In some cases prior to this,
wxString( std::string ) was being called rather than UTF8::operator
wxString() leading to garbled wxStrings.

Added function UTF8::wx_str() which is of great convenience also.

Implicit conversions still work as before, and hopefully more reliably.
2017-07-26 08:30:12 -04:00
Dick Hollenbeck 4e7de8a761 Reverse commit 4011ed4e31.
This commit was too broad and not cognizant of the purpose of the class
UTF8.

Add MAYBE_VERIFY_UTF8() macro, which can trap non-UTF8 encoded strings in
debug builds.

Use that macro conditionally in class UTF8 to trap non-UTF8 encoded strings
being put into UTF8 instances.
2017-07-26 08:26:56 -04:00
jean-pierre charras cb2f3d6304 fix minor typo 2017-07-22 13:46:18 +02:00
Fabrizio Tappero cef616fcd8 fixed text titles that should have only the first word capitilized 2017-07-21 10:19:29 -04:00
Fabrizio Tappero 269238a7ee fixes label text, now only first word is capitilized 2017-07-21 10:19:29 -04:00
Fabrizio Tappero 7be14f774d fixed plot menu labels 2017-07-21 10:19:29 -04:00
Chris Pavlina c78a2ba4f8 Render symbols correctly with convert=0 in chooser
Fixes: lp:1705315
* https://bugs.launchpad.net/kicad/+bug/1705315
2017-07-19 11:43:39 -06:00
Chris Pavlina 94b9524f6d Fix documentation error in DIALOG_CHOOSE_COMPONENT 2017-07-17 15:00:13 -06:00
jean-pierre charras 895c0bb716 Fix a compil warning and a wxASSERT in netlist dialog and component_tree.cpp 2017-07-08 15:58:22 +02:00
jean-pierre charras 3c3ee9b8c3 Fix a few doxygen warnings 2017-06-26 18:12:57 +02:00
Maciej Suminski ac688e688a Fixed selecting components with Enter (DIALOG_CHOOSE_COMPONENT)
Added dedicated event types: COMPONENT_SELECTED, COMPONENT_PRESELECTED.
2017-06-25 23:13:39 +02:00
Maciej Suminski f667f54c52 Moved component tree widget to a separate class 2017-06-19 14:48:53 +02:00
Kristoffer Ödmark 19d5cc7548 Removed all exception specifiers since deprecated.
Exception specifiers are deprecated in cpp11, so went through them all
and removed them from the code.
2017-06-12 13:54:55 -04:00
jean-pierre charras 51bed4bae9 Fix incorrect handling of wxID_CANCEL and Close events in DIALOG_BOM_EDITOR. 2017-06-07 18:43:53 +02:00
danngreen a18d72b5d6 Made BOM editor dialog quasi modal 2017-06-06 13:43:08 -04:00
Cheng Sheng 521e18ddbd "Show Datasheet" button: Resolve env-vars (like ${KIPRJMOD}) if appears.
This way, the datasheets can be stored within the project dir, and referred as ${KIPRJMOD}/relative/path/to/datasheet.
2017-06-06 08:30:35 -04:00
jean-pierre charras c0bb8a30c2 Fixes: lp:1694456
https://bugs.launchpad.net/kicad/+bug/1694456

EEschema load: report "unit value out of range" in sub-sheet, although it is not the case.
2017-05-31 10:20:49 +02:00
jean-pierre charras 2100c29a1a Fixes: lp:1692436 (reset to defaults in Eeschema, edit component properties, puts fields in the wrong position)
https://bugs.launchpad.net/kicad/+bug/1692436
2017-05-24 21:19:26 +02:00
Oliver Walters d4e41c4f97 Component table improvements 2017-05-08 12:43:20 +02:00
jean-pierre charras 342f28f106 dilaog bom editor: fix min sizes. 2017-05-03 08:56:32 +02:00
Oliver Walters 5fe13c01c7 Improvements for component table 2017-05-03 08:56:31 +02:00
jean-pierre charras e4d2924ee2 Make a sentence translatable in dialog_bom_editor. 2017-05-02 19:51:02 +02:00
Oliver Walters 29e3e55ad3 Removed BOM functionality
- Removed ability to generate BOM to file
- Removed Save/Cancel window when closing table
- No longer updates table <after> table is closed
- Bugfix for field names (previously comparison was case insensitive)
2017-05-02 09:40:02 -04:00
Oliver Walters 48893ab2b1 Fixed UNDO behaviour
- Undo actions are pushed to the appropriate sheet(s)
- Each sheet's actions are grouped together
2017-05-02 09:39:56 -04:00
Oliver Walters d792e36151 Reworked UI
- Buttons are enabled/disabled within wxUpdateUI events
- Save/Cancel dialog used to close window and apply (or reject) changes
2017-05-02 09:39:40 -04:00
Oliver Walters 8dd4aca73b Mark schematic as dirty
Notify schematic of changes when window is closed
2017-05-02 09:39:24 -04:00
Oliver Walters 5126332c57 Fixed wxString::Format assert 2017-05-02 09:39:08 -04:00
Oliver a39856485c Added component table dialog
- Allows grouping of matched components
- Bulk edit of components in a spreadsheet window
- User can choose to save / undo changes
- All changes are pushed to the undo stack in a single operation
- Export table to HTML / CSV output
2017-05-02 09:39:01 -04:00
Maciej Suminski 801e50450b Revert "Fix component chooser dialog crash if there are no FPs available"
This reverts commit 0a8a659ff7.
The patch is incorrect, as it removes the FP chooser drop-down list.
I cannot reproduce the crash with the patch reverted, so there must
have been something specific to my configuration at that time.
2017-04-13 10:58:10 +02:00
Wayne Stambaugh 578f01bfd9 Fix debug build error in symbol remap dialog. 2017-04-05 08:43:05 -04:00
Wayne Stambaugh 36606ceeb7 Add symbol library table remapping dialog.
Create dialog and code to allow legacy schematic symbols to be remapped
from the old library path look up method to the new symbol library table
method by using the following steps:

  1) Create a project symbol library table containing all of the symbol
     libraries defined in the old library look up list not found in the
     global symbol library table.

  2) Map each symbol to the correct symbol in the symbol library table
     if possible.

Recreate library link to symbols so look up method can be converted to
symbol library table properly.

Add function to SCH_COMPONENT to link library symbols using the symbol
library table.
2017-04-04 18:31:28 -04:00
jean-pierre charras 2f9be81b19 Very minor change in 2 strings to help I18n translations. 2017-04-02 11:51:40 +02:00
Fabrizio Tappero dcaa0559de Minor edit component properties dialog improvements. 2017-03-31 15:30:00 -04:00
Maciej Suminski 0a8a659ff7 Fix component chooser dialog crash if there are no FPs available 2017-03-31 17:15:09 +02:00
Chris Pavlina 3234087dc9 Move wxDataViewCtrl manipulators out of dialog_choose_component.cpp
Fixes: lp:1677925
* https://bugs.launchpad.net/kicad/+bug/1677925
2017-03-30 21:47:14 -04:00
Chris Pavlina feba091594 Highlight the first choice in rescue dialog
Fixes: lp:1455970
* https://bugs.launchpad.net/kicad/+bug/1455970
2017-03-27 08:45:05 -04:00
Chris Pavlina 4011ed4e31 Convert UTF8 to/from wxString correctly around LIB_ID
Fixes: lp:1675942
* https://bugs.launchpad.net/kicad/+bug/1675942
2017-03-24 21:38:00 -04:00
Chris Pavlina 849b3c2a4b Add footprint select dropdown to component chooser, serious refactoring
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
    - FOOTPRINT_ASYNC_LOADER to load without freezing UI
    - Rewrite loader threads as queue-driven thread pool
    - Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
2017-03-24 09:20:27 -04:00
Maciej Suminski b47a6e415b Fixed a memleak in DIALOG_CHOOSE_COMPONENT 2017-03-23 16:52:33 +01:00
jean-pierre charras ccfad8306b eeschema: fix an annoying issue created by commit fdb53f28e6b666f242c3d24dfbfb0e4050bfa2ad: enter a label size starting by 0 (like 0.3) was not possible. 2017-03-14 20:40:21 +01:00
Oliver fdb53f28e6 Improvement for label edit dialog in eeschema:
- Added wxTE_RICH property to label text controls (allows ctrl+backspace in Windows)
- Added numeric validator to text size
2017-03-14 13:08:36 -04:00
Chris Pavlina bbaa29fbc4 Refactor FOOTPRINT_PREVIEW_PANEL
- Pull out compound widget bits into FOOTPRINT_PREVIEW_WIDGET
- Move all pcbnew-specific bits *inside* pcbnew; implementation should
  be private for users
- Make a few class members and inner types private
2017-03-10 23:26:45 -05:00
jean-pierre charras 4605cae588 Displays the number of instances to modify in rescue dialog. 2017-03-09 19:16:24 +01:00
Chris Pavlina 82f587f4ff Show the busy cursor while loading component chooser 2017-03-08 15:34:11 -05:00
Chris Pavlina 2232edfb87 Rewrite DIALOG_CHOOSE_COMPONENT without wxFormBuilder
This will allow near-future use of controls not supported by
wxFormBuilder with minimal hackery.
2017-03-08 12:00:49 -05:00
Chris Pavlina 2bb234d3f5 Fix assert in DIALOG_EESCHEMA_CONFIG when removing many libs at once 2017-03-06 17:24:12 -05:00
Chris Pavlina f8415633bd Switch component chooser to wxDataViewCtrl, refactor
This refactors COMPONENT_TREE_SEARCH_CONTAINER into a Model-View-Adapter
architecture comprising:

- eeschema/cmp_tree_model.h
    - CMP_TREE_NODE: Base class representing a searchable library
        set with scoring and sorting

        - CMP_TREE_NODE_UNIT
        - CMP_TREE_NODE_ALIAS
        - CMP_TREE_NODE_LIB
        - CMP_TREE_NODE_ROOT

- eeschema/cmp_tree_model_adapter.h
    - CMP_TREE_MODEL_ADAPTER: mediator between wxDataViewCtrl (via
        wxDataViewModel) and CMP_TREE_NODE*

                   +---+                      +------------------+
 +---+  Generates  | A |                      |       VIEW       |
 | M |  from libs  | D |   wxDataViewModel    |------------------|
 | O | <---------- | A | <------------------> |  wxDataViewCtrl  |
 | D |             | P |                      |------------------|
 | E | <---------> | T | <------------------- |    wxTextCtrl    |
 | L | UpdateScore | E | UpdateSearchString() |------------------|
 +---+             | R |                      |                  |
                   +---+                      +------------------+

Representing the data with a proper model allows the wxDataViewCtrl to
be updated in bulk, which is significantly faster than the old method of
populating it one item at a time. This also adds flexibility if more
data is to be added in the future (which may come in handy with the
upcoming .sweet format, as that adds more ways components can be related
to each other).

Replacing the wxTreeListCtrl with a wxDataViewCtrl also significantly
reduces the general GUI quirkiness, as wxDataViewCtrl is much more well
behaved.
2017-03-06 09:50:48 -05:00
Chris Pavlina 551b2b2312 Component chooser: fix ugly border on macOS 2017-03-04 12:29:49 -05:00
Chris Pavlina 4618e6c7f8 Component chooser: event and focus cleanup 2017-03-04 11:14:04 -05:00
Chris Pavlina e6de99cc86 No more wxSearchCtrl in DIALOG_CHOOSE_COMPONENT
It is buggy on several platforms
- macOS: eats Esc key
- Windows: poor text alignment
2017-02-24 16:01:58 -05:00
Chris Pavlina d3cb23b7d7 Remove unneeded state member in DIALOG_CHOOSE_COMPONENT 2017-02-23 20:59:15 -05:00
Chris Pavlina 2683af26c0 Fix DIALOG_CHOOSE_COMPONENT enter and double-click events 2017-02-23 20:51:29 -05:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
Chris Pavlina 35a8d78921 Fix component selector segfault on MacOS
Fixes: lp:1666081
* https://bugs.launchpad.net/kicad/+bug/1666081
2017-02-21 18:37:37 -05:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Chris Pavlina 57de6ec0af Remove SetFocus hack after changing to wxSearchBox 2017-02-20 14:41:21 -05:00
Chris Pavlina 0182e454c5 Adjust component chooser GUI slightly 2017-02-19 19:31:53 -05:00
Chris Pavlina 70301a6244 Component chooser: display correct unit in reference field 2017-02-19 15:11:35 -05:00
Chris Pavlina 69165aa0a0 Do not show hidden fields in the component selector
This is not necessary anymore, as they are displayed in the info box.
2017-02-19 13:43:50 -05:00
Chris Pavlina a61be7e00e Move LIB_PART::Draw drawing options into a struct
This makes configuring the options clearer, avoiding the long list of
non-self-explanatory arguments at the small cost of requiring a few more
lines.
2017-02-19 13:40:26 -05:00
Chris Pavlina 5dea5e2ada Component chooser: add missing info panel updates 2017-02-19 10:01:45 -05:00
Chris Pavlina b4f4ff9353 Clean up updateSelection() megafunction 2017-02-19 09:24:40 -05:00
Chris Pavlina 3d88cc2a36 Rename method for consistency with similar class
FOOTPRINT_PREVIEW_PANEL::AddToPanel -> InstallOnPanel
2017-02-19 07:53:02 -05:00
Chris Pavlina 2632b1d1a0 Revamp component chooser and add footprint preview
This commit brings several changes:

- Add a footprint preview pane to the eeschema component selector
- Upgrade component list to wxTreeListCtrl
- Factor out wxTreeListCtrl subclass TWO_COLUMN_TREE_LIST which
  patches a column size bug
- Linkify datasheet URL in info pane
2017-02-18 21:39:55 -05:00
Wayne Stambaugh eb06b35852 Eeschema: fix schematic I/O plugin symbol name issue.
LIB_ID was changing the symbol name due to the parser dropping everything
past the first '/' character which is interpreted by LIB_ID as the item
version.  Add flag to ignore this in LIB_ID::SetLibItemName() and add a
new ctor so the library nickname, item name, and revision can be set as
required to prevent the standard LIB_ID parsing.

Fix a few places where PART_LIBS functions FindLibraryAlias() and
FindLibPar() were translating wxString symbol names to LIB_IDs where the
LIB_ID parser was truncating the symbol name.
2017-02-11 13:44:17 -05:00
Wayne Stambaugh 7ccdca5ced Use library ID to store library symbol information in the schematic symbol.
Use LIB_ID instead of wxString for storing the library symbol information
in the schematic symbol in preparation for the upcoming symbol library table
implementation.

Change the FindLibAlias and FindLibPart functions in the PART_LIBS object
instead of wxString.  Please note that only the library ID name is used to
search the list of libraries.  The library nickname is ignored.  Once the
symbol library table is implemented and full LIB_IDs are defined, the
library search code will no longer be used and will only be kept to load
older schematics that have not been converted.

Move SCH_LEGACY_PLUGIN_CACHE definition so that the legacy plugin knows
how to properly delete the cache object.
2017-02-10 08:36:59 -05:00
Chris Pavlina bca74853d1 Display more information in component selector 2017-02-07 15:01:20 -05:00
jean-pierre charras 7dddb1d1c1 When editing a label property it always goes to right orientation by itself
Fixes: lp:1661264
https://bugs.launchpad.net/kicad/+bug/1661264
2017-02-02 16:50:49 +01:00
Diogo Condeco 8033c6fa9a Eeschema one field dialog text selection.
This patch selects the text in the dialog_one_field.
For annotated symbols the number is selected. For unannotated symbols the ? is selected.
All other cases the entire text is selected, including references in library editor.
2017-01-31 16:01:08 -05: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
Wayne Stambaugh 8e7fe9dab2 Fix spice simulator build error due to EDA_TEXT changes. 2017-01-25 09:25:05 -05:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.

Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.

Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
2017-01-25 08:03:32 -05:00
diogocondeco 1a05c8a5a8 eeschema/add_component setfocus moved into OnInitDialog
SetFocus executed by OnInitDialog wxInitDialogEvent handler
2017-01-23 12:31:00 -05:00
jean-pierre charras ccdfabc866 Add tool tips to autosave widget in dialogs (pcbnew and eeschema) 2016-11-22 11:26:32 +01:00
Aylons Hazzud 5dc43a1d77 Gray out "Units are not interchangeable" if 1 unit
Fixes: lp:1503921
* https://bugs.launchpad.net/kicad/+bug/1503921
2016-11-18 11:42:42 +01:00
jean-pierre charras f15a59f0ad Component Editor and Component viewer: add option to show the electrical pin type. 2016-11-04 12:13:22 +01:00
jean-pierre charras 3bf1717002 Fix a minor cosmetic issue in dialog edit libentry fields 2016-10-22 18:43:12 +02:00
jean-pierre charras 1924478558 Eeschema: editors: show the pin position (when clicking on it) in message panel.
Pin properties dialog: show pin position ( and allow editon ).
2016-10-18 18:59:26 +02:00
jean-pierre charras d1e4399a29 dialog edit libentry fields in lib: Add button to edit spice parameters, and therefore to add spice parameters in lib components. 2016-10-15 20:05:03 +02:00
Wayne Stambaugh fc07716aed Eeschema: schematic I/O plugin preparation work.
Rename PART_LIB GetEntryNames() and RemoveEntry() to GetAliasNames() and
RemoveAlias() respectively for improved readability.

Rename PART_LIBS FindLibraryEntry() to FindLibraryAlias() improved
readability.

Remove commented out PART_LIBS::FindLibraryEntries().

Remove PART_LIB::GetFirstEntry() and update all effect code accordingly.

Remove unused PART_LIB::SetFileName() method.

Remove unused PART_LIBS::RemoveAllLibraries() method.
2016-10-14 19:29:24 -04:00
Simon Richter b0f9864bc4 Clean up warnings from exception handlers
The exception objects caught are either not referenced at all, or only in
debug builds. This avoids the warnings for the unused variables.
2016-10-10 11:08:49 -04:00
Maciej Suminski efdfaebf62 Support subdirectories in relative paths in Spice model dialog 2016-10-07 16:07:38 +02:00
Chris Pavlina 9547dd4e52 Fix GetBoundingBox hiding overloaded virtual 2016-09-30 22:32:24 -04:00
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Dick Hollenbeck 964b5a1830 Split IO_ERROR out of richio.* and store Problem() and Where() separately 2016-09-20 11:56:23 -04:00
jean-pierre charras 1051732580 DIALOG_SPICE_MODEL_BASE: cosmetic enhancements (mainly better look of spice units table in Passive notebook page) 2016-09-19 18:48:07 +02:00
jean-pierre charras 0719f8d214 Fixes: lp:1624659 (fix some issues in countries which are not using a point as decimal separator)
https://bugs.launchpad.net/kicad/+bug/1624659
Small enhancement in dialog_spice_model_base.cpp: add comments about spice values notation.
2016-09-17 18:34:44 +02:00
jean-pierre charras f3d4f7322b Simulator dialogs: Fix incorrect handling of Validate(), which was called for all widgets by the default wxID_OK button handler. It is now called only for the active page of these dialogs (as wanted in code), therefore only for used widgets.
Note: strangely, this issue was noticed only on Windows, not on Linux.
2016-09-17 14:38:34 +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
jp-charras b63f2f81b7 Fixes: lp:1619436
https://bugs.launchpad.net/kicad/+bug/1619436
Eeschema crashes when selecting a text editor from the REC dialog. (Linux Only)
It happens only if a text editor was never selected in Kicad.
2016-09-05 09:02:15 +02:00
Wayne Stambaugh f477cc958c Eeschema: PART_LIB object clean up.
* Rename redundant function PART_LIB::GetEntry() to PART_LIB::GetAlias() which
  is more descriptive and move the GetAlias() function which was nothing more
  than a call to GetEntry().
2016-09-02 19:40:18 -04:00
Maciej Suminski fcedef836a Revert "Do not use double component primitives in Spice netlist exporter"
This commit creates more issues than resolves. It could happen that
there are components with different reference types (e.g. U1 and IC1)
that would be later converted to X1, causing a conflict.
2016-08-31 11:51:17 +02:00
Maciej Suminski 67573f15be Do not use double component primitives in Spice netlist exporter
Fixes: lp:1617768
* https://bugs.launchpad.net/kicad/+bug/1617768
2016-08-30 14:25:56 +02:00
jean-pierre charras 13cfe74956 Simulator dialogs: fix minimal sizes and best sizes. 2016-08-20 17:25:51 +02:00
jean-pierre charras c0b1e4cd38 Do not allow spaces in component name (value field) in component library editor, in dialogs (Edit field, Create component).
In component libraries, a space in name breaks the library, and is not allowed.
2016-08-19 18:42:39 +02:00
Maciej Suminski 7ea120c2a1 Spice model editor by default looks for libraries in the project directory when there is no library assigned 2016-08-19 17:33:26 +02:00
jean-pierre charras 5ed19b6e82 Dialogs for simulator: cosmetic enhancements, make them translatable and resizable. Remove 2 printf used in debug. 2016-08-15 09:53:15 +02:00