Commit Graph

181 Commits

Author SHA1 Message Date
jean-pierre charras 86f5d4e665 Eeschema: fix incorrect/incomplete annotation clearing in duplicate and paste block (happens in complex hierarchy) 2018-09-04 18:46:03 +02:00
jean-pierre charras 181ce46b91 Eeschema: fix incorrect references clearing for shared sheet paths.
Previously, when creating a new instance of a sheet, the full set of references
was cleared.
Moreover, if this sheet has sub-sheets, the annotation was incorrectly handled

Now only (and all) new sheet path(s) created have a reference cleared, as expected.
(new sheet paths can be more than one, if the new instance of the sheet has sub-sheets)

Fixes: lp:1789048
https://bugs.launchpad.net/kicad/+bug/1789048
2018-09-04 12:36:38 +02: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 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
Simon Richter 8444b1b617 Add missing header 2018-06-08 17:15:17 -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
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
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
Jeff Young 7b734551d3 Make sure pin-caches are up-to-date before testing dangling ends.
Fixes: lp:1767745
* https://bugs.launchpad.net/kicad/+bug/1767745
2018-04-29 16:55:24 +01:00
Jeff Young 5e5e80d392 Don't allow panel to overwrite values set in Spice Model editor.
Fixes: lp:1766920
* https://bugs.launchpad.net/kicad/+bug/1766920
2018-04-26 19:13:19 +01:00
Simon Richter 7e47ef7471 Fix warnings for unreferenced local variables 2018-04-18 15:08:37 -04:00
Jeff Young 3be876c388 Cleanup of trace logs from Simon Richter. 2018-04-17 17:27:18 +01:00
Maciej Suminski 58c27398cb Eagle SCH import: improved implicit connections resolution
Nets assigned by power pins are weak, meaning they are valid
as long as there is nothing else attached to such pins. This patch
checks whether there are other wires or pins attached to a power pin
before placing a global net label.

Fixes: lp:1755191
* https://bugs.launchpad.net/kicad/+bug/1755191
2018-04-12 18:12:22 +02:00
Seth Hillbrand 649809a38f Standardize Keywords->Key words 2018-03-09 09:43:53 -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
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 e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01: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 4298d4ff4e Change missed UI string termonology from part/component to symbol. 2018-01-03 14:19:26 -05:00
Wayne Stambaugh 03e9f0c94a Eeschema: fix broken library symbol link for missing libraries.
When an attempt to resolve a library symbol link having a library
nickname that was no longer found in the symbol library table, the
symbol resolution was not falling back to the cache library due to
a silently handled exception.  Add check for valid symbol library
table nickname before attempting to resolve symbol link to prevent
exception bypassing falling back to the cache library.

Fixes lp:1740609

https://bugs.launchpad.net/kicad/+bug/1740609
2017-12-31 10:07:58 -05:00
Seth Hillbrand 3f24128f17 Eeschema: Updates pin cache correctly for multi-unit components
Fixes: lp:1738615
* https://bugs.launchpad.net/kicad/+bug/1738615
2017-12-17 14:44:12 -05:00
Seth Hillbrand 8e764f85a4 Optimizing speed of sch_component pin references
Pins are weak_ptrs to the library, so they require a lock() before
accessing.  This imposes a performance hit on fast loops that access
the pin list repeatedly.  This patch caches the pin position locally
for each component, updating only when needed.

Fixes: lp:1737363
* https://bugs.launchpad.net/kicad/+bug/1737363
2017-12-12 17:48:50 -05:00
Seth Hillbrand 394749f1d6 Eeschema: calculate not-connected pins correctly
Show the NC box only on pins connected via the same component,
indicating a stacked pin group.  Do not show NC box on pins for
different components with the same symbol.
2017-12-08 17:20:08 -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
Henner Zeller 3f57fa5d24 Change time_t in the functions that deal with timestamps to a new typedef timestamp_t (defined as a long).
that makes sure the c++ side and swigged Python side agree on the type, because time_t create problems in Python scripts.
2017-12-07 13:16:33 +01:00
Julius Schmidt 375a4e28d6 fix MANDATORY_FIELDS comparisons (need to exclude -1) 2017-11-20 08:48:01 +01:00
Wayne Stambaugh a0473614b5 Remove all schematic object load and save code.
All of the schematic object load and save code is implemented in the
legacy schematic plugin so it is no longer required.

Remove unused file with old schematic file loader.

Doxygen comment cleaning.
2017-11-18 08:53:13 -05: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
Wayne Stambaugh 168bf5e4b0 Symbol library archive bug fixes.
Move FindAlias() inside a try/catch block as is can throw an exception.

Don't abort adding symbols to library when a symbol cannot be found in
the symbol library table or the cache library.  Instead, queue up error
messages and display them after attempting to add all of the symbols.

Always save the library file even if some of the symbols could not be
archived.

Catch IO_ERRORs in SCH_COMPONENT resolve to prevent unhandled exceptions
further up the stack.
2017-11-09 18:50:22 -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 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
Maciej Suminski e29d77c891 'Update Field Values' tool for eeschema 2017-10-02 15:57:23 +02:00
Wayne Stambaugh 34abef3f5a Fix build error caused in previous commit. 2017-08-01 17:21:03 -04:00
Wayne Stambaugh 863db59a3d Eeschema: improve schematic symbol message panel information.
Add information when dummy symbol is used for library symbols that could
not be found to give the user some useful information to help track down
the broken link rather than display an empty message panel.
2017-08-01 15:34:59 -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
Wayne Stambaugh 85a0a371b1 Add support to resolve schematic symbol links using symbol library table.
Add Resolve() and ResolveAll() methods the SCH_COMPONENT object to use the
symbol library table to obtain links to the library symbols.

Add LoadAlias() method to SYMBOL_LIB_TABLE to find an alias by it's LIB_ID.

Clean up Doxygen comments to match coding policy changes.
2017-06-27 11:22:58 -04:00
Andrey Fedorushkov ddec8036c1 Eeschema: fix an other erroneous "unit value out of range" test. 2017-05-31 15:43:28 +02:00
Oliver Walters ea855c1abf Fixed duplicate field names
- Now works correctly even if users overload default field names
2017-05-22 15:29:33 -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
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
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
jean-pierre charras 28a6ca1e23 Eeschema: fix wrong position of symbol fields when adding a symbol in a schematic
Fixes: lp:1665718
https://bugs.launchpad.net/kicad/+bug/1665718
2017-03-12 17:04:42 +01:00
jean-pierre charras 2a91d7bc21 Speed up SCH_COMPONENT::ResolveAll(). 2017-03-09 15:46:12 +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
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 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
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