Commit Graph

5346 Commits

Author SHA1 Message Date
Jonatan Liljedahl 25abdd9e9c eeschema: Fix refreshing of selection shadow on text fields when zooming.
Fixes #3652 | https://gitlab.com/kicad/code/kicad/issues/3652
2019-12-10 13:10:26 +01:00
Wayne Stambaugh 30da2b31ea Eeschema: fix multiple symbol rescue bug caused by commit 54f066fe.
Use the root symbol when comparing against the cached symbol when
checking to see if a symbol changed.  When the original symbol is
a derived symbol, the test will always fail.

Force a symbol link refresh on a rescue to prevent stale links from
crashing the connection graph refresh when running the project rescue
on demand.

Force a symbol link refresh on project load to prevent stale links from
symbol link changes from crashing the connection graph when the project
rescue in invoked.

Fixes kicad/code/kicad#3645
2019-12-09 14:47:29 -05:00
Mark Roszko a130ed9968 Fix improper SetValue usage on radio buttons 2019-12-09 00:40:08 -05:00
Jonatan Liljedahl 034bfb0919 eeschema: More work on selection highlight thickness
Bring back old zoom-level factor scaling constant and
change selection width to absolute unit instead of
floating point multiplier.
2019-12-07 09:33:32 +00:00
Jonatan Liljedahl 681f6bc707 Eeschema: Add option for selection highlight thickness
ADDED new option to set selection highlight thickness.
Also change selection shadow width constants to
make the selection thickness change less drastically
with the zoom level.
2019-12-07 09:33:32 +00:00
Jean-Pierre Charras 97b0b20a65 Fix properties dialog bug in symbol library editor.
Remove unused panel rather than calling Hide() method which draws the
hidden page as a background of the shown page.
2019-12-06 11:33:52 -05:00
Wayne Stambaugh 9fe2c4b21f Fix a few more symbol library inheritance bugs.
Replace some C casts with C++ dynamic_cast.

Fix iterator bug when deleting inherited symbols from legacy file format
symbol library cache.

Remove unnecessary const when return wxString object instead of reference.
2019-12-06 11:33:52 -05:00
Wayne Stambaugh 8e150521a2 Fix a few minor symbol library inheritance bugs.
Don't clobber value file when load aliases in legacy symbol library cache
parser.

Use actual symbol library LIB_PART pointer rather than a flattened copy
of the symbol.  This fixed a bug when displaying the parent field in the
message panel for derived symbols.

Simplify the flatten code by copying the parent and updating the lesser
information from the inherited symbol.
2019-12-06 11:33:52 -05:00
Wayne Stambaugh 54f066fed7 Implement simple inheritance for library symbols.
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support.  Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added.  The LIB_ALIAS information saved
in the document files was move into the LIB_PART object.  This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.

REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.

NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
2019-12-06 11:33:52 -05:00
Seth Hillbrand 6983c56cf8 Use const references where possible
This avoids copy cost on local vars where we only read.
2019-12-05 14:40:22 -08:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
Jeff Young 089ce90de3 Fix some issues with the previous commit. 2019-12-02 23:35:19 +00:00
Jeff Young 9b36489270 Make sure that libraries are always sorted consistently.
Fixes #1847481 | https://gitlab.com/kicad/code/kicad/issues/1847481
2019-12-02 21:52:50 +00:00
Jeff Young d4816d843d Check /all/ libraries when toggling the Save All toolbar button. 2019-12-02 20:48:22 +00:00
Jeff Young 3af3bf894c Make sure the IS_MOVED flag gets set when breaking out of a bus.
This (among other things) causes an update-preview event to be sent
when modifying it (such as rotating).

Fixes: lp:1854456
* https://bugs.launchpad.net/kicad/+bug/1854456
2019-12-02 20:01:44 +00:00
jean-pierre charras 4bf7ca49b8 Commit test 2019-11-30 20:21:17 +01:00
Seth Hillbrand d20d310fcc Fix compile error on Linux
The wxArrayString doesn't have a standard assignment operator to
std::vector<wxString> so we iterate over the members.

Fixes: lp:1854562
* https://bugs.launchpad.net/kicad/+bug/1854562
2019-11-30 05:24:35 -08:00
Jon Evans 8b87dc7e0f A slightly better ERC check for hierarchical labels
Fixes: lp:1839822
* https://bugs.launchpad.net/kicad/+bug/1839822
2019-11-29 21:11:44 -05:00
Jon Evans 972d765aea Use direct call to update highlighting on new sheet load 2019-11-29 21:11:44 -05:00
Jon Evans 78add8f4bd Mark ERC compare operators as const
Not including these is a compile error on MSW/VC
2019-11-29 21:11:44 -05:00
Jon Evans f23e151b90 Use wxArrayString instead of vector<wxString> in BUS_ALIAS
Fixes linker errors on Windows/VC
See: https://trac.wxwidgets.org/ticket/10884
2019-11-29 21:11:44 -05:00
Jeff Young 102b530162 Fix library tree updating bug present at least on OSX. 2019-11-29 17:55:01 +00:00
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
Jonatan Liljedahl e517069a51 Eeschema: Add options for selection appearance
ADDED: Three new options that affects selection appearance:
- Draw selected text items as box
- Draw selected child items
- Fill selected shapes
2019-11-26 19:57:11 -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
Jonatan Liljedahl 7c7d9c3e3f Eeschema: simulator plot: allow standard mac pan and pinch to zoom 2019-11-25 09:24:31 -05:00
Ian McInerney 10ccc6da2a libedit: Disable editing toolbar items when no part is loaded 2019-11-24 12:24:49 +00: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
Ian McInerney 99b9354a51 Add clear recent files action to the menus
ADDED: Menu item to allow the recent file lists in each program to be
cleared

Fixes: lp:1821685
* https://bugs.launchpad.net/kicad/+bug/1821685
2019-11-23 23:35:21 +00:00
jean-pierre charras 71cd8c57bf ADDED: Pcbnew, add "pin function" (pin name in eeschema) to pads.
The pin name defined in Eeschema is now available as pad info.
Useful for the board designer (the pin function is displayed in the message panel).
Needed for the Gerber P&P files.
2019-11-23 09:12:43 +01:00
jean-pierre charras e6346c7408 Pcbnew: fix crash on Linux (when opening Edit Spice model in component properties)
It happens when the spice library model shown in dialog is a large file.
Looks like the wxTextCtrl used to displays the library content
creates the crash ( GKT bug?) for large texts.

The fix is to replace this wxTextCtrlt by a wxStyledTextCtrl.
It has advantages (does not crash... and much faster display) and
inconvenients (cannot disable editing).

Fixes: lp:1853161
https://bugs.launchpad.net/kicad/+bug/1853161
2019-11-21 13:13:15 +01:00
Wayne Stambaugh 773f45aae3 Eeschema: fix sheet file name case sensitivity bug.
Apparently there are some issues with wxString::CmpNoCase() that was
causing the sheet file name case sensitivity test to incorrectly fail.
Converting the name strings to lower case before comparing resolved
the issue.
2019-11-19 16:06:36 -05:00
Wayne Stambaugh d4cea0f2b7 Eeschema: fix multiple sheet file name bugs.
Add missing check for root sheet when searching sheet hierarchies for
already loaded schematics.  This prevents the root sheet from being
omitted when adding new sheets using the root sheet file name.

CHANGED: Make file name tests case sensitive so that schematic sheet
file names on non-Windows systems can be uses as expected.

Warn users when attempting to use schematic file names that only vary
by case sensitivity that doing so will result in a project that is not
portable to Windows.

Fixes lp:1843415

https://bugs.launchpad.net/kicad/+bug/1843415
2019-11-18 07:59:30 -05: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
jean-pierre charras c5290de6ec housekeeping:
Remove not used files:
- markdown2html is not used (we are using "Sundown" tool)
- newstroke_font_without_CJK.cpp is removed.
Due to code optimization the full font works fine without memory issues
-fix also a few very minor compil warnings
2019-11-16 09:39:36 +01:00
Ian McInerney 1df7b718d9 eeschema: Allow labels to rotate on bus unfold 2019-11-15 20:43:56 +00:00
Seth Hillbrand a89dc98e07 Eeschema: Tokenize in UTF8
wchar tokenization breaks for wxWidgets on some platfoms.

Fixes: lp:1852595
* https://bugs.launchpad.net/kicad/+bug/1852595
2019-11-15 10:37:39 -08:00
Ian McInerney 39ef514ff9 Eeschema: Don't give a default filename to schematics in standalone
CHANGED: No longer call schematics noname.sch in standalone mode,
instead don't given them any name so the user can choose on save.

Fixes: lp:1852607
* https://bugs.launchpad.net/kicad/+bug/1852607
2019-11-15 11:29:57 +00:00
Seth Hillbrand 9f8eb350f7 eeschema: One more sort case
This fixes the same issue as f4a1fef3b requiring an absolute inversion
when sorting ascending vs descending
2019-11-13 11:48:22 -08:00
Jeff Young 7a8f2a5623 Simplify eeschema's plot filename algorithm.
We have different requirements than sheet paths for netlists,
so going through that code and then doing a lot of conversions
just ends up with a mess.

We now generate the path directly from the SCH_SHEET_PATH.

Fixes: lp:1852353
* https://bugs.launchpad.net/kicad/+bug/1852353
2019-11-13 19:16:09 +00:00
Seth Hillbrand f4a1fef3b0 Adjust pin table sort
The sort routine requires the value to be true with a is strictly lower
than b.  But just inverting the '<' doesn't yield strictly lower, it
includes '>='.  This causes items to jump in the list.
2019-11-12 17:24:57 -08: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 04b0feb365 Fix a couple of issues in new Save As command.
Handle symbols as well as strings in the "source" lists of
netlist files.

Handle Protex gerber file extensions.

Check for project_name-whatever pattern for files that we
don't recognize (such as project_name-NPTH-drl_map.ps)
2019-11-11 20:36:48 +00:00
Jonatan Liljedahl fa14d5b9fa Eeschema: simulator: more trace colors, smarter color allocation
NEW: The simulator plot now avoids colors already in use, if possible.
The palette is replaced with a larger one with less saturated colors.

Fixes: lp:1851372
* https://bugs.launchpad.net/kicad/+bug/1851372
2019-11-11 17:20:56 +00:00
Jonatan Liljedahl c71202d143 Eeschema: simulation: allow adding signals by name like V(/out) or I(R1)
NEW: A text entry allows adding signals by name. This includes vectors
not in the signal list, which is useful for plotting calculated vectors
like `let AB=V(a)*V(b)`. It's also a faster way to add a signal if you
know its name already.

Fixes: lp:1851373
* https://bugs.launchpad.net/kicad/+bug/1851373
2019-11-11 09:05:37 -05:00
Wayne Stambaugh bf8bb17f42 Fix missing symbol and footprint viewer about dialog names. 2019-11-11 08:25:58 -05: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
Jeff Young 10abc6097f Cleanup, commenting, etc. 2019-11-10 14:52:01 +00:00
jean-pierre charras 4de6ed6206 Fix issues created by Adds Save As... to the Kicad manger.
Mainly replacing std::string by wxString to manage filenames.
On Windows, a sdt::string cannot manage a filename, unless using
in many places TO_UTF8 and FROM_UTF8.
So the best way is to use a wxString for filenames and error messages.
2019-11-10 09:37:39 +01:00
Jeff Young b5904b0401 Installment one of project Save As... feature.
ADD: Adds Save As... to the File menu for the project window.

Fixes: lp:594051
* https://bugs.launchpad.net/kicad/+bug/594051
2019-11-09 20:22:44 +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 caf5d01530 Promote found items to visible during find & replace.
Fixes: lp:1849875
* https://bugs.launchpad.net/kicad/+bug/1849875
2019-11-05 17:22:51 +00: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
Jeff Young 35c8d64f98 Add super- and subscript support to Eeschema.
Note that since the markup might exist for other reasons, it has
to be turned on with a preference setting.  (It goes through a set
of bitflags so the same architecture can be used for other markup
structures that we might want to support in the future.)

Note also that this is more about engineering nomenclature than
visual formatting.  In that respect it's more similar to overbar
than italic or bold.
2019-11-05 17:22:51 +00:00
jean-pierre charras 1dcd442156 minor fix in a python script (kicad_netlist_reader.py)
Sort lists was incorrectly made.
2019-11-02 09:27:50 +01:00
Seth Hillbrand 47d7fea9be Fix bug in ReplaceDuplicateTimestamps
When more than one item has the duplicated timestamp, the update code
doesn't accurately change the duplicates as it only checks that a single
sort has not adjacent duplicates.

This adds all items to a set, ensuring that updated timestamps are
unique to the schematic, which prevents reseting or mangling the units
for duplicated components.
2019-10-29 16:49:15 -07: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 4f594550a2 eeschema: Respect multi-unit sheet numbering
When we are numbering by sheet, don't continue multi-unit parts across
sheets.
2019-10-26 07:52:57 -07:00
Seth Hillbrand 4004c733c8 eeschema: Pad spice ops to differentiate
The .op command is isolated, so differentiating from .option with a
space will only work if we ensure all commandlines have a space at their
end.
2019-10-23 06:31:56 -07:00
Sylwester Kocjan 1c01cc001d eeschema: fixed recognizing SPICE sim directive 2019-10-20 12:08:01 -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
jean-pierre charras 23e09d3de7 some other WXDEBUG replacement 2019-10-14 12:38:52 +02:00
jean-pierre charras 36e986629a Eeschema: fix issues with pin shapes related to clock input pin shapes.
* Fix not drawn shapes for clock low, inverted clock and broken shape for falling edge clock
* Especially, shape for falling edge clock was a not existing shape, therefore useless.
* now falling edge clock and clock low shape are similar.

Fixes: lp:1846901
https://bugs.launchpad.net/kicad/+bug/1846901
2019-10-06 13:24:56 +02:00
Adam Wolf c7c49cee5a Add additional ngspice codemodel path for launching from standalone eeschema on macOS. 2019-10-04 13:41:50 -04:00
jean-pierre charras 9d617502d5 Gerbview: fix missing grid initialization at starting. 2019-10-03 18:33:16 +02:00
jean-pierre charras d17cef95fd Add an other markdown to html converter (sundown), better to convert markdown.
The previous converter (maddy) is still available, during some time.
We therefore have the time to choose between them.
sundown is better to convert a md text, but is written to C
maddy has a few issues to convert a md text, but is written to C++
Both have no dependency.
2019-10-01 18:53:23 +02: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
Jeff Young 58b9d5f69e Map orientation when converting text types.
Also fixes up dangling state when converting.

Fixes: lp:1844716
* https://bugs.launchpad.net/kicad/+bug/1844716
2019-10-01 15:16:43 +01:00
Seth Hillbrand 7dd9304d24 Fix null-dereference in libedit
Clearing the CurPart sets to null.  Need to keep datasheet checks behind
guards
2019-09-30 16:53:51 -07:00
Jeff Young 4bf2b6a9f7 Performance enhancements for cross-probing.
While found when profiling cross-probing, many of these will also
improve other things.
2019-09-27 19:58:16 +01:00
Jeff Young 33606431cc Fix an insidious bug where DoDelete() and DeleteJunction() were fighting over who owned the STRUCT_DELETED flag.
Fixes: lp:1844620
* https://bugs.launchpad.net/kicad/+bug/1844620
2019-09-19 19:11:19 +01:00
Wayne Stambaugh 7cf42bb308 Eeschema: do not save legacy symbol libraries in schematic file.
Fixes lp:1843473

https://bugs.launchpad.net/kicad/+bug/1843473
2019-09-18 14:23:04 -04:00
Jeff Young 7ad98b8a7d Fix bug in JunctionNeeded and selection around adding/removing junctions.
When checking for 3 or more connections, at least one of them must be
a pin.  Otherwise we need to fall down to the next check which also
ensures that at least one of them is not parallel.

Fixes: lp:1841458
* https://bugs.launchpad.net/kicad/+bug/1841458
2019-09-12 20:10:47 +01:00
Jeff Young 67915b6a96 Add a warning message for attempting to current probe a subckt.
Fixes: lp:1843159
* https://bugs.launchpad.net/kicad/+bug/1843159
2019-09-12 14:45:01 +01:00
Jeff Young 0b981caef8 Don't clear the IS_MOVED flag right before looking at it.
Fixes: lp:1842355
* https://bugs.launchpad.net/kicad/+bug/1842355
2019-09-12 14:45:01 +01:00
Wayne Stambaugh 18667377f7 Eeschema: improve error message when writing cache library.
Remove duplicate missing symbol names from the extended error message.

Fixes lp:1842452

https://bugs.launchpad.net/kicad/+bug/1842452
2019-09-12 07:35:48 -04:00
jean-pierre charras 6ef4d7879e Fix incorrect comment in heler message 2019-09-12 08:16:39 +02: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
jean-pierre charras 2a9157ca99 Pcbnew, multiline graphic text dialog: strip extra \r in EOL (\n is enough) on Windows.
Fixes: lp:1843279
https://bugs.launchpad.net/kicad/+bug/1843279
2019-09-10 10:57:04 +02:00
Jeff Young b5742d09f8 Performance enhancement. 2019-09-09 23:24:33 +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 2553dd2942 Bail on our custom dockart provider.
It appears that it was causing some crashes, and it was never clear
that it looked better anyway.
2019-09-06 23:38:20 +01:00
Jeff Young 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00
Seth Hillbrand c3226653cc eeschema: Handle broken spin style value
The spin style is stored as a numeric and can be corrupted.  We handle
this by triggering assertions for debugging the bad value while
resetting to default if we have non-valid spin values that are outside
the array.

Fixes: lp:1843091
* https://bugs.launchpad.net/kicad/+bug/1843091
2019-09-06 13:17:12 -07:00
Seth Hillbrand 90b5cd3032 Unify text edit dialog behavior
This makes the pcbnew multiline text editor natively accept tabs in the
same manner as eeschema and extracts key handling routines to the shim
to allow undo/redo.

Also allows Ctrl-Y under Linux in addition to other platforms.  While
not as popular as Ctrl-Shift-Z, it is utilized for Redo in some contexts
2019-09-05 14:11:02 -07:00
Jeff Young 3bd38ec245 Improve zoom-to-extents for footprints with long text.
Fixes: lp:1820540
* https://bugs.launchpad.net/kicad/+bug/1820540
2019-09-05 21:02:29 +01:00
Seth Hillbrand 7a1ced7883 eeschema: Set GTK highlight default to a visible color
This keeps the lighter highlight for MAC defaults
2019-09-04 16:24:03 -07: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 594fef196f Constrain sheet pins to sheet boundary when rotating.
Fixes: lp:1841714
* https://bugs.launchpad.net/kicad/+bug/1841714
2019-09-03 13:45:38 +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
Seth Hillbrand 102f6d69c4 eeschema: Keep list focus in symbol browser
This prevents focus stealing by the canvas in the symbol browser under
GTK.
2019-08-30 09:00:53 -07: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 ebbb12e978 Give empty preference pages the right parent.
Fixes: lp:1841665
* https://bugs.launchpad.net/kicad/+bug/1841665
2019-08-27 21:50:52 +01: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 359ef0372c Check all item layers before bailing.
Fixes: lp:1840986
* https://bugs.launchpad.net/kicad/+bug/1840986
2019-08-27 20:52:25 +01:00
Jeff Young 83f147c414 Lighten highlight colour so text is easier to read. 2019-08-27 20:35:37 +01:00
Jeff Young 2fba0a4f61 Register COMMON_CONTROL for help menu actions.
Fixes: lp:1841560
* https://bugs.launchpad.net/kicad/+bug/1841560
2019-08-27 19:23:07 +01:00
Jeff Young 559035a7f6 Make sure the menu bar gets activated (ie: don't eat the activate event).
Fixes: lp:1841560
* https://bugs.launchpad.net/kicad/+bug/1841560
2019-08-27 19:23:07 +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
Seth Hillbrand 548dbb7c29 eeschema: Add highlight color to configurable list
The highlight color chosen from the system highlight doesn't always show
against the schematic sheet background color.  Allowing the user to
customize with their KiCad theme makes it configurable on par with other
colors.  This is stop-gap until we get full color schemes from
lp:1678345
2019-08-27 10:43:59 -07:00
Seth Hillbrand 85eed87b28 eeschema: Modify all units at the same time
When editing symbol library reference, this ensures that all units are
modified by the same action and the component is not represented by its
subunits.

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

(cherry picked from commit 80e0d848f2)
2019-08-26 20:43:05 -07:00
Jeff Young bc0e67579c Change OK/Cancel to MSW order and move some other dialogs to new system.
(There's no point in following the OSX OK/Cancel order as you can't
tab to buttons on OSX anyway.)
2019-08-26 18:36:35 +01:00
Jeff Young 6b6e9eddee Return control of Symbol and Footprint chooser col widths to user.
The auto-calculation wasn't working out and even with it some users
wanted control.

Fixes: lp:1796774
* https://bugs.launchpad.net/kicad/+bug/1796774
2019-08-26 18:27:49 +01:00
Jeff Young 8d31c9a6c1 Save values of Page Settings Export buttons in project.
Fixes: lp:1791431
* https://bugs.launchpad.net/kicad/+bug/1791431
2019-08-26 18:27:49 +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 80dd3f8635 Draw datasheet field with the value from the dfm file.
Fixes: lp:1841369
* https://bugs.launchpad.net/kicad/+bug/1841369
2019-08-25 21:51:00 +01:00
Jeff Young 9f80da60c3 Add buttons to MSW tab order.
Fixes: lp:1840991
* https://bugs.launchpad.net/kicad/+bug/1840991
2019-08-24 17:13:35 +01:00
Jeff Young f21467e340 Support tabbing to non-text controls on non-Mac platforms.
Fixes: lp:1840991
* https://bugs.launchpad.net/kicad/+bug/1840991
2019-08-23 22:14:37 +01:00
Jeff Young c85d1fa00c Try out our own tabbing logic.
Fixes: lp:1840991
* https://bugs.launchpad.net/kicad/+bug/1840991
2019-08-22 21:18:24 +01:00
Jeff Young de74590279 Parse bus definitions as a single term.
Fixes: lp:1841043
* https://bugs.launchpad.net/kicad/+bug/1841043
2019-08-22 12:50:23 +01:00
Jeff Young 13b7dd354c Fix tab order in pin properties dialog.
Fixes: lp:1840991
* https://bugs.launchpad.net/kicad/+bug/1840991
2019-08-22 10:54:11 +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 97212acecb Sort pins by number when grouping by name.
Fixes: lp:1828648
* https://bugs.launchpad.net/kicad/+bug/1828648
2019-08-21 20:34:01 +01:00
Jeff Young a6b7d4f7f6 Support 9 comments in the page setting GUI.
Fixes: lp:1793148
* https://bugs.launchpad.net/kicad/+bug/1793148
2019-08-21 20:34:01 +01:00
Jeff Young bbe5146bbb Refresh items which may have had their dangling state changed.
While it's tempting to look at the changed flag that TestDanglingEnds
returns, it's insuficient as the connectivity algorithm might have
already updated it (and ignored the changed flag).

Fixes: lp:1835107
* https://bugs.launchpad.net/kicad/+bug/1835107
2019-08-21 15:35:02 +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
Seth Hillbrand d65da471b7 EEschema: Plot stroked edges over BG
Items that have BG fill need to be plotted in the background but we
still need their stroked edges to be in the FG.  This is a workaround
that overplots the edges ensuring visual similarity.  Re-working the
plot engine to support layers is a larger project.

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

(cherry picked from commit 6796e8fff6)
2019-08-20 12:03:56 -07: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
Jeff Young 195fbbaf23 Reduce confusion by putting all dialog pages as leaf nodes. 2019-08-19 17:46:25 +01:00
Jeff Young f8f5ffd560 Update all aliases of current node after Symbol Properties dialog.
Fixes: lp:1840466
* https://bugs.launchpad.net/kicad/+bug/1840466
2019-08-19 14:25:15 +01:00
Jeff Young 0d90fab01b Add display setting preference pane for PLEditor.
Fixes: lp:1839187
* https://bugs.launchpad.net/kicad/+bug/1839187
2019-08-19 00:06:22 +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
Wayne Stambaugh 92fe201c5b Symbol editor: fix mnemonic issues in pin properties dialog.
Control ordering is critical to make dialog mnemonics work correct.  The
static text with the mnemonic must immediately proceed the control and
no additional controls can be added between static text/control pair.
Fixing this required adding the units static text controls after all of
the mnemonic static text controls and their associated edit controls.
Mnemonics do not work for read only controls so all of the combobox
controls were moved after the text controls.

Fixes lp:1818930

https://bugs.launchpad.net/kicad/+bug/1818930
2019-08-15 15:09:21 -04:00
Jeff Young a6b36adb32 Keep value in sync with libId when they match.
Fixes: lp:1797482
* https://bugs.launchpad.net/kicad/+bug/1797482
2019-08-15 17:01:33 +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
Ian McInerney 8493daf9ff Unify menu item creation for closing a window
* Push a function into CONDITIONAL_MENU that adds the item
* Modify the tooltip for close and exit items to have the
  program name

Fixes: lp:1835454
* https://bugs.launchpad.net/kicad/+bug/1835454
2019-08-14 09:35:15 +01:00
Wayne Stambaugh 0328f3e33b Eeschema: fix bug in sheet name comparisons on Windows.
The use of wxPATH_UNIX when calling GetFullPath() on windows drops the
volume identifier (c:\) from the file name which will cause comparison
failures.
2019-08-13 16:33:57 -04:00
Jeff Young c2d77a7300 Add some defensive code to prevent re-entrant printing.
Fixes: lp:1765965
* https://bugs.launchpad.net/kicad/+bug/1765965
2019-08-13 18:00:09 +01:00
Jeff Young a33d67f6b4 Push shift/cmd+<enter> processing down into dialog shim.
This will make them more uniform rather than only supported when
something else is using <enter>.

Fixes: lp:1838353
* https://bugs.launchpad.net/kicad/+bug/1838353
2019-08-13 16:53:40 +01:00
Jeff Young e855b244ae Highlight whole net for simulation voltage probe. 2019-08-12 22:21:09 +01:00
Michael Kavanagh b414cbfada Cleanup doDelete ACTIONs 2019-08-12 13:49:55 -04:00
Michael Kavanagh 79b2ff7551 Refactor deleteTool ACTION removing duplicates 2019-08-12 13:49:55 -04:00
Michael Kavanagh db59c7011b Unify menubar delete action 2019-08-12 13:49:55 -04:00
Wayne Stambaugh 9020a3a26c Eeschema: remove dead code from LIB_PART object. 2019-08-12 12:13:21 -04:00
jean-pierre charras 9b6e1cb1cd Fix incorrect I18n string. 2019-08-12 12:52:49 +02:00
Jeff Young 039bd92ea5 Make LibEdit respect the Move-warps-cursor setting. 2019-08-10 11:58:05 +01:00
jean-pierre charras 3796b2fe7f Fix minor compil warnings (signed/unsigned comparison) 2019-08-10 09:18:19 +02:00
Jeff Young 441c2c240f Use a transform matrix to address some print bugs.
Sadly, this only works on MSW until wxWidgets 3.1.1.

Fixes: lp:1464773
* https://bugs.launchpad.net/kicad/+bug/1464773
2019-08-09 11:33:17 +01:00
Jeff Young 885497ec1f Don't allow degenerate arcs when dragging editing handles.
Fixes: lp:1839536
* https://bugs.launchpad.net/kicad/+bug/1839536
2019-08-08 21:22:43 +01:00
Jeff Young c5fb8518d2 Redraw pins when placing when they are modified.
Fixes: lp:1839363
* https://bugs.launchpad.net/kicad/+bug/1839363
2019-08-08 14:09:42 +01:00
Jeff Young 9fe7bfb596 Check for focus loss from dialog before doing cut/copy/paste in edit frame.
Fixes: lp:1838708
* https://bugs.launchpad.net/kicad/+bug/1838708
2019-08-08 13:51:23 +01:00
Jeff Young 8db8119564 Redraw selection halos after zooming.
Fixes: lp:1838869
* https://bugs.launchpad.net/kicad/+bug/1838869
2019-08-08 13:51:23 +01:00
Jeff Young 8b3e257648 Shorten ERC dialog options page.
Fixes: lp:1839338
* https://bugs.launchpad.net/kicad/+bug/1839338
2019-08-07 20:08:24 +01:00
Jeff Young 56bf72cc5d OpenGL context must be saved/restored around a translation.
Also includes a bunch of code cleanup.

Fixes: lp:1838655
* https://bugs.launchpad.net/kicad/+bug/1838655
2019-08-07 19:25:03 +01:00
Seth Hillbrand 5151cd0bfe C++14: Remove unused make_unique.h
Also removes header references now that we are in C++14, this is
built-in to the std
2019-08-07 09:27:31 -07:00
jean-pierre charras 4e90b2d48b DIALOG_CHOOSE_COMPONENT: fix a crash when the option "footprint view" is activated.
The crash was due a not tested null pointer.

Fixes: lp:1839282
https://bugs.launchpad.net/kicad/+bug/1839282
2019-08-07 18:06:27 +02:00
Seth Hillbrand 2e66d80af8 erc: Avoid casting between iterators
The iterator for containers should always match the container type.
Using auto here re-forces the match.
2019-08-06 15:28:26 -07:00
Seth Hillbrand 2b55f8a1aa netlist: avoid cast to different iterator
This ensures the list iteration matches the container
2019-08-06 15:28:25 -07:00
Jeff Young 2a3e82a144 Add copy support to Symbol Chooser's details panel.
Fixes: lp:git
* https://bugs.launchpad.net/kicad/+bug/git
2019-08-06 11:50:19 -06:00
Jeff Young a96158e26b Add current probe to SPICE simulation.
Fixes: lp:1740321
* https://bugs.launchpad.net/kicad/+bug/1740321
2019-08-05 16:48:18 -06:00
Jeff Young 23d824de66 Simulator improvements.
1) Add highlighting to simProbe and simTune tools.
2) Probe tool should accept wires and pins, not wires and components.
3) Give simulator window a flat look to match rest of Kicad.
4) Collapse whitespace out of simulator window.
5) Add some error messages.
6) Add some whitespace to simulation setting dialog.
2019-08-05 16:48:18 -06:00
Jeff Young 1a68d7c200 Cleanup no-longer-used variable. 2019-08-05 16:48:18 -06:00
Seth Hillbrand 91446c1515 eeschema: Fix list invalidation
When removing a junction, we need to keep the next pointer for deleted
item, marking them with a flag until committed.

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

(cherry picked from commit 4363e6a213)
2019-08-05 09:04:47 -07:00
Jeff Young fb3aa446e1 Remove Run Simulator command from Export Spice Netlist.
Also cleans up the Export Netlist dialog to be more platform compliant.

Fixes: lp:1591777
* https://bugs.launchpad.net/kicad/+bug/1591777
2019-08-04 16:25:36 -06:00
Jeff Young 97d70d7844 Fix cursor bugs in simulation.
1) cancel simProbe or simTune when simulator window closed
2) handle non-stock cursors through SetCurrentCursor()

Fixes: lp:1833583
* https://bugs.launchpad.net/kicad/+bug/1833583
2019-08-04 16:25:36 -06:00
jean-pierre charras 120637bd9b A few I18n minor fixes. 2019-08-04 10:33:54 +02:00
Jeff Young fb1d7811b1 Internal netnames must be used internally.
GetShownNetname() is only for the GUI, or for external programs.

Fixes: lp:1834510
* https://bugs.launchpad.net/kicad/+bug/1834510
2019-08-03 21:35:55 -06:00
Ian McInerney ce7833b982 Warp display when selecting schematic items
When selecting items where the reference point is off-screen, GTK
would default the cursor to jump to the bottom of the screen.

Fixes: lp:1838843
* https://bugs.launchpad.net/kicad/+bug/1838843
2019-08-03 19:17:53 -06:00
Jeff Young b6b26b4e1e Add some defensive code to prevent crash when no undo record is stacked.
Fixes: lp:1838843
* https://bugs.launchpad.net/kicad/+bug/1838843
2019-08-03 17:20:54 -06:00
Jeff Young 5503727d3d Fix some placement bugs with selection haloes on text.
Fixes: lp:1838841
* https://bugs.launchpad.net/kicad/+bug/1838841
2019-08-03 17:20:54 -06:00
Jeff Young 7349fe2e72 Move line rendering to the proper layer. 2019-08-03 17:20:54 -06:00
jean-pierre charras 7bfbcef942 Make some strings more easily translatable
DIALOG_BOARD_STATISTICS: fix some minor issues.
2019-08-03 09:32:10 +02:00
Jeff Young f756af788e Fix missing CTRL+W in libEdit and modEdit.
Fixes: lp:1835454
* https://bugs.launchpad.net/kicad/+bug/1835454
2019-08-02 15:56:29 -06:00
Jeff Young cc82e59003 Push the Quit/Close menu logic down into common. 2019-08-02 14:32:49 -06:00
Jeff Young c624ee9cff Re-parent new objects on duplicate.
Fixes: lp:1838269
* https://bugs.launchpad.net/kicad/+bug/1838269
2019-08-01 21:40:18 -06:00
Jeff Young 937e3c2d48 Make m_Text private so we don't keep getting bugs where m_shown_text fails to get updated.
Fixes: lp:1838655
* https://bugs.launchpad.net/kicad/+bug/1838655
2019-08-01 20:36:59 -06:00
Jeff Young 2738848336 Improve selection halo scaling so it's not hard to see at large zooms. 2019-08-01 20:36:59 -06:00
Seth Hillbrand 643c7f25f5 eeschema: Properly map edge cases of legacy onto GAL
While we do not generate these arcs internally, some external tools
generate arcs that are technically valid but display correctly only
because of an oddity in the degeneracy mapping.

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

(cherry picked from commit cf949609b2)
2019-08-01 11:57:53 -07:00
Wayne Stambaugh 8789ab9265 Eeschema: remove rogue symbol libraries from project file.
Check for symbol libraries that somehow ended up in the project file
after remapping occurred and remove all of them to prevent potentially
broken symbol library links.

Add nagware dialog to warn the user and a checkbox to never show the
dialog again.

Fixes lp:1838185

https://bugs.launchpad.net/kicad/+bug/1838185
2019-08-01 13:26:21 -04:00
jean-pierre charras 9dcf3b862c Eeschema: fix the bounding box size drawn around the bitmap when selected.
Images have a scale factor and this factor was taken in account twice
For image having a scale factor not equal to 1.0, the bounding box was too big (or too small)
2019-08-01 08:48:01 +02:00
Jeff Young cd4983f092 Switch selection color to platform selection color. 2019-07-31 22:52:22 -06:00
Jeff Young 03a33b6b56 Selection fixes for multi-part lib items.
1) Don't select pins from other units/conversions
2) Don't delete pins from other units/conversions

Fixes: lp:1838511
* https://bugs.launchpad.net/kicad/+bug/1838511
2019-07-31 22:34:24 -06:00
Wayne Stambaugh b595dc0d3b Eeschema: fix edit sheet bug.
Remove an existing sheet from the current page that requires a schematic
load from file to prevent a corrupt screen list from causing a segfault.

Merge the edit sheet file loading with the append schematic code since
they are functionally the same.  This allows the sheet edit code to
take advantage of all of the added broken symbol library links added in
the recent append schematic fixes.

Fixes lp:1835841

https://bugs.launchpad.net/kicad/+bug/1835841
2019-07-30 08:21:33 -04:00
Jeff Young 6bf1ac45e3 New selection highlighting model for eeschema. 2019-07-29 19:57:41 -06:00
Jeff Young c03535343c Don't apply GTK fix to OSX: it produces somewhat random crashes.
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-28 11:28:42 -06:00
Jeff Young 70270f5bd1 Fix accidental commit of debugging change. 2019-07-27 23:33:34 -06:00
Jeff Young 0a0eb35ee8 Update comments with latest test results. 2019-07-27 23:27:21 -06:00
Jon Evans ab766e6c1c Don't absorb neighbors based on weak component pins
Fixes: lp:1838140
* https://bugs.launchpad.net/kicad/+bug/1838140
2019-07-27 11:29:11 -04:00
Jon Evans b99c71744f Properly handle nested bus absorption 2019-07-27 10:51:38 -04:00
Jeff Young 2af41e87f9 Don't add first found object to selection until Find (or return) is hit.
Fixes: lp:1838021
* https://bugs.launchpad.net/kicad/+bug/1838021
2019-07-27 00:20:52 -06:00
Jeff Young daac54b5d2 Update shown text cache in undo/redo.
Fixes: lp:1837772
* https://bugs.launchpad.net/kicad/+bug/1837772
2019-07-26 23:59:05 -06:00
Jeff Young 3904d7ccfc Push some search stuff down into EDA_DRAW_FRAME so it can be shared.
Also rewrites the PCBNew Find dialog to make use of the above, including:
1) searching in user-defined footprint fields
2) searching in pcb text
3) a history list in the search popup
4) case sensitive searching
5) word sensitive searching
6) the ability to turn wildcard searching on/off
7) better placement of the result when the dialog obscures part of the
window

Fixes: lp:1838006
* https://bugs.launchpad.net/kicad/+bug/1838006
2019-07-26 17:53:32 -06:00
Jeff Young 21b90de829 Another attempt to work around Apple's [NSAlert runModal] bug.
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-26 16:47:17 -06:00
Jeff Young 77334628c4 Change default tool behaviour to skip unhandled events.
The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation
properly.  wxEVT_CHAR does, but we only get to that if we skip the
event at the end of the tool’s event processing loop, which most tools
don’t do.  (Selection tools, point editors, pickers, and a couple of
others do skip, which is probably why this didn’t get reported earlier.)

I played around with a couple of ways to fix wxEVT_CHAR_HOOK.  Most of
them don’t work, and the few egregious hacks I tried weren't cross-
platform.

So I’m changing it so that most tools now skip at the end of their
event loops.  I left out a couple that I felt were high risk (length
tuning, for instance).  But there’s still enough risk that I’m 100%
sure it will break something, I just haven’t a clue what.

Fixes: lp:1836903
* https://bugs.launchpad.net/kicad/+bug/1836903
2019-07-26 12:21:24 -06:00
Jeff Young 815602d1af Fix missing AF_ACTIVATE flags on some tools.
Fixes: lp:1813659
* https://bugs.launchpad.net/kicad/+bug/1813659
2019-07-26 12:21:24 -06:00
jean-pierre charras 6b031d9b9e Symbol editor: fix an issue when editing LIB_RECTANGLE graphic items.
The point editor expects rectangles with a height and width > 0.
Previously, this constraint did not exist,
so some LIB_RECTANGLE graphic items can create issues when trying to move a corner.
Now, the LIB_RECTANGLE graphic item is normalized before trying to move a corner.
2019-07-26 10:40:40 +02:00
Seth Hillbrand 7759ad7e27 eeschema: Clean up backup name
This fixes the last suffix that was missed by 168fa09f5.  The schematic
backup files should have the suffix .sch-bak to distinguish from
.kicad_pcb-bak or other backups.

(cherry picked from commit b6fe4ff637)
2019-07-23 16:15:04 -07:00
Jeff Young b858fa38c4 Fix crash bugs in picker tools. 2019-07-21 19:06:06 -06:00
jean-pierre charras de4854d112 Eeschema - restrict buses and wires to H and V orientation was taken in account only when activating the Create Bus or Wire tool.
Now taken in account during creation.

Fixes: lp:1837308
https://bugs.launchpad.net/kicad/+bug/1837308
2019-07-21 10:02:43 +02:00
Jeff Young 4d4adf0753 A possible hack to work around the apple runModal bug.
Fixes: lp:1837225
* https://bugs.launchpad.net/kicad/+bug/1837225
2019-07-20 17:31:56 -06:00
jean-pierre charras 858db3c104 Synchronize toolbars state with current options after rebuilding them.
Previously, for instance after modifying preferences or language,
they were rebuilt but the tools state was not set due to a missing call to SyncToolbars() after rebuilding.
2019-07-20 18:16:35 +02:00
jean-pierre charras 1b5e1cd4d2 Fix complements the fix b428d74: make best zoom taken in account immediately. 2019-07-20 14:26:46 +02:00
Jeff Young 0821f1ac11 Move crosshairs to found item; remove find highlighting when find dialog closed.
Fixes: lp:1837069
* https://bugs.launchpad.net/kicad/+bug/1837069
2019-07-19 18:41:11 -06:00
Jeff Young 0b08e4dcd2 Deactivate other tools when running one based on a PICKER.
In particular, if the last one was a PICKER tool, then we're going
to assert on "click-handler-already-set".

Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673
2019-07-19 15:29:10 -06:00
Jeff Young fcff0dd228 Cleanup. 2019-07-19 15:29:10 -06:00
Wayne Stambaugh 9fae30162d Eeschema: fix many append schematic bugs.
Do not add cache library from another project to old library list.  This
is wrong and can cause all kinds of symbol library linking issues.  It's
better to force the user to fix broken symbol library links than the false
security of using multiple cache libraries.

Use correct paths when appending schematic outside of the current project
path when hierarchical sheets are appended.  If the path can be relative,
give the user the option to use either relative or absolute paths.

Do not change symbol library names in schematics appended from a source
outside the current project.  This will almost ensure the symbol library
links will be broken in the source project.

When the appended schematic is from another project, attempt to check all
of the possible combinations of symbol library table importing that could
cause broken symbol library links and give the user the option of canceling
the append operation or live with the possibility that there may be broken
symbol library links.

When the append schematic is in the current project path but not part of
the schematic, check to see if there are any library nicknames that do
no exist in the project symbol library table and give the user a chance
to cancel the append process.
2019-07-19 11:39:29 -04:00
jean-pierre charras b3b32fa966 Revert "Fix ngspice netlisting when net names contain '/'"
This reverts commit eadf6d93bc.

because the issue with net names containing '/' is not actually inside the netlist.
This commit eadf creates issues with ngspice 2.8 and older, and do not fix anything in ngspice
2019-07-19 16:13:10 +02:00
jean-pierre charras e32a50b34d Simulator: fix a crash when using the "Probe" or "Tune" tool, when clicking on an item is schematic editor. 2019-07-19 10:12:54 +02:00
Seth Hillbrand 5324b65fb0 eeschema: Don't trust the pointer
We are not guaranteed a selection.  Keep pointers to the front items
guarded.  This can happen after repeating a new item, e.g.
2019-07-17 18:21:36 -07:00
Seth Hillbrand b877d17138 Fix compile error
wx 3.0 doesn't have emplace_back() so we need to accept the
copy-instantiate penalty
2019-07-17 14:32:22 -07:00
Jeff Young 3de00eef5f Cleanup. 2019-07-17 21:45:43 +01:00
Jeff Young d67c2d13c7 Fix re-entrancy problem in cross-probing.
Fixes: lp:1836940
* https://bugs.launchpad.net/kicad/+bug/1836940

Fixes: lp:1836937
* https://bugs.launchpad.net/kicad/+bug/1836937
2019-07-17 21:35:28 +01:00
Simon Richter 05353049b5 Pull in macro definition for strncasecmp on MSVC 2019-07-17 08:10:47 -04:00
Jeff Young 6cd7d9fb89 Go back to inconsistent cross-probing for now.
Selecting in Eeschema has major issues, as does highlighting in
pcbnew.  So for now we do highlighting in eeschema and selecting
in pcbnew.  Improving highlighting for pcbnew would be the next
logical step....

Fixes: lp:1836640
* https://bugs.launchpad.net/kicad/+bug/1836640
2019-07-17 12:45:34 +01:00
Jeff Young 920f128cc7 Change line-end encoding of multi-line textbox.
Fixes: lp:1836757
* https://bugs.launchpad.net/kicad/+bug/1836757
2019-07-16 20:45:44 +01:00
Jeff Young 8d79661996 Convert symbol/module cross-probing to a selection model.
Net/net cross-probing stays a highlight model.

Fixes: lp:1836600
* https://bugs.launchpad.net/kicad/+bug/1836600
2019-07-16 20:25:25 +01:00
Jeff Young a61673a144 Fix compile error for those who have to use the somewhat feeble gcc. 2019-07-16 15:11:50 +01:00
Jeff Young 787b16db98 Draw invisible pins in grey in pin preview.
Also pins the zoom at 100% as we don't seem to be very good at
calculating the bounding box for short pins.

Fixes: lp:1836658
* https://bugs.launchpad.net/kicad/+bug/1836658
2019-07-16 02:05:22 +01:00
Jeff Young 7d10b29592 Cleanup unused includes. 2019-07-16 01:15:33 +01:00
Jeff Young 3069fd5974 Exit point editor after an <esc> while dragging.
Fixes: lp:1836652
* https://bugs.launchpad.net/kicad/+bug/1836652
2019-07-16 01:09:49 +01:00
Jeff Young e816a0c29d Push Eeschema & PLEditor PICKER_TOOLs down into common.
Also implements a more robust push/pop tool strategy for pickers.
2019-07-16 00:44:01 +01:00
Jeff Young 58ca5b71a9 A more robust fix for 36f1d023f0.
This one also handles when the events get out-of-order due to them
starting out in the Simulation window and not getting dispatched until
the mouse goes over the Schematic window.

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

Fixes: lp:1836544
* https://bugs.launchpad.net/kicad/+bug/1836544
2019-07-15 14:15:24 +01:00
jean-pierre charras dad8c9821b Fix a minor compil warning. 2019-07-15 10:33:03 +02:00
Jeff Young f30cd67411 Use standard save-changes dialog.
(It also has the buttons in the right order for Mac.)
2019-07-14 21:40:21 +01:00
Jeff Young d767e83dac Fix arc drawing so that it works in all 4 quadrants.
Fixes: lp:1836116
* https://bugs.launchpad.net/kicad/+bug/1836116
2019-07-14 18:18:48 +01:00
jean-pierre charras 9259f3a7c9 LIB_LOGGER: fix a crash when closing Kicad, if Libedit was run.
wxLog::SetActiveTarget() was initialised to libedit frame,
but the active target was not released after closing and deleting libedit, thus creating a crash on Kicad exit.
2019-07-14 18:46:58 +02:00
Jeff Young 34894acb89 Don't try to copy a null item.
Fixes: lp:1836126
* https://bugs.launchpad.net/kicad/+bug/1836126
2019-07-11 18:23:32 +01:00
Jeff Young 029b624e96 When adding new wires due to directly-connected items, don't try and de-select them after an undo. The won't be around anymore.
Fixes: lp:1836218
* https://bugs.launchpad.net/kicad/+bug/1836218
2019-07-11 17:36:32 +01:00
Jeff Young 5c43924338 Display all "File couldn't be found" messages at the end.
Fixes: lp:1810161
* https://bugs.launchpad.net/kicad/+bug/1810161
2019-07-10 23:17:50 +01:00
Jeff Young e1a22333c1 Fix bug with escaped '~' still getting extra height for overbar. 2019-07-10 11:59:09 +01:00
Jeff Young cd1a1a67fb Add seleciton/brightening/highlighting to images. 2019-07-10 01:14:28 +01:00
Jeff Young 30ec895c96 Cleanup event processing stuff to keep better track of "handled".
See: https://lists.launchpad.net/kicad-developers/msg41471.html .
2019-07-09 21:59:46 +01:00
Jeff Young 483dc24e87 Homogenize selection tools around our HIG.
In particular make addative and exclusive-or selections work the
same way.

Also give Highlight Net a hotkey now that it can't use ctrl-click
anymore.
2019-07-09 21:59:46 +01:00
jean-pierre charras 8bb3fae5ae Eeschema: fix broken complex hierarchy loading on Windows
The full filename comparison to detect the reuse of a file was broken on Windows
because it mixed a native filename notation (containing the drive id),
and a unix notation (no drive in filename, different separator).
2019-07-09 17:09:24 +02:00
Jeff Young 36f1d023f0 Make sure Push/PopTool() go in the right order.
Because the pickers are called with an Activate()/Wait() pair, any
usurping tool gets in between the picker handling the cancel (due
to activation) and the picker client doing a PopTool().  The new
tool is therefore pushed before the old tool is popped.

Fixes: lp:1835907
* https://bugs.launchpad.net/kicad/+bug/1835907
2019-07-09 15:03:23 +01:00
Jeff Young 46f47adebe Update symbols after assigning different LIB_IDs.
Fixes: lp:1835612
* https://bugs.launchpad.net/kicad/+bug/1835612
2019-07-09 12:38:41 +01:00
Jeff Young 17d64ac348 Move multi-line editor to Scintilla engine for undo/redo.
Also allows cut/copy/paste and better WYSIWYG tab handling.

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

Fixes: lp:1769150
* https://bugs.launchpad.net/kicad/+bug/1769150
2019-07-09 12:20:31 +01:00
Jeff Young 3a8f32c380 Convert ShowEEschema to an ACTION so it can get a hotkey assignment.
Fixes: lp:1686010
* https://bugs.launchpad.net/kicad/+bug/1686010
2019-07-09 00:43:41 +01:00
Jeff Young d3d0bdbe17 Go back to rotating selection around center.
Fixes: lp:https://bugs.launchpad.net/kicad/+bug/1833371
* https://bugs.launchpad.net/kicad/+bug/https://bugs.launchpad.net/kicad/+bug/1833371
2019-07-09 00:14:32 +01:00
Jeff Young fb881ee209 Update symbol ID before running Update Fields from Library.
Fixes: lp:1827707
* https://bugs.launchpad.net/kicad/+bug/1827707
2019-07-08 22:56:04 +01:00
Ian McInerney e32306c232 eeschema: Fix initial selected text in reference value dialog
Fixes: lp:1834741
* https://bugs.launchpad.net/kicad/+bug/1834741
2019-07-08 14:42:31 -04:00
Jeff Young 772dff7a01 Removed post-page-settings ZoomFitToScreen() calls.
Fixes: lp:1834608
* https://bugs.launchpad.net/kicad/+bug/1834608
2019-07-08 00:06:28 +01:00
jean-pierre charras d92396341e Simulation: do not add .save V(0) and/or .save V(GND) to ngspice.
These 2 nets are internally added by ngspice (info from Holger Vogt)
2019-07-07 17:55:43 +02:00
jean-pierre charras b74bccbb13 Eeschema: fix a bug in LIB_TEXT::Plot, that plotted an empty text.
Fixes: lp:1827124
https://bugs.launchpad.net/kicad/+bug/1827124
2019-07-05 15:54:40 +02:00
Jeff Young a9c66e15ea Common-ize EE_ACTIONS::refreshPreview and use it after cursor actions.
Fixes: lp:1818667
* https://bugs.launchpad.net/kicad/+bug/1818667
2019-07-05 14:45:15 +01:00
jean-pierre charras fffb0d340f Eeschema: fix not deletable bitmap issue (missing SCH_BITMAP in deletable list).
Also display bitmap info in message panel.

Fixes: lp:1835125
https://bugs.launchpad.net/kicad/+bug/1835125
2019-07-05 10:25:23 +02:00
Simon Richter c8c3e1f96a Fix build order for generated headers and sources
This changes make_lexer() so that it no longer generates a custom target
but instead attaches the generated files to an existing one (so the first
argument now is the name of an existing library or executable, and it needs
to come after the add_library/add_executable call).

The generated source is no longer listed in the project sources, as it is
added by the function. The files are generated in the build tree rather
than the source tree, and the directory is added to the include path for
the respective project as well as exported to projects linking against it.

Generated files in subdirectories are somewhat supported, but need to be
referenced with the same name as they were generated (i.e. including the
subdirectory name).

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

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

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
2019-07-03 09:36:40 -04:00
Maciej Suminski c715a22e1c Symbol Editor: clear IS_NEW flag after placing a pin
IS_NEW flag needs to be cleared after a pin is placed, otherwise further
move operations will keep adding the pin to the edited symbol.
2019-07-03 13:32:47 +02:00
Jeff Young d03041b565 Cleanup. 2019-07-02 21:36:42 +01:00
Jeff Young ef03afe289 Fix bugs in new wire/line-width split.
If Symbol Editor isn't open then Eeschema needs to read in the
default line width.

Symbol Editor was failing to write line width parameter back to
properties.

Fixes: lp:1835051
* https://bugs.launchpad.net/kicad/+bug/1835051
2019-07-02 20:00:39 +01:00
jean-pierre charras 34e00bdb6d Eeschema, symbol tree selector: make the selected lib and symbol readable.
Previously, the background was highlighted, but not the text.
On Windows, the text was unreadable, until it was selected.
Now the foreground color is also set to the text selected color.
2019-07-02 19:05:29 +02:00
jean-pierre charras 21d9a3d4bd Eeschema, lib editor: fix a message error when loading a symbol from the schematic editor.
Replace also in lib_manager.cpp some DisplayErrorMessage calls by wxLogMessage calls,
to avoid hanging or crashes, at least on Windows.
wxLogMessage also has the advantage of grouping all messages and displaying them during a idle time.
2019-07-02 18:39:01 +02:00
Jeff Young 109c21aad4 Add line styles and line color to global Edit Text and Graphics Properties.
Fixes: lp:1801150
* https://bugs.launchpad.net/kicad/+bug/1801150
2019-07-02 14:53:06 +01:00
Jeff Young 9ee36b1a87 Small layout fix. 2019-07-02 14:53:06 +01:00
Jeff Young 9effd24f3a Allow move tool to run on top of other tools.
Fixes: lp:1784480
* https://bugs.launchpad.net/kicad/+bug/1784480
2019-07-01 22:15:25 +01:00
Jeff Young ad26ece8d4 Add Global Edit Text and Graphics Properties to Eeschema.
Fixes: lp:1801150
* https://bugs.launchpad.net/kicad/+bug/1801150
2019-07-01 22:15:25 +01:00
jean-pierre charras 5ed8ba5bf3 Libedit: fix a bug in edit graphic item properties:
When changing the common to units and/or common to convert options, the item properties were not updated.
2019-07-01 12:36:46 +02:00
Jeff Young 9328ec8b52 Separate default line and wire thicknesses.
Fixes: lp:1834324
* https://bugs.launchpad.net/kicad/+bug/1834324
2019-06-30 11:12:42 +01:00
Jeff Young 62d453ecd8 Fetching name got moved, but it got moved to before it was fetched out of the fields grid.
Fixes: lp:1834711
* https://bugs.launchpad.net/kicad/+bug/1834711
2019-06-29 22:44:29 +01:00
Jeff Young d88bddad7e Respect m_DrawSpecificUnit and m_DrawSpecificConvert when pasting.
Fixes: lp:1834719
* https://bugs.launchpad.net/kicad/+bug/1834719
2019-06-29 22:20:40 +01:00
Jeff Young 09b07cd387 Minor adjustments to arc editing algorithms.
1) Don't snap center since it will be re-computed (most likely
off-grid) anyway.
2) Don't flip shape during initial drawing.
2019-06-29 20:03:08 +01:00
Jeff Young 232e21cb37 Restore selection properly after an undo. 2019-06-29 20:03:08 +01:00
Jeff Young 51479c2042 Fix several bugs in selection exhibited by 74LS02.
1) Use PenWidth() (which is clipped at 0) instead of Width()
2) Implement an interior HitTest when a PolyLine is filled
3) Brighten background objects as well as foreground
4) Don't HitTest last segment when PolyLine is not filled

Fixes: lp:1834703
* https://bugs.launchpad.net/kicad/+bug/1834703
2019-06-29 20:03:08 +01:00
Seth Hillbrand 7297208119 Handle all non-length units
Statusbar length updates need to handle default with wxASSERT if there
is not a specific, handled unit.
2019-06-29 09:46:25 -07:00
Ian McInerney 3b645ed305 eeschema: Fix python BOM generators to handle symbols
* Implement proper natural sorting of the reference values
* Perform quoting of all items in BOM generators that use csv.writer

Fixes: lp:1833822
* https://bugs.launchpad.net/kicad/+bug/1833822
2019-06-29 17:24:45 +02:00
Jeff Young a498d7e9c5 Try out a new arc-editing paradigm for LibEdit.
This is based on the notion that in Kicad the start and end-points
are far more important (as they usually connect to other segments)
than the center is.
2019-06-29 16:10:58 +01:00
Ian McInerney c8cd95a718 eeschema: Force focus on dialog after BOM creation
Fixes: lp:1834698
* https://bugs.launchpad.net/kicad/+bug/1834698
2019-06-28 19:31:00 -07:00
Jeff Young 2ed3bf47bb Improve hittesting for Eeschema and LibEdit delete tools. 2019-06-28 22:18:30 +01:00
Jeff Young a72b5416c3 Show preview object for Eeschema junction, noconnect and bus entry tools. 2019-06-28 22:18:30 +01:00
Jeff Young 981072598b Overhaul cursor code for new tool/action framework.
Includes the addition of an onSetCursor() handler which must be called
from both the GAL canvas AND the GAL backend (at least on OSX) to prevent
cursor flickering between (for instance) pencil and arrow.

Also includes new architecture for point editors which allows them to
coordiate cursors with the editing tools (so we can switch to an arrow
when over a point).
2019-06-27 22:37:11 +01:00
Jeff Young 2f23aa9556 Implement a more robust tool stacking architecture.
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop.  (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)

The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
2019-06-27 17:01:31 +01:00
Jeff Young 7208ef481f Don't confuse a pasted pin with being synchronized.
It's only at the same location because it was copied from there.

Fixes: lp:1834377
* https://bugs.launchpad.net/kicad/+bug/1834377
2019-06-27 00:24:42 +01:00
Jeff Young 5e40de9357 Clear IS_NEW flag after placing pin so the tool knows we're no longer drawing.
Fixes: lp:1834376
* https://bugs.launchpad.net/kicad/+bug/1834376
2019-06-27 00:02:13 +01:00
Jeff Young f11de08fa9 Clarify that default text size is for schematic text.
Fixes: lp:1818668
* https://bugs.launchpad.net/kicad/+bug/1818668
2019-06-26 21:54:03 +01:00
Jeff Young 7292ce6a8b Improve eeschema selection disambiguation logic. 2019-06-26 21:54:03 +01:00
Jeff Young fa84babefe Re-implement sch->pcb cross-probing using net highlighting architecture.
Fixes: lp:1827853
* https://bugs.launchpad.net/kicad/+bug/1827853
2019-06-26 21:54:03 +01:00
Jeff Young c77d214c5f Clear annotation of pasted sheets only when they already exist in the current hierarchy.
Fixes: lp:1833205
* https://bugs.launchpad.net/kicad/+bug/1833205
2019-06-26 21:54:03 +01:00
Jeff Young 15cd13ba6e Don't tie generic validators to a specific field.
Fixes: lp:1834103
* https://bugs.launchpad.net/kicad/+bug/1834103
2019-06-26 01:13:15 +01:00
Jeff Young cb1fd069f0 Fix inadvertant check-in of debugging code. 2019-06-26 00:51:33 +01:00
Jeff Young 89d1d3d299 Real-time highlighting for PlEditor delete tool. 2019-06-25 21:10:21 +01:00
Jeff Young 4eaba20cd3 Real-time highlighting for Pcbnew and ModEdit delete tools. 2019-06-25 21:10:21 +01:00
jean-pierre charras 31c254d8c1 SCH_EDIT_FRAME::FixupJunctions(): avoid flagging schematics as modified, when no junction is added. 2019-06-25 18:23:28 +02:00
jean-pierre charras 1cc05f19b5 SCH_EDIT_FRAME::FixupJunctions(): do not change the opened sheet after running the code. 2019-06-25 17:30:37 +02:00
Wayne Stambaugh 288982b15d Symbol and footprint library table editor fix.
Prevent the symbol and footprint library table editors from substituting
the current project path (${KIPRJMOD}) when adding libraries to the global
library table.  This will almost assuredly fail when opening a different
project.  We still allow users to manually use ${KIPRJMOD} in global table
paths under the assumption that if they are typing this in then they most
likely understand environment variable substitution.

Fixes lp:1830694

https://bugs.launchpad.net/kicad/+bug/1830694
2019-06-25 08:36:32 -04:00
Jeff Young f9702aab87 Immediate actions for PlEditor, PcbNew, etc. 2019-06-25 11:34:28 +01:00
Jeff Young f088d4d762 Add env-var setting to CommonSettingsChanged().
Fixes: lp:1804925
* https://bugs.launchpad.net/kicad/+bug/1804925
2019-06-25 11:34:28 +01:00
jean-pierre charras 70ff2e14a5 Eeschema: avoid crashes when the tool highlight or delete is activated and clicking in a empty schematic.
Was a nullptr not tested.
2019-06-25 08:31:22 +02:00
Seth Hillbrand 98124e68c7 Update exit strategy to match UI guidelines
In singletop mode, all frames show the "Quit" option in the file menu
and will quit on Ctrl-Q.  When launched from the main KiCad interface,
sub-programs show the "Close" option instead and will close with Ctrl-W.
In this mode, Ctrl-Q will instruct the main program to exit.

Fixes: lp:1779938
* https://bugs.launchpad.net/kicad/+bug/1779938
2019-06-24 21:46:42 -07:00
Tomasz Włostowski d7fe307913 eeschema: automatically insert junctions at pin connections if needed during file load
EEschema optimizes wires by merging colinear segments. If a schematic opened without a valid
cache library or missing installed libraries and later saved, this optimization can cause connectivity
errors. In order to fix that we check each pin-wire connection and junctions if necessary.
2019-06-25 01:06:25 +02:00
jean-pierre charras 710a82bc51 Eeschema: fix an issue in netlists when using "<root sheet>" as root sheet path name.
Netlists do not accept any char in netnames (especially spice).
They must use only "/" as root sheet path name.

Especially _( "<root sheet>" ) breaks netlists because:
- there is a space in name, and special chars (< and >)
- it is a translatable name. so the actual name cannot be managed.
- most of netlist code in Kicad expects a "/" as root path.
2019-06-23 19:37:41 +02:00
Seth Hillbrand 39c2745f55 eeschema: Allow spaces in label names for multilabeling
This adds the functionality to add multiple labels to your schematic at
once by using spaces in the original label name.

Fixes: lp:1095113
* https://bugs.launchpad.net/kicad/+bug/1095113
2019-06-20 16:21:49 -07:00
jean-pierre charras e1a2cbbea1 Eeschema: fix for root sheet plot filename, in non English languages. 2019-06-20 17:00:06 +02:00
Jeff Young 485d436860 Clear ctx-menu before rebuilding; don't veto ctx-menu mousewarp for non-ctx-menu dialog.
Fixes: lp:1833312
* https://bugs.launchpad.net/kicad/+bug/1833312
2019-06-19 21:17:56 +01:00
Jeff Young 4054d7ddf7 Don't try an intertwine deletion and junction fixup.
Fixes: lp:1833224
* https://bugs.launchpad.net/kicad/+bug/1833224
2019-06-19 19:30:38 +01:00
Jeff Young eb95202708 Fix grid update when edited from menubar.
Fixes: lp:1833399
* https://bugs.launchpad.net/kicad/+bug/1833399
2019-06-19 18:35:17 +01:00
Jeff Young 730b89af6d Another round of changes for immediate actions. 2019-06-19 18:35:17 +01:00
Jeff Young 3a0256aade Add handle-based editing for eeschema bitmaps.
Also cleans out a bunch of duplicated functionality from the image
editor dialog.

Fixes: lp:1828722
* https://bugs.launchpad.net/kicad/+bug/1828722
2019-06-19 18:35:17 +01:00
Seth Hillbrand e16bf40e60 eeschema: Insert junctions when repeating
This is the v6 analog to 697234dd5

Fixes: lp:1832253
* https://bugs.launchpad.net/kicad/+bug/1832253
2019-06-18 20:12:08 -07:00
Jeff Young b8dfc1f26a Fix import sheet pin.
Fixes: lp:1829314
* https://bugs.launchpad.net/kicad/+bug/1829314
2019-06-18 22:44:22 +01:00
Jeff Young 581b5257e1 One more try getting <ESC>/PopTool behaviour right. 2019-06-18 22:34:31 +01:00
Jeff Young b0c1c1ad2b Select both ends of wires in block select.
Fixes: lp:1830717
* https://bugs.launchpad.net/kicad/+bug/1830717
2019-06-18 20:24:15 +01:00
Jeff Young dcbd897a95 Push/pop tools even when selected from the toolbar. 2019-06-18 20:24:15 +01:00
Jeff Young 7dd247f1dc Make better use of TOOL_EVENT parameters. 2019-06-18 20:24:15 +01:00
Seth Hillbrand 42e3c13820 Eeschema: Plot in same order as drawing
This ensures the junctions are on top and the bitmaps are on bottom

(cherry picked from commit ddbc25077c)
2019-06-17 14:59:38 -07:00
Jeff Young 9e464f9f5b Implement rollover highlighting for Eeschema delete tool. 2019-06-17 22:15:20 +01:00
Jeff Young 7cfe19d9fd Cleanup. 2019-06-17 22:15:20 +01:00
Wayne Stambaugh 7235da0979 Eeschema: fix sheet plotting bug.
Prefix the sheet name with "Sheet: " and the sheet file name with "File: "
when plotting so that it matches the display sheet rendering.

Improve the root sheet plot file name.

Fixes lp:1832081

https://bugs.launchpad.net/kicad/+bug/1832081
2019-06-17 17:01:05 -04:00
Wayne Stambaugh d74ec1a1b2 Eeschema: allow empty field strings in field table editor.
The grid apply code was always preventing empty fields.  Change this the
broken behavior to allow any field to be empty except the reference and
value fields.

Fixes lp:1832722

https://bugs.launchpad.net/kicad/+bug/1832722
2019-06-17 15:05:11 -04:00
jean-pierre charras 15a67fc358 Eeschema: fix incorrect size of junctions on screen.
Fixes: lp:1831931
https://bugs.launchpad.net/kicad/+bug/1831931
2019-06-17 18:06:56 +02:00
Jeff Young 4eab89d9ef Fix OSX button order issue in Unsaved Changes dialog.
Also changes the presentation of the string when the checkbox appears
so that the "Changes will be lost" warning isn't hidden by the turndown.
This last part may require conditional compilation as it's undocumented.

Lastly, regularizes the Unsaved Changes strings between the apps.
2019-06-17 17:01:57 +01:00
Jeff Young 1f35ec5521 Beware of copying events and losing the m_passEvent flag.
Fixes: lp:1833031
* https://bugs.launchpad.net/kicad/+bug/1833031
2019-06-17 14:44:39 +01:00
Seth Hillbrand 875caa694c Eeschema: Allow junction dots to be hidden
Drawing junction dots at the line width allows users who do not like
them in their schematics to avoid having them drawn.

(cherry picked from commit 75b5324762)
2019-06-17 05:01:28 -07:00
Jeff Young 5d7739a662 Handle '&'s in menu labels.
Fixes: lp:1832904
* https://bugs.launchpad.net/kicad/+bug/1832904
2019-06-17 10:45:23 +01:00
Jeff Young e6d5110ccf Implement I18N for ACTIONs.
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro.  We do still want it in the
code, however, because the string harvesting is based off of it.

Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
2019-06-17 10:45:23 +01:00
Wayne Stambaugh 418bd28347 Fix build error. 2019-06-16 18:31:10 -04:00
Jeff Young dd3617cfda Fix compile issue. 2019-06-16 22:46:35 +01:00
Jeff Young de67f3f1e9 Move a few more things to ACTIONs. 2019-06-16 19:53:30 +01:00
Jeff Young 909aeba3d9 Transition some more stuff from the MVC view to the controller. 2019-06-16 19:53:30 +01:00
Jeff Young c7bfa9857e Use more reflective naming of what the tool does. 2019-06-16 19:52:07 +01:00
jean-pierre charras 66d2060942 Partial fix for missing language selection menu.
The fix is partial because in the list of languages the menuitem corresponding to the selected language is not checked.
2019-06-16 20:35:57 +02:00
Wayne Stambaugh be8fe3884f Fix spelling error in symbol library table warning string. 2019-06-16 12:26:47 -04:00
Wayne Stambaugh 77bf575742 CvPcb: fix save changes dialog layout issue.
DIALOG_EXIT was not being laid out correctly after setting the dialog
message.  Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT.  This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.

Remove DIALOG_EXIT_BASE as it is no longer required.

Fixes lp:1832899

https://bugs.launchpad.net/kicad/+bug/1832899
2019-06-16 12:10:24 -04:00
Jeff Young e4fbd003e0 Make m_passEvent event-specific rather than global.
If a tool called something like clearSelection while processing a
MOUSE_CLICK, the SELECTION_TOOL will pass the clearSelection
COMMAND_EVENT because it handles it as a transition, not as an
event. Because m_passEvent is effectively global, the tool manager
would then interpret that as passing the MOUSE_CLICK and we'd end
up processing the click by multiple tools.
2019-06-16 12:06:49 +01:00
jean-pierre charras 6a8e69f9c9 Fix a compil warning. 2019-06-16 09:12:32 +02:00
Jeff Young 0f4bdbd184 Tighten down the POINT_EDITORs a bit more. 2019-06-16 01:33:39 +01:00
Jeff Young 18ebced8f4 Code hygiene. 2019-06-15 20:43:52 +01:00
Jeff Young 19aba615c2 Remove selection condition from conditional menu separators.
We don't allow duplicate separators anyway so all they really do
is complicate the code.
2019-06-15 20:43:51 +01:00
Jeff Young 5610261dce Immediate-action hotkeys (and context menu actions) for eeschema. 2019-06-15 20:43:51 +01:00
Jeff Young 83ee51370c Cancel interactive editing when switching sheets.
Fixes: lp:1819278
* https://bugs.launchpad.net/kicad/+bug/1819278
2019-06-14 16:54:46 +01:00
Maciej Suminski 7d69a917b9 Fixed a crash in EE_SELECTION_TOOL::SelectPoint()
The for loop is continued after an item removal, so the removed item
is not accessed anymore.
2019-06-14 13:00:39 +02:00
Seth Hillbrand fb3d1bdb59 Clear some compile warnings 2019-06-13 15:16:54 -07:00
Jeff Young 8cc1e2b5e7 Fix breakage in wire moving/dragging/etc.
Fixes: lp:1832750
* https://bugs.launchpad.net/kicad/+bug/1832750
2019-06-13 19:58:37 +01:00
Jeff Young 8f84c3ec4f Grid rid of GetCanvas/GetGalCanvas distinction now that there's only gal. 2019-06-13 19:58:37 +01:00
Steven A. Falco 1edeba7fb4 Show the current grid setting. 2019-06-13 14:34:39 -04:00
Jeff Young ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +01:00
Jeff Young 4043a15482 When pasting a sheet link to existing copy if it already appears in the hierarchy.
Fixes: lp:1830633
* https://bugs.launchpad.net/kicad/+bug/1830633
2019-06-13 15:51:32 +01:00
Wayne Stambaugh 028973d182 LibEdit: fix library tree refresh issue when library is removed.
A bug in LIB_MANAGER::LibraryExists() prevented a library removed from
the symbol library table from being removed from the tree view.  Add the
proper check to SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().

This exposed another issue with synchronization between the library
table editor and the tree view which could lead to orphaned library
modifications and/or a segfault when the currently selected library was
removed from the symbol library table.  Give the user a chance to save
or revert any changes before allowing changes to the symbol library
table.

Fixes lp:1821691

https://bugs.launchpad.net/kicad/+bug/1821691
2019-06-13 07:45:03 -04:00
Seth Hillbrand e52afd93a3 Remove Legacy options for overlay/context
These options were used to support the legacy canvas when drawing on
MacOS and GTK3.  With the move to 100% GAL, they are extraneous.  This
moves all DC over to "COPY" as we only use this for printing support in
Eeschema at the moment, so there is a single draw command (no erasing)
for the canvas.
2019-06-12 06:01:03 -07:00
Seppe Stas 455ee4c08c Set KiCad version in MacOS apps
Uses CMake's configure_file function [1] to automaticaly set the
CFBundleShortVersionString [2] value in every app's Info.plist file.

Also updates the CFBundleLongVersionString and CFBundleVersion with the
extended KiCad Version

[1]: https://cmake.org/cmake/help/latest/command/configure_file.html
[2]: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
2019-06-12 04:40:03 -07:00
Jeff Young c0e1f7a17a Add dragging of wire ends, corners and junctions.
Fixes: lp:1830007
* https://bugs.launchpad.net/kicad/+bug/1830007
2019-06-11 21:20:19 +01:00
Jeff Young b1b7408cf2 Accidentally checked in some debugging stuff. 2019-06-11 18:53:36 +01:00
Jeff Young 7726b039b2 Re-jigger standard submenus so they both link AND work. 2019-06-11 18:03:16 +01:00
Jeff Young 05652d4787 Rework the preparation for eeschema's move-tool.
There are a whole bunch of cases which all have to work:
 regular move
 move followed by drag
 drag followed by move
 move followed by duplicate
 duplicate
 paste
and all both with and without Warp Mouse on Move checked.
2019-06-11 18:03:16 +01:00
Jeff Young e4d16abcbd Fix overly-generic flag test when synchronizing pins.
Fixes: lp:1832170
* https://bugs.launchpad.net/kicad/+bug/1832170
2019-06-11 09:29:30 +01:00
Jeff Young 09a3c5b280 Update pasted items' parent pointers.
Fixes crashes when trying to manipulate the item after the paste,
and weird redraw behaviour with pins.

Fixes: lp:1832178
* https://bugs.launchpad.net/kicad/+bug/1832178
2019-06-11 09:22:56 +01:00
Jeff Young 6623ab91a8 Fix issue with picker tool activation. 2019-06-11 00:25:38 +01:00
Jeff Young e9017ce0b1 Update status bar when selected items are modified.
Fixes: lp:1831801
* https://bugs.launchpad.net/kicad/+bug/1831801
2019-06-10 23:46:01 +01:00
Jeff Young b3e30e50c8 Cleanup. 2019-06-10 23:46:01 +01:00
Jeff Young b0e8443383 Sync-ing of menu has been done in CONDITIONAL_MENU for some time now. 2019-06-10 23:46:01 +01:00
Jeff Young a568e70b99 Follow naming conventions. 2019-06-10 23:46:01 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young 6025256e07 Push KIWAY_HOLDER down a level so we can move a bunch of stuff that doesn't belong there out. 2019-06-10 23:46:00 +01:00
Jeff Young 765606012f Convert separate-compilation of selection.cpp to polymorphism. 2019-06-10 23:46:00 +01:00
Jeff Young e606587ff6 Move remaining Symbol Tree ctx menu cmds to ACTIONS.
Also moves the various Player instantiators down into COMMON_TOOLS
for better sharing.
2019-06-10 23:46:00 +01:00
John Beard 7ebda0247f Common: Remove legacy_gal library, fold into common
Return the EDA_DRAW_FRAME class back to common, whence it came (before it was
duplicated into legacy_wx and legacy_gal). Now there is only one
implementation (the GAL one), it doesn't need to be in a separate library.

This simplifies the dependencies for common lib users.
2019-06-10 18:56:57 +01:00
jean-pierre charras beb4348016 Eeschema: fix incorrect saving in prj config on the default netlist format.
It was not always saved, and this was not the default, but the last used format.
2019-06-10 18:44:46 +02:00
Seth Hillbrand bc096dc4ee Eagle: Fix stacked NC pin import
Since Eagle does not connect stacked NC pins but KiCad will if the pins
are coincident, we choose to only import the first of the stacked NC
pins.  While this creates symbols that are slightly different in pin
count from the Eagle version, it keeps the schematic and netlist
functionally correct relative to the Eagle version.

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

(cherry picked from commit 370109b868)
2019-06-09 17:03:44 -07:00
jean-pierre charras bc27b0ed5f Sim spice: fix unescaped netnames in spice netlist and simulator dialogs.
Net names in eeschema that include '/' are escaped ('/' replaced by "{slash}")
Escaped netnames are only for internal use, and must be unescaped in spice netlist and dialogs.
2019-06-09 17:48:01 +02:00
jean-pierre charras df5c5c23ca Eeschema: fix incorrect handling of '/' in graphic texts.
It was escaped (replaced by "{slash}") in dialog.
This is right for labels, not for texts.
A consequence was the directives in spice simul can be broken.
Now the graphic text is not escaped.
2019-06-08 17:32:49 +02:00
Seth Hillbrand 598b140112 eagle: Strip newlines from description
Eeschema old format is line-terminated so the newlines in descriptions
will break the schematic file if saved.

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

(cherry picked from commit fb85612f81)
2019-06-07 22:08:58 -07:00
Jon Evans 607650be22 Connectivity: don't consider neighbor propagation when types don't match
Fixes: lp:1831608
* https://bugs.launchpad.net/kicad/+bug/1831608
2019-06-05 22:26:44 -04:00
Jon Evans 1142eb259b Eagle: properly translate group buses now that we support them 2019-06-05 22:09:09 -04:00
Jon Evans 42887544c9 Connectivity: ensure globally-labeled buses are always propagated
Fixes: lp:1822964
* https://bugs.launchpad.net/kicad/+bug/1822964
2019-06-05 21:33:20 -04:00
Jon Evans 8d8c743f97 Connectivity: remove unused method 2019-06-05 21:27:56 -04:00
Jeff Young b9927a0655 Don't put standard menu items into symbol tree context menu. 2019-06-05 23:33:15 +01:00
Jeff Young 469fc3b572 Finish moving symbol editor tree context menu to ACTIONs. 2019-06-05 23:29:59 +01:00
Jeff Young 6fab7cc025 Remove a bunch of ugly mutex hacks now that we don't use wxString's UTF8 mode anymore. 2019-06-05 21:23:41 +01:00
Seth Hillbrand c6af38477d CMake: Handle custom_target indirection
Building custom targets that depend on custom commands such as our
keyword lexer requires two layers of indirection to pick up changes
properly and not overwrite the same file in parallel builds.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-05 13:05:43 -07:00
Jeff Young 2d40425e4d Move footprint & symbol tree context menus to tool infrastructure.
Fixes: lp:1831692
* https://bugs.launchpad.net/kicad/+bug/1831692
2019-06-05 20:16:48 +01:00
Jeff Young 1ea5b04e22 More ACTIONS work. Nearly done now. 2019-06-04 22:31:42 +01:00
Jeff Young dfcffddbe4 Fix destruction order in Symbol Properties grid table.
wxGrid is VERY cranky about this.  I've only found one recipie that works,
and it must be applied strictly.

Fixes: lp:1831317
* https://bugs.launchpad.net/kicad/+bug/1831317
2019-06-04 15:02:42 +01:00
Jeff Young 1fe848f37c Minor performance enhancements. 2019-06-04 13:56:54 +01:00
Jeff Young 1ea001d497 Go back to event-loop zooming for new frames.
The immediate mode appears to have made things worse not better.
2019-06-04 13:56:54 +01:00
Jeff Young 7c337ec45d Make sure the current desc is shown for parts being edited.
Fixes: lp:1820298
* https://bugs.launchpad.net/kicad/+bug/1820298
2019-06-04 13:56:54 +01:00
Jon Evans 1721cc1700 Ensure pasted sheets get parents set properly for screen discovery
Fixes: lp:1831460
* https://bugs.launchpad.net/kicad/+bug/1831460
2019-06-03 20:30:35 -04:00
Jeff Young 1bf04d1722 More ACTIONs work. 2019-06-04 00:51:16 +01:00
Jeff Young 568c8c336b Move DRC control to a tool; move assorted commands to ACTIONS. 2019-06-03 21:08:30 +01:00
Jeff Young 9f1e2e34b7 Move some dupicated tools to common tools. 2019-06-03 21:08:30 +01:00
Jeff Young e517199794 Move ConfigurePaths and LibTable management to common ACTIONs. 2019-06-03 21:08:30 +01:00
Jeff Young da4fe27447 More ACTIONS work. 2019-06-02 21:10:56 +01:00
Jeff Young 33773bad4d Yet more command conversions to ACTIONs. 2019-06-02 21:10:56 +01:00
Jon Evans 256d7b0714 ERC: Use local paths for bus<>bus entry testing
Fixes: lp:1831365
* https://bugs.launchpad.net/kicad/+bug/1831365
2019-06-02 11:34:15 -04:00
Jeff Young dfc2fe3929 Don't try to post-process an empty clipboard paste.
Fixes: lp:1831364
* https://bugs.launchpad.net/kicad/+bug/1831364
2019-06-02 16:21:44 +01:00
Jeff Young 45a9544726 Instantate a default menu from no selection when menu is first built.
This might resolve some of the GTK menu anomalies.
2019-06-02 12:58:08 +01:00
Jeff Young 6c93cccb70 Implement enable/disable of LibEdit save icon.
Fixes: lp:1831314
* https://bugs.launchpad.net/kicad/+bug/1831314
2019-06-01 23:24:17 +01:00
Jeff Young 7f1ed30ff5 Move DeMorgan handling to ACTIONs. 2019-06-01 23:03:24 +01:00
Jeff Young 39b91c90dd Moved more operations to ACTIONs. 2019-06-01 23:03:24 +01:00
Jeff Young 3777c5270b Move some more Eeschema operations to ACTIONs. 2019-06-01 16:29:12 +01:00
Jeff Young 74e10791ff Fix some Mac-specific issues with the Preferences... menu item. 2019-06-01 16:29:12 +01:00
Jon Evans 27a2b840ec Eeschema: Fix multiple net label ERC after sorting changes
Fixes: lp:1831003
* https://bugs.launchpad.net/kicad/+bug/1831003
2019-05-31 21:55:54 -04:00
Jeff Young f1076c0f48 Fix missing reference keeping history from getting saved.
Fixes: lp:1830185
* https://bugs.launchpad.net/kicad/+bug/1830185
2019-05-31 23:38:15 +01:00
Jeff Young c7fa5c567f Load sheet content after a paste.
Fixes: lp:1830633
* https://bugs.launchpad.net/kicad/+bug/1830633
2019-05-31 23:38:15 +01:00
Jeff Young 1dd1ddf83b Try an "add wires" strategy instead of trying to figure out what to pick up and what to anchor.
Fixes: lp:1831199
* https://bugs.launchpad.net/kicad/+bug/1831199
2019-05-31 21:56:35 +01:00
Jeff Young d7774b94fc Fix regression with switching between drag and move operation. 2019-05-31 21:56:35 +01:00
Jeff Young ead1914b1d Don't autopan until mouse moves. 2019-05-31 21:55:30 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Jeff Young 03bab2f4a9 Remove some more legacy drawing stuff. 2019-05-31 21:54:22 +01:00
Jeff Young 0a01277808 Fix issues with schematic find/change.
Fixes: lp:1831006
* https://bugs.launchpad.net/kicad/+bug/1831006
2019-05-31 21:54:22 +01:00
Jeff Young d2daab808c Remove some legacy cursor handling stuff. 2019-05-31 21:54:22 +01:00
Jeff Young edc8438ef0 Start the process of removing the legacy draw panel. 2019-05-31 21:54:21 +01:00
jean-pierre charras 4842c73530 Fix minor compil warnings. 2019-05-31 21:38:30 +02:00
jean-pierre charras 611878351a BOM and Netlist dialogs: replace "plugin" by "generator" and/or "script".
The "plugins" in these dialogs are not plugins.
They are external scripts (or applications) run from Eeschema.
2019-05-31 11:06:23 +02:00
Jeff Young 1e9da7f57b Remove CurItem() architecture and legacy routers and drawing code. 2019-05-29 00:26:30 +01:00
Jeff Young 9d29e94cb5 Remove some more legacy code. 2019-05-29 00:26:29 +01:00
Jeff Young 0260b32125 Push resetLocalCoords down into COMMON_TOOLS.
Fixes: lp:1830693
* https://bugs.launchpad.net/kicad/+bug/1830693
2019-05-29 00:26:29 +01:00
Jeff Young a27e4246e0 Move some more menu commands to ACTIONs. 2019-05-29 00:26:29 +01:00
Jeff Young c0909611d3 Remove a bunch more legacy editing code. 2019-05-29 00:26:29 +01:00
Wayne Stambaugh 133ff9b552 Eeschema: fix broken symbol library links after sheet edit.
Refresh the currently edit sheet screen symbol links when the sheet file
name is changed.

https://bugs.launchpad.net/kicad/+bug/1830315

Fixes lp:1830315
2019-05-28 17:31:54 -04:00
Seth Hillbrand 0b629b4bd4 eeschema: Limit normalization on load
When loading a new file, we do not want to add junctions where they did
not exist before.  This could generate invalid netlists by breaking a
wire at a pin connection point.

We do break/add connections when the user modifies the schematic but
this happens while the user is actively working with the component and
sees the action.

Fixes: lp:1830411
* https://bugs.launchpad.net/kicad/+bug/1830411
2019-05-28 13:29:20 -07:00
Jon Evans 5287ab6e4f Eeschema: improve simulator behavior for two-source DC analysis
Fixes: lp:1830478
* https://bugs.launchpad.net/kicad/+bug/1830478

(cherry picked from commit 356ccd0314)
2019-05-27 18:23:56 -04:00
Jeff Young 718ad77891 Fix a bug introduced when UseGalCanvas() no longer switches.
We still need to setup the viewport the first time.
Also removes some more legacy editing code.
2019-05-27 18:47:20 +01:00
Jeff Young 9d9745b555 Remove more legacy editing code. 2019-05-27 18:47:20 +01:00
Jeff Young db90e97d0b fixup! Implement undo for Page Settings in PlEditor, Eeschema and PCBNew. 2019-05-27 14:12:20 +01:00
Jeff Young d24a2afaca Fix duplicate to work like paste to keep pins from getting duplicated.
Also fixes the post-duplicate move to start at the cursor pos.
Also fixes the fact that duplicate wasn't getting its hotkey.

Fixes: lp:1830596
* https://bugs.launchpad.net/kicad/+bug/1830596
2019-05-27 11:58:56 +01:00
Jeff Young 800cc1a11c Fix intial drag point for paste in LibEdit. 2019-05-27 11:58:56 +01:00
Jeff Young e9e28b9aac Retire legacy block architecture. 2019-05-27 11:58:56 +01:00
Jeff Young 927d2a645c Move LibEdit Save operations to ACTIONS. 2019-05-27 11:58:55 +01:00
Jeff Young 2502bce987 Move quit back to wxIDs. wxWidgets like to muck around with the location on OSX. 2019-05-27 11:58:55 +01:00
Jeff Young 6936effaa7 Implement undo for Page Settings in PlEditor, Eeschema and PCBNew.
Fixes: lp:1820059
* https://bugs.launchpad.net/kicad/+bug/1820059
2019-05-27 11:58:55 +01:00
Jeff Young bdd44ce88c Use consistent PageLayout data structure names. 2019-05-27 11:55:58 +01:00
Seth Hillbrand 0e5cc54ec9 Eagle: Fix crash when importing Eagle V6
This fixes multiple issues when importing Eagle V6 files.

Crashes occured when arcs of 0-length were found and when parts were
referenced in the schematic that were not found in the library.  This
could happen if the library and schematic were different cases.

Fixes: lp:1830564
* https://bugs.launchpad.net/kicad/+bug/1830564
2019-05-26 20:31:55 -07:00
Jon Evans d2a2dea9c4 Eeschema: fix worksheet and background color for printing
Fixes: lp:1820611
* https://bugs.launchpad.net/kicad/+bug/1820611

(cherry picked from commit 720b26d11e)
2019-05-26 14:26:26 -04:00
Jon Evans b40289c1bd Eeschema: use worksheet color when plotting
Fixes: lp:1825568
* https://bugs.launchpad.net/kicad/+bug/1825568

(cherry picked from commit e35be13b23)
2019-05-26 13:03:23 -04:00
jean-pierre charras 568d4e2b19 Avoid including id.h in a lot of files that do not use it. 2019-05-26 08:14:25 +02:00
jean-pierre charras b8e2054b23 Activate context menu in LIB_VIEW_FRAME canvas. 2019-05-25 10:13:27 +02:00
Jeff Young a3dfce5adb Implement common file menu actions and move Eeschema over. 2019-05-25 01:14:21 +01:00
Jeff Young 94c8e84d3b Make sure PCB document is opened when doing an update.
Fixes: lp:1830256
* https://bugs.launchpad.net/kicad/+bug/1830256
2019-05-24 21:23:26 +01:00
jean-pierre charras 057366e97e Viewlib frame: make toolbar menu "List Hotkeys" working 2019-05-24 21:01:49 +02:00
Jeff Young 85f984ccd9 Add point-editor activation for immediate-mode drawing. 2019-05-24 19:49:09 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
Michael Kavanagh 43a5bb72ca Fix swapped mirror icons in eeschema context menu
Fixes: lp:1828631
* https://bugs.launchpad.net/kicad/+bug/1828631
2019-05-24 13:12:58 -04:00
jean-pierre charras 40382f4d52 Viewlib: menubar/view menu: make grid select working
Set also a better icon for this menu item
2019-05-24 15:49:51 +02:00
jean-pierre charras 944ecc8913 Remove unused vars. 2019-05-24 15:21:40 +02:00