Commit Graph

350 Commits

Author SHA1 Message Date
Seth Hillbrand ffcf3b01fc Fixup issue with adding junctions
Segfault when we pass a component to the routine as it expects to see a
selection.
2019-11-27 11:13:01 -08:00
Franck Jullien a5f8340654 eechema: add junction if needed when component is placed
Fixes: lp:1849376
* https://bugs.launchpad.net/kicad/+bug/1849376
2019-11-26 19:23:02 -08:00
Ian McInerney 087a90cf99 eeschema: Update titlebar when searching schematics
Fixes: lp:1851641
* https://bugs.launchpad.net/kicad/+bug/1851641
2019-11-24 01:25:00 +00:00
Ian McInerney 7339eb31eb eeschema: Allow bus entry labels to rotate and mirror
Fixes: lp:1853079
* https://bugs.launchpad.net/kicad/+bug/1853079
2019-11-23 23:35:21 +00:00
Jeff Young fb52124426 Fix several issue with bus entry connectivity.
When dragging a bus the entry is connected to the bus so the wire
connected to the entry (if any) needs to stretch.

While an entry can connect in the middle of bus, it cannot connect
in the middle of a wire.

Fixes: lp:1849973
* https://bugs.launchpad.net/kicad/+bug/1849973
2019-11-18 11:36:30 +00:00
Ian McInerney 1df7b718d9 eeschema: Allow labels to rotate on bus unfold 2019-11-15 20:43:56 +00:00
Seth Hillbrand 42f5c944b3 libedit: When pasting keep original multi-unit
Copy/Paste should keep the original items' designation for all units and
conversion type.  If it was specified in the original copy, we should
keep the same specification when pasting (but update for the current
frame)
2019-11-12 16:11:08 -08:00
Jeff Young 9d288968e7 Be more explicit about extent of schematic cleanups.
The new connectivity algorithm had a tendency to cleanup
globally, but that could insert undo records from other sheets
into the current screen's undo stack.  Needless to say, this
was a recipie for segfaults.

Fixes: lp:1846247
* https://bugs.launchpad.net/kicad/+bug/1846247
2019-11-10 23:25:54 +00:00
Seth Hillbrand 81ce588a00 eeschema: Set sheet unit number when setting unit
The auto increment needs to ensure the unit number is updated in two
places.  Hierarchy and draw list.

Fixes: lp:1851431
* https://bugs.launchpad.net/kicad/+bug/1851431
2019-11-05 14:04:01 -08:00
Jeff Young 984c64677e Hook up rotate & flip to bus entries when drawing them.
Also adds support for the bus entry shape hotkeys while drawing.

Fixes: lp:1849967
* https://bugs.launchpad.net/kicad/+bug/1849967
2019-11-05 17:22:51 +00:00
Seth Hillbrand bbf355a12f eeschema: Fix an issue with duplicate timestamps
Duplicating into a non-clone still doesn't get a new timestamp, so we
need to explicitly set it.
2019-10-29 16:48:19 -07:00
Seth Hillbrand 868ff5bb2c Right click gets a new object if the mouse has moved
Right click is a pointing operation combined with a request for the
context menu.  We need to highlight the user's intended object when they
have moved their mouse to a new element instead of showing the context
menu for the selected object.

However, in cases where the selection is difficult to make, it is
sometimes helpful to select the item first, then right-click.  In these
cases, we keep the selection where the mouse remains inside the selected
object's bounding box.
2019-10-29 16:11:06 -07:00
Seth Hillbrand 7b2d6ab40e eeschema: Allow mult-part placement option
When placing a new component in the schematic, this allows the user to
iterate through all units in the selected component without re-opening
the choose part dialog.  It also allows the optional addition of
multiple copies of the same component to be placed in the schematic.

Fixes: lp:1806217
* https://bugs.launchpad.net/kicad/+bug/1806217
2019-10-29 12:20:14 -07:00
Seth Hillbrand e533ea4ae6 eeschema: Keep selection with only components
Adding a field to a selection changes the bounding box and count for
rotation.  This can cause odd offsets when the field is rotated against
the selection center rather than the bounding box as well as with the
component.

Fixes: lp:1849078
* https://bugs.launchpad.net/kicad/+bug/1849078
2019-10-28 10:50:26 -07:00
Seth Hillbrand 080275b4ee Cleanup wire merge code 2019-10-18 20:15:29 -07:00
Seth Hillbrand 92011d91d2 eeschema: Testing for static/dynamic cast failure 2019-10-18 15:29:26 -07:00
Seth Hillbrand 363281dd4d eeschema: add junction when needed for broken wire
The break wire command will break all wires at a point.  If there are
multiple crossing wires, we need to check to see if a junction might be
required to reflect the new connection.

Fixes: lp:1848450
* https://bugs.launchpad.net/kicad/+bug/1848450
2019-10-17 12:22:57 -07:00
Jeff Young d9336e9f97 Reset autoplace flag when a field is moved with respect to its component.
Fixes: lp:1843929
* https://bugs.launchpad.net/kicad/+bug/1843929
2019-10-01 15:31:52 +01:00
Seth Hillbrand f2bf9fa534 eeschema: Prevent crash on move/drag re-entry
Restarting a move/drag operation breaks the stack by starting the tool
without popping it on exit.

TODO: implement RAII for these stack push/pop
2019-09-11 17:01:16 -07:00
Jeff Young 1a375a1e71 Better handling of SPICE current probe statements. 2019-09-10 11:07:47 +01:00
Jeff Young f21e24cd17 Fix pin rotatation and SPICE current probe statement for 2-pin symbols
Fixes: lp:1843159
* https://bugs.launchpad.net/kicad/+bug/1843159
2019-09-08 22:54:49 +01:00
Jeff Young 44a1cf9f1b Implement quiet-mode for selection clearing.
Also adds comments for exising quiet-mode calls.

Fixes: lp:1843177
* https://bugs.launchpad.net/kicad/+bug/1843177
2019-09-08 19:45:35 +01:00
Jeff Young 0ff20c18a3 More direct selection handling.
Fixes: lp:1842750
* https://bugs.launchpad.net/kicad/+bug/1842750
2019-09-07 20:52:17 +01:00
Jeff Young 3996a490a1 Re-allocating a std::vector invalidates its iterators.
When we add enough SHEET_PINs that the vector has to grow, it
re-allocates the vector causing our for-loop to get its knickers
tied in a knot.

Fixes: lp:1842394
* https://bugs.launchpad.net/kicad/+bug/1842394
2019-09-04 11:50:56 +01:00
Jeff Young 8bbbc66e46 Another attempt to fix the crash-on-selection bug.
Fixes: lp:1842394
* https://bugs.launchpad.net/kicad/+bug/1842394
2019-09-03 22:29:05 +01:00
Jeff Young 54a85cfaa2 Not everything in a VIEW_GROUP is an EDA_ITEM.
Fixes: lp:1842394
* https://bugs.launchpad.net/kicad/+bug/1842394
2019-09-03 17:24:50 +01:00
Jeff Young efbc802f4d Fix sheet rotation issues.
1) When sheet pins are on 3 or more sides there's no point in switching
the orientation to vertical.
2) Careful that we don't cause the sheet to walk when rotating and the
sheet-name or file-name is longer than the side it's on.

Fixes: lp:1841714
* https://bugs.launchpad.net/kicad/+bug/1841714
2019-09-02 22:36:55 +01:00
Jeff Young fc50ddda64 Implement Paste Special for eeschema.
Also changes the normal paste behaviour to only clear annotations
when a collision is found.

Fixes: lp:1837002
* https://bugs.launchpad.net/kicad/+bug/1837002
2019-09-02 19:24:29 +01:00
Jeff Young 5e353e8967 Fix another case of selection getting out of sync with dragged items.
Use a big hammer this time.

Fixes: lp:1839780
* https://bugs.launchpad.net/kicad/+bug/1839780
2019-08-31 20:23:06 +01:00
Jeff Young 33625dbd9d Add support for cut/paste of unsaved sheet content.
Fixes: lp:1841801
* https://bugs.launchpad.net/kicad/+bug/1841801
2019-08-30 21:56:57 +01:00
Jeff Young 71c7bf3274 Avoid ghosting items in original location when pasting. 2019-08-29 23:56:16 +01:00
Jeff Young 02a7a79e0d Use resolved path when trying to load sheet content.
Also, if it can't be loaded then at least initialize it so that we
don't crash later (trying to access a NULL screen).

Fixes: lp:1841801
* https://bugs.launchpad.net/kicad/+bug/1841801
2019-08-29 23:56:16 +01:00
Jeff Young bc450853ae More robust solution for adding dragged items to selection.
Fixes: lp:1839780
* https://bugs.launchpad.net/kicad/+bug/1839780
2019-08-29 23:56:16 +01:00
Seth Hillbrand 83b2332f1f eeschema: Check for proper type before dereference
When bundling a selection, we need to ensure that we have correct types
before attempting to dereference.

Fixes: lp:1841919
* https://bugs.launchpad.net/kicad/+bug/1841919
2019-08-29 08:47:26 -07:00
Seth Hillbrand 0d3f6a4930 eeschema: Remove Save All
Saving individual parts of a schematic can break the schematic.  This
moves the schematic save option to save all sheets rather than just the
current sheet.

Fixes: lp:1840383
* https://bugs.launchpad.net/kicad/+bug/1840383
2019-08-27 20:21:02 -07:00
Jeff Young 5348f88a8f Add sheet pins to candidate list by hand (as they're not in the view).
Fixes: lp:1841555
* https://bugs.launchpad.net/kicad/+bug/1841555
2019-08-27 21:08:36 +01:00
Jeff Young a5a237ac32 Improve readability of flag checking. 2019-08-27 19:23:07 +01:00
Jeff Young 49a0907c55 Force deletion of junctions which were selected.
Fixes: lp:1841456
* https://bugs.launchpad.net/kicad/+bug/1841456
2019-08-27 19:23:07 +01:00
Jeff Young b109aba663 Add a file browser to the Sheet Properties dialog.
Fixes: lp:1840459
* https://bugs.launchpad.net/kicad/+bug/1840459
2019-08-26 00:45:34 +01:00
Jeff Young 23fd4b64dd Remove curly braces from netname escaping context.
They're now used for bus definition control characters.
Also fixes the sheet pin edit dialog to correctly escape/unescape
netnames.

Fixes: lp:1840834
* https://bugs.launchpad.net/kicad/+bug/1840834
2019-08-22 10:53:39 +01:00
Jeff Young cc93d82025 Don't drop selection until unfold net has been chosen.
Fixes: lp:1831466
* https://bugs.launchpad.net/kicad/+bug/1831466
2019-08-21 15:35:02 +01:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Seth Hillbrand 3135b63976 Eeschema: Update pins on paste
We use the pin cache to mark the pin locations for future operations.
This needs to be updated after paste.

Fixes: lp:1840286
* https://bugs.launchpad.net/kicad/+bug/1840286
2019-08-16 09:32:35 -07:00
Ian McInerney 49dd5d838c libedit: Fix inverted Y axis on move command
Also clean up some code formatting issues
2019-08-15 20:13:18 +01:00
Jeff Young 29af26565d Fix re-entrancy issue in LibEdit move tool. 2019-08-15 15:51:27 +01:00
Jeff Young 8ba7d4570c Move warp-mouse-on-move setting from Eeschema settings to common settings.
It's also used by the Symbol Editor, and will likely be used by
Pcbnew and friends in the future.
2019-08-15 12:53:04 +01:00
Jeff Young 206b40621e Fix bugs in Eeschema paste.
1) don't ASSERT; use exceptions (which can be caught) instead.
2) clean up LIB_LOGGER so it's only used during sync
3) fix typos in wxLogMessage() calls so they produce output.
4) throw on unrecognized token in loadContent().
5) if clipboard can't be pasted as content then paste as text.

Fixes: lp:1840172
* https://bugs.launchpad.net/kicad/+bug/1840172
2019-08-15 10:00:23 +01:00
Jeff Young b4c8657904 Fix non-visible-part or conversion items from getting selected.
Also renames lib_draw_item to lib_item to match the class.

Fixes: lp:1840170
* https://bugs.launchpad.net/kicad/+bug/1840170
2019-08-15 10:00:23 +01:00
Jeff Young 3cdf88f2c6 CERN copyrights for work packages. 2019-08-14 09:35:15 +01:00
Jeff Young e855b244ae Highlight whole net for simulation voltage probe. 2019-08-12 22:21:09 +01:00