Commit Graph

4956 Commits

Author SHA1 Message Date
Wayne Stambaugh b66ecf141f Eeschema: fix sheet file name case sensitivity test.
Fix overzealous test if the new file name is the same as an existing
file name.

Fix a potential comparison bug due to missing file extension.
2019-12-12 15:36:57 -05:00
Wayne Stambaugh 20836261d7 Fix minor coding policy violations. 2019-12-12 14:55:35 -05:00
Wayne Stambaugh c4d1cebbdd Symbol editor: fix a compiler warning in the library manager code.
Fixes kicad/code/kicad#3651
2019-12-12 14:36:29 -05:00
Wayne Stambaugh bcaa15e54c Eeschema: fix yet another symbol inheritance crash.
The schematic symbol swap function still had the old pin map swapping
code which overwrote the correct pin maps that were rebuild after the
library symbol was update.  Duh!

Fixes kicad/code/kicad#3661
2019-12-12 12:59:01 -05:00
Wayne Stambaugh a18d7a8495 Eeschema: fix a selection bug created in commit bec87864.
Apparently the schematic and symbol library editors now have common
selection filtering so checking for a valid LIB_EDIT_FRAME when
filtering for the  schematic editor frame prevented all schematic
object from being selected.
2019-12-12 11:42:11 -05:00
Wayne Stambaugh bec878640c Symbol editor: fix crash caused by broken root symbol name.
The symbol editor selection criteria did not include LIB_FIELD objects
which allowed the root symbol name to be changed causing broken derived
symbol links.  Disable the symbols fields from being edited when a
derived part is shown in the editor to prevent this.

Add a missing warning that deleting a root symbol used to derive other
symbols would also delete all derived symbols from a library.  Give the
user a chance to cancel the delete operation in this case.

Fixes kicad/code/kicad#3654
2019-12-12 10:45:12 -05:00
Wayne Stambaugh ed025972ab Eeschema: fix crash caused by stale symbol library object pointers.
The new symbol library changes left stale pointers in the connection
graph because the SCH_COMPONENT object pins were not always getting
updated when a new copy of the library symbol was updated.

Force a full update of the connection graph whenever the schematic
library symbol links are refreshed.  This seems like overkill but it
ensures that there a no stale libraries items left in the connection
graph.

Fixes kicad/code/kicad#3658
2019-12-11 18:53:29 -05:00
Jeff Young c5df98a170 Clean up spacing in Eeschema Display Options.
Also adds a note for editing highlight color.
2019-12-11 20:50:38 +00:00
Jonatan Liljedahl 90d2ea5dd5 Eeschema: simulator: add keyboard shortcuts for add signal, etc
(cherry picked from commit bc4caa8913ceff15391f6347a9edb8acbc60172e)
2019-12-11 04:34:22 +00:00
Seth Hillbrand e39586e157 Eeschema: Catch error on init
Some windows systems will not fall back correctly on our standard
initialization step, so we need the additional std:: error fall back to
catch them.

Fixes #2620 | https://gitlab.com/kicad/code/kicad/issues/2620
2019-12-10 13:48:13 -08:00
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