Commit Graph

3046 Commits

Author SHA1 Message Date
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