Commit Graph

3167 Commits

Author SHA1 Message Date
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
Seth Hillbrand 6f3e55d344 wx: Add double-click handling in disambiguation cases
Fixes: lp:1154020
* https://bugs.launchpad.net/kicad/+bug/1154020
2017-12-15 16:32:19 -05: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
Seth Hillbrand 87938b06b4 Eeschema: TestDanglingEnds on Cross-probe
Fixes: lp:1672381
* https://bugs.launchpad.net/kicad/+bug/1672381
2017-12-14 16:04:30 -05:00
jean-pierre charras dee93e5eeb Minor fix: rename LIB_PART::m_dateModified to LIB_PART::LIB_PART::m_dateLastEdition
and use m_dateLastEdition type for LIB_PART::m_dateLastEdition
2017-12-14 17:27:40 +01:00
jean-pierre charras dc6c98310f Export drawing in symbol editor results in error message and no drawing file (.sym file) saved
Fixes: lp:1737875
https://bugs.launchpad.net/kicad/+bug/1737875
2017-12-14 16:45:30 +01:00
jean-pierre charras 33c2d6e4ba Fixed disappearing components in COMPONENT_TREE in library editor
The reason the component tree widget was cleared on Windows is the fact
m_adapter->UpdateSearchString( m_query_ctrl->GetLineText( 0 ) ) is
called on any change of the symbol. But if m_query_ctrl is empty,
m_query_ctrl->GetLineText( 0 ) returns the "hint" (currently the word
"Search") not the actual value, so there is no "candidate" symbol in
list. Using m_query_ctrl->GetValue() returns the actual value and fixes
this issue.

Fixes: lp:1737132
* https://bugs.launchpad.net/kicad/+bug/1737132
2017-12-13 10:34:14 +01: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
jean-pierre charras 5f6f03b16c HIERARCHY_NAVIG_DLG: allows closing the dialog by ESC key (like other dialogs)
cleanup hierarch.cpp code
2017-12-12 09:54:42 +01:00
Maciej Suminski aedf24d944 Fix crash when renaming a component in symbol library editor
COMPONENT_TREE::STATE used wxDataViewItem to store the selection, but it
will point to a deleted object if the selection was removed. Switched to
storing the selection using LIB_ID as it is much safer to use.
2017-12-11 11:22:24 +01:00
Seth Hillbrand cb422e29df Eeschema: Filter out empty libraries
Fixes: lp:1736930
* https://bugs.launchpad.net/kicad/+bug/1736930
2017-12-09 08:33:58 -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
Seth Hillbrand f0fecba9e1 Eeschema: add junction to 3-component/wire connection
Fixes: lp:1737014
* https://bugs.launchpad.net/kicad/+bug/1737014
2017-12-08 17:19:47 -05:00
jean-pierre charras 4c4b11b45f change UTF8& operator+=( wchar_t ch ) to UTF8& operator+=( unsigned ch ), because swig does not like wchar_t.
(on Linux, wchar_t is a unsigned int, on Windows a unsigned short, so always using a unsigned int do not create issues)
2017-12-08 17:57:53 +01: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
jean-pierre charras bfc3804115 Minor fixes related to timestamp_t. Move timestamp_t definition to base_struct.h 2017-12-07 13:33:59 +01: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
Simon Richter 0dad728e86 Pass -DBOOST_TEST_DYN_LINK to all parts of test 2017-12-06 19:28:57 -05:00
Simon Richter 227afe77c0 Avoid C-style array member init (illegal in C++)
This is not part of the C++ language, and only supported in some compilers.
2017-12-06 19:28:17 -05:00
Wayne Stambaugh 8af9aa7574 Eeschema: allow for partial schematic loading.
With the implementation of the legacy schematic plugin, any I/O error
when parsing the schematics would prevent the entire schematic from
being loaded.  This change restores (somewhat) the previous behavior
where as long as the root schematic is loaded properly, then all of
the remaining sub-sheet will attempt to load.

Add GetError() method the SCH_PLUGIN object to allow for partial
schematic loading.

Check the error message contents when no exception was caught to warn
the user of any accumulated errors.

Fixes lp:1690644

https://bugs.launchpad.net/kicad/+bug/1690644
2017-12-06 19:11:09 -05:00
Bernhard Stegmaier 1e88695001 Fix initial sizing of 'Fields' table columns in component table view. 2017-12-06 07:30:44 -05:00
Seth Hillbrand 8b68a1736a Eeschema: Set "edited" flag on newly created sheets
Forces newly created sheet to be considered for saving when created.

Fixes: lp:1736054
* https://bugs.launchpad.net/kicad/+bug/1736054
2017-12-05 08:19:55 -05:00
Seth Hillbrand bdc1fb04be Eeschema: Correct wire/bus/entry connections
Fixes the connection display and dragging behavior of wires,
busses and their entries.

The implemented drag logic is:
-busses and bus-bus entries drag each other when connected at endpoints
-wires and wire-bus entries drag each other when connected at endpoints
-entries do not drag wires or busses when connected to wire middles
-wire-bus entries do not drag busses

The implemented connection logic is:
-bus-bus entries connect busses to busses but not wires
-wire-bus entries connect wires to busses but not wire to wires or
busses to busses
2017-12-04 15:19:46 -05:00
jean-pierre charras cd3122d8cd Refactor hierarch.cpp: remove old dead code and clean current code. 2017-12-04 12:46:13 +01:00
jean-pierre charras c0a539959e Fix a few Coverity warnings 2017-12-04 12:46:11 +01:00
Maciej Suminski 36a54aef21 Component Tree: fixed the sort order 2017-12-04 10:52:05 +01:00
Maciej Suminski 45bf919923 Restoring the previous performance of COMPONENT_TREE widget
It turns out the fastest way to update wxDataViewCtrl is to nuke the
model and rebuild it from scratch rather than via
ItemAdded()/ItemDeleted() update notifications.

Fixes: lp:1734773
* https://bugs.launchpad.net/kicad/+bug/1734773
2017-12-04 10:42:37 +01:00
Seth Hillbrand a240f88785 Eeschema: Remove wire under a placed component
CHANGE: In Eeschema, when placing a component directly over an existing
wire, the wire is automatically removed where it shorted pins.

This helps workflow in Eeschema, allowing one to quickly add components
to existing lines.

Fixes: lp:1678449
* https://bugs.launchpad.net/kicad/+bug/1678449
2017-12-03 18:42:57 -05:00
jean-pierre charras 6be5596620 Symbol Editor: fix a bug in global pin edit: changes were not always taken in account when saving the symbol in lib. 2017-12-03 11:50:50 +01:00
jean-pierre charras 3109343b96 Fix a compil issue with gcc 4.8.4
Fixes: lp:1735909
https://bugs.launchpad.net/kicad/+bug/1735909
2017-12-02 14:22:43 +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 76dbbfdf92 Eeschema: Clarify disambiuation of entry types
Replace the disambiguation menu entry for
wire2bus and bus2bus entries with their menu icon.
2017-12-01 08:19:52 +01:00
Seth Hillbrand 069448f20e Eeschema: Automatically manage junctions
CHANGE: eeschema automatically adds and removes junctions
when required by the schematic

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

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

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

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

Fixes: lp:1491052
* https://bugs.launchpad.net/kicad/+bug/1491052
2017-11-30 10:02:24 -05:00
Seth Hillbrand b5ec5f9a73 Eeschema: Moving BreakSegment into SCH_EDIT_FRAME
BreakSegment now breaks a known segment and BreakSegments
breaks all segments. This allows functions to break a
segment without needing to iterate through the whole list.
2017-11-30 10:02:15 -05:00
Seth Hillbrand e9a297de5b Eeschema: Removing DC dependencies 2017-11-30 10:02:05 -05:00
Seth Hillbrand bf32cc2555 Eeschema: Moving SchematicCleanup to SCH_EDIT_FRAME
SchematicCleanup function moved from SCH_SCREEN to
SCH_EDIT_FRAME to allow access to the undo stack as we
are changing the schematic.
2017-11-30 10:01:58 -05:00
Seth Hillbrand c6632bdded Eeschema: Remove zero-length wires in RemoveBacktracks
RemoveBacktracks call removes zero-length wires as well
2017-11-30 10:01:50 -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
Seth Hillbrand 0fd2405c00 Eeschema: Add two utility functions to sch_line
Add IsSameQuandrant and IsParallel functions
2017-11-30 10:01:26 -05:00
Seth Hillbrand d0b2f078fe Eeschema: Unify delete operations
DeleteItemsInList now shares the code for DeleteItem.
SCH_FRAME::DeleteItem removes junctions that are no longer needed.
2017-11-30 10:01:21 -05:00
Seth Hillbrand f8e0099ecc Eeschema: Add 'append' option to undo
Allows eeschema to add elements to previous undo commits,
permitting stacking of changes through multiple calls
2017-11-30 10:01:15 -05:00
Seth Hillbrand 7b1938d999 Eeschema: IsCorner check for layer match
SCH_LINE can represent a bus, wire or graphic line.  Checking
for the corner needs to distinguish between these types.

Fixes: lp:1635984
* https://bugs.launchpad.net/kicad/+bug/1635984
2017-11-29 08:54:00 -05:00
jean-pierre charras f992d144d9 Eeschema, LIB_PIN::SetNumber(): ensure spaces are replaced by _ and set modify flag on change.
Fixes: lp:1734187
https://bugs.launchpad.net/kicad/+bug/1734187
2017-11-28 21:02:29 +01:00
Wayne Stambaugh 0acdd9f02e Remove obsolete symbol library item load code. 2017-11-27 14:42:22 -05:00
Maciej Suminski 480b1c2592 Fixed a crash when _cvpcb.kiface is not available when opening cvpcb 2017-11-27 17:11:12 +01: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
jean-pierre charras 6e728739bb Eeschema: multi part with empty value (~) generates incorrect netlist
Fixes: lp:1734453
https://bugs.launchpad.net/kicad/+bug/1734453
2017-11-26 10:51:14 +01: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
Maciej Suminski 1d48fd28e3 Generate safe alias names in case of name collisions
Duplicated aliases were given " (copy x)" suffix. There are two
problems: aliases cannot contain spaces and the string was translatable
which could create more issues. Now duplicated aliases receive "_x" suffix.
2017-11-24 17:39:58 +01:00
jean-pierre charras 37f68f824b minor cosmetic enhancement: menu "Edit Components to Symbol Library Links": add specific icon. 2017-11-24 10:19:23 +01: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
Wayne Stambaugh b82bd8e0c5 Fix symbol names with illegal library ID characters.
Change the legacy schematic plugin to preserve illegal LIB_ID characters
when load schematics prior to version 4.

Check for illegal LIB_ID symbol names during project rescue.  Rename and
rescue any symbols with illegal LIB_ID names.

Add static methods to LIB_ID object for testing for and fixing names
with illegal characters so there is uniform code for doing so.

Update the Eagle plugin symbol loader to fix symbol names using the new
LIB_ID fix illegal names method.

Fixes lp:1732236

https://bugs.launchpad.net/kicad/+bug/1732236
2017-11-23 10:52:55 -05: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 1aff677562 Eeschema, getpart.cpp: fix incorrect call to lib browser
(was not called if a symbol was not previously selected)
2017-11-23 12:09:35 +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 c3015f4671 Fix incorrect LIB_ID exported by viewlib when used as component chooser
(was not to the new format libname::symbol_name)
2017-11-23 10:40:13 +01:00
Seth Hillbrand faadbea10e Eeschema: Select component connections in drag
Dragging a full line that is connected to a component
now drags the component as part of the block, maintaining
connections.

Fixes: lp:1167714
* https://bugs.launchpad.net/kicad/+bug/1167714
2017-11-22 12:01:58 -05: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
Maciej Suminski 6b74f8ef48 Library Editor: fixed an assert after removing libraries with Symbol Library Table dialog 2017-11-22 14:15:51 +01:00
Maciej Suminski d76f7d7bd2 Library Editor: fixed an assert after canceling add library action 2017-11-22 14:03:01 +01:00
Maciej Suminski baec127852 Library Editor: show also empty libraries 2017-11-22 13:40:14 +01:00
Maciej Suminski aaabf8ab78 Library Editor: fixed a crash when creating a new library with existing file 2017-11-22 13:40:14 +01:00
Maciej Suminski 8b0041bf9a Library Editor: progress dialog when loading libraries 2017-11-22 13:40:14 +01:00
Maciej Suminski 1625129054 Library Editor: removed duplicated 'Duplicate Block' (doh..) 2017-11-21 23:40:21 +01:00
Maciej Suminski e25a1feb25 Component Tree: restore expanded nodes after search query is cancelled 2017-11-21 23:18:55 +01:00
Maciej Suminski 4a942a9810 Library Editor: do not change background for the active part/library 2017-11-21 23:18:55 +01:00
Maciej Suminski ed059383c7 Library Editor: removed library actions from the part context menu 2017-11-21 23:18:55 +01:00
Maciej Suminski 0b7ab40288 Updated cut/copy/paste toolbar icons
Removed cut & copy toolbar icons in the schematic editor, as they
were inaccessible. One cannot have an item selected and move the
mouse outside the canvas area due to autopanning.

Added paste icon to the library editor.
2017-11-21 23:18:55 +01:00
Maciej Suminski 256276cf1c Library Editor: copy/cut/paste for graphical items 2017-11-21 23:18:55 +01:00
Maciej Suminski 4fe06656a6 Minor refactor in LIB_EDIT_FRAME::Process_Special_Functions()
Shortened 'screen->m_BlockLocate' to 'block'.
2017-11-21 23:18:55 +01:00
Maciej Suminski 6b87c2d6b1 Library Editor: faster filtering on Windows
Preventing redraw by freezing wxDataViewTreeCtrl significantly
improves the performance.
2017-11-21 23:18:55 +01:00
Maciej Suminski e0e4e5f1be Library Manager: alternative way to manage dynamic fixes
Tree nodes now have an additional field 'InTree' to determine
if the view is aware of its existence. This way, there is no need
to rebuild the data structures from scratch when they need to be
filtered.
2017-11-21 23:18:55 +01:00
Maciej Suminski db4bd0c2db Library Editor: fixed dynamic updates
Duplicate entries were caused by multiple model assignment done by
CMP_TREE_MODEL_ADAPTER_BASE::AttachTo().
2017-11-21 23:18:55 +01:00
Maciej Suminski 891cf783fb Library Editor: Windows fixes 2017-11-21 23:18:55 +01:00
Maciej Suminski d3d2770093 Library Editor: fixed library manager synchronization to sym-lib-table 2017-11-21 23:18:55 +01:00
Maciej Suminski b229286313 Library Editor: fixed a crash after a library is removed 2017-11-21 23:18:55 +01:00
Maciej Suminski 6400e31d5b Library Editor: more coherent icons for part import/export 2017-11-21 23:18:55 +01:00
Maciej Suminski 8dabcc0125 Fixed signed vs unsigned integer comparisons 2017-11-21 23:18:55 +01:00
Maciej Suminski 658dd362cd Library Manager: clear the deleted part buffer when original file is saved 2017-11-21 23:18:55 +01:00
Maciej Suminski 86f71a9eb4 Library Editor: notify is library is read-only 2017-11-21 23:18:55 +01:00
Maciej Suminski d2d3680774 Library Editor: more descriptive symbol table picker dialog 2017-11-21 23:18:55 +01:00
Maciej Suminski 50dc0ffd9d libedit: Call OnModify after a pin has been moved
Library Editor updates its working copy of the edited part every time
it is modified. If LIB_EDIT_FRAME::PlacePin() calls OnModify() too early,
the working copy does not include the last change.
2017-11-21 23:18:55 +01:00
Maciej Suminski 95754632c2 Library Editor: renamed 'component' to 'part' 2017-11-21 23:18:55 +01:00
Maciej Suminski a4f475c97d Library Editor: icon improvements
- new icons: 'save part', 'add library'
- added a toolbar icon for 'add library'
- made icons on toolbar and menu consistent
2017-11-21 23:18:55 +01:00
Maciej Suminski 44117a7d5e Library Editor: added a hotkey to save a component 2017-11-21 23:18:55 +01:00
Maciej Suminski d900e89382 Library Editor: fixed a bug when multiple components were shown as active 2017-11-21 23:18:55 +01:00
Maciej Suminski ba4515885b Library Editor: select part in the widget component on create/paste/duplicate component 2017-11-21 23:18:55 +01:00
Maciej Suminski 7d45d8b23c Library Editor: made the component tree pane resizable 2017-11-21 23:18:55 +01:00
Maciej Suminski 076633bb5e Library Editor: disable 'save component' for read-only libraries 2017-11-21 23:18:55 +01:00
Maciej Suminski 33242fd111 Library Manager: do not clear modified flag on 'save library as' action 2017-11-21 23:18:55 +01:00
Maciej Suminski df8dc01e8d Library Manager & Editor: comments 2017-11-21 23:18:55 +01:00
Tomasz Włostowski 7fc1e1d53c Library Editor: component cut/copy/paste/duplicate 2017-11-21 23:18:55 +01:00
Maciej Suminski 2ed19668cd Eeschema: removed protos.h
Contained duplicated function declarations with invalid comments.
2017-11-21 23:18:55 +01:00
Maciej Suminski 8f1897adfd minor refactor 2017-11-21 23:18:55 +01:00
Maciej Suminski 3ace948197 block_libedit.cpp: minor refactor
Replaced numerous GetScreen()->m_BlockLocate with a shorter reference.
2017-11-21 23:18:55 +01:00
Tomasz Włostowski 72de4e1857 libedit: field edition should be undoable 2017-11-21 23:18:55 +01:00
Maciej Suminski f2257ccccc Eeschema: created a header for list operations 2017-11-21 23:18:55 +01:00
Maciej Suminski 03c5620efe Library Editor: removed 'load component' hot key 2017-11-21 23:18:55 +01:00
Maciej Suminski 73ec145c33 Library Manager: wrapped risky calls with try..catch 2017-11-21 23:18:55 +01:00
Maciej Suminski fb4875c681 Library Editor: refactored code for creating backup files 2017-11-21 23:18:55 +01:00
Maciej Suminski f6f1dff9d0 Library Editor: enable part buffering for faster save, better 'save as' implementation
Previous 'save as' implementation simply copied the original file, so
the buffered changes were not save.
2017-11-21 23:18:55 +01:00
Maciej Suminski 9fcaa83b7d Library Manager: fixed a memleak in LIB_EDIT_FRAME::OnCreateNewPart() 2017-11-21 23:18:55 +01:00
Maciej Suminski a2b6c8e20a Library Manager: select library when none is set for import/create new part 2017-11-21 23:18:55 +01:00
Maciej Suminski bb83b73f76 Library Editor: mark the current library/part with a different color 2017-11-21 23:18:55 +01:00
Maciej Suminski dfcd42f5ef Library Editor: save libraries added in the editor to sym-lib-tables 2017-11-21 23:18:55 +01:00
Maciej Suminski 26304c54ed Library Editor: fixed update UI event handlers 2017-11-21 23:18:55 +01:00
Maciej Suminski 24ddbbaf25 Library Editor: display a list of libraries to save on close 2017-11-21 23:18:55 +01:00
Maciej Suminski 2c20a10242 Removed friendship in LIB_PART and LIB_ALIAS classes.
It is not required and may a source of unnecessary temptation. There is
no place for friendship in rough C++ world.
2017-11-21 23:18:55 +01:00
Maciej Suminski aa81f5b98d Removed LIB_PART::SetLibId()
To avoid potential incoherency, LIB_ID is defined by setting the part
name and library.
2017-11-21 23:18:55 +01:00
Maciej Suminski 445ac50588 Keep LIB_ID and LIB_PART name/library in sync
Updates LIB_ID::LibItemName field when a part is renamed and LIB_PART
name when a new LIB_ID is set.

Similarly, LIB_ID::LibNickName field is updated when a library set, but
there is no easy way to assign library when LIB_ID::LibNickName is
modified.
2017-11-21 23:18:55 +01:00
Maciej Suminski 4c4f5ae962 Unified way of setting LIB_PART name
LIB_PART name is stored in three places that might be changed
independently:
- the first LIB_ALIAS in m_aliases
- LIB_FIELD with VALUE ID
- m_name wxString field

This is potentially leads to an incoherent LIB_PART state. To prevent
this, all fields are changed using only one method: LIB_PART::SetName().

LIB_PART::m_name has been removed as the same information is available
in two other variables.
2017-11-21 23:18:55 +01:00
Maciej Suminski 3589244ff3 Library Editor field edit dialog takes data from LIB_MANAGER 2017-11-21 23:18:55 +01:00
Maciej Suminski 5c61b61c27 Improved synchronization algorithm for LIB_MANAGER<->COMPONENT_TREE 2017-11-21 23:18:55 +01:00
Maciej Suminski a789b735e9 Library Manager: logic 2017-11-21 23:18:55 +01:00
Maciej Suminski 769c6a8d51 Library Manager: user interface 2017-11-21 23:18:55 +01:00
Maciej Suminski d29e115804 CMP_TREE_MODEL: set LibID for library nodes
LibID needs to be set for libraries as well to be able to tell which
library has been selected in the component tree widget.
2017-11-21 23:18:55 +01:00
Maciej Suminski 0d190639f1 Extracted CMP_TREE_MODEL_ADAPTER_BASE class 2017-11-21 23:18:55 +01:00
Maciej Suminski 3288a5f8b8 Right-click context menus for COMPONENT_TREE widget 2017-11-21 23:18:55 +01:00
Maciej Suminski 42220579df Const modifiers 2017-11-21 23:18:55 +01:00
Maciej Suminski 3bdcdd808b Fix minor warnings 2017-11-21 23:18:55 +01:00
jean-pierre charras 945325d63a Eeschema: fix incorrect display of pin number in ERC messages and marquers. 2017-11-21 18:39:59 +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
Wayne Stambaugh 8de70f3dd0 Fix symbol library viewer crash.
Handle exception in best zoom method when a symbol could not be loaded
from the symbol library table.  This was triggered by an empty symbol
library table but could be triggered by any exception thrown while
loading the symbol.

Fixes lp:1733111

https://bugs.launchpad.net/kicad/+bug/1733111
2017-11-21 09:30:56 -05:00
Oliver e25a777c41 Add progress dialog when loading symbol libraries
- Provides UX feedback for user
2017-11-21 08:18:51 -05: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
Oliver 7cdb78e852 Added "enabled" parameter for LIB_TABLE_ROW
- Read and write from lib-table working
2017-11-21 08:18:06 -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
Maciej Suminski 422b7dd551 Removed declaration of non-existent method (SCH_SHEET::Load()) 2017-11-20 09:16:13 +01:00
Julius Schmidt 375a4e28d6 fix MANDATORY_FIELDS comparisons (need to exclude -1) 2017-11-20 08:48:01 +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
Maciej Suminski 33cf082c41 Fixed library path resolution in Spice netlist exporter
SEARCH_STACK is a deprecated method for getting the list of paths where
one could look for a file. Instead it tries the project path and
environmental variables.
2017-11-19 11:38:57 +01:00
jean-pierre charras 31083a4060 Better menu item label and tool tip.
Modify incorrect menu label.

Fixes: lp:1733113
https://bugs.launchpad.net/kicad/+bug/1733113
2017-11-19 10:49:28 +01: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
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
Wayne Stambaugh e97ce6ee4f Use legacy schematic plugin for loading schematics in all code paths.
Use the legacy plugin schematic loader in the sheet edit and append
schematic code paths.

Check for fully qualified LIB_ID objects (must have library nickname)
when loading existing schematics when edit sheets.

Rewrite append schematic feature to handle import issues rather than
change the name and file name of all of the sheets in the imported
schematic.  This includes the following:
- Load the schematic into a temporary SCH_SHEET object.
- Make sure the imported schematic does not cause any hierarchy
  recursion issues.
- Verify the imported schematic uses fully qualified #LIB_ID objects
  (symbol library table).
- Check to see if any symbol libraries need to be added to the current
  project's symbol library table.  This includes:
- Check if the symbol library already exists in the project or global
  symbol library table.
- Convert symbol library URLS that use the ${KIPRJMOD} environment
  variable to absolute paths.  ${KIPRJMOD} will not be the same for
  this project.
- Check for duplicate symbol library nicknames and change the new symbol
  library nickname to prevent library name clashes.
- Update all schematic symbol LIB_ID object library nicknames when the
  library nickname was changed to prevent clashes.
- Check for duplicate sheet names which is illegal and automatically
  rename any duplicate sheets in the imported schematic.
- Clear all of the annotation in the imported schematic to prevent
  clashes.
- Append the objects from the temporary sheet to the current page.
- Replace any duplicate time stamps.
- Refresh the symbol library links.

Add support code to SCH_SCREEN object to assist with schematic import.

Doxygen comment cleaning.

Fixes lp:1731760

https://bugs.launchpad.net/kicad/+bug/1731760
2017-11-18 08:10:58 -05:00
Seth Hillbrand b6884d3423 Eeschema: Improve wire merging
CHANGED: wires now merge along the full length rather than just
endpoints.  Wires also merge at oblique angles when aligned.
2017-11-17 17:44:18 +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 a3c4b508f8 Fix a very minor issue in eeschema when plotting in SVG format. 2017-11-16 19:49:07 +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
Seth Hillbrand af8b71ac87 Eeschema: Fix bug in block selector
The block selector needs to add all connected items
to the block.  Lines marked skip should not affect
the next item tested.
2017-11-16 08:30:39 +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
jean-pierre charras eaaa85c2c0 Make a few sentences more easy to translate. 2017-11-15 15:38:45 +01:00
jean-pierre charras 0517f78085 eeschema: store line style using a more readable format 2017-11-15 14:08:27 +01: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