Commit Graph

4258 Commits

Author SHA1 Message Date
Wayne Stambaugh 5d60fe6812 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
(cherry picked from commit 8789ab9265)
2019-08-01 15:24:55 -04:00
Wayne Stambaugh 6051dfae30 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
(cherry picked from commit b595dc0d3b)
2019-08-01 15:24:55 -04:00
Wayne Stambaugh 3518153d5b 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.

(cherry picked from commit 9fae30162d)
2019-08-01 15:24:55 -04:00
Seth Hillbrand cf949609b2 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
2019-08-01 11:45:10 -07:00
jean-pierre charras d34b664933 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)

(cherry picked from commit d92396341e)
2019-07-28 04:52:57 -07:00
Seth Hillbrand b6fe4ff637 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.
2019-07-23 10:47:15 -07:00
jean-pierre charras 3c8f901a1f Revert "Fix ngspice netlisting when net names contain '/'"
This reverts commit 216573bf48,
because the issue with net names containing '/' is not actually inside the netlist.
This commit 2165 creates issues with ngspice 2.8 and older, and do not fix anything in ngspice
2019-07-19 15:52:18 +02:00
Jeff Young 3418d53a6d Update symbol ID before running Update Fields from Library.
Fixes: lp:1827707
* https://bugs.launchpad.net/kicad/+bug/1827707

(cherry picked from commit fb881ee209)
2019-07-08 22:57:15 +01:00
Ian McInerney d5440d60ab eeschema: Fix initial selected text in reference value dialog
Fixes: lp:1834741
* https://bugs.launchpad.net/kicad/+bug/1834741

(cherry picked from commit e32306c232)
2019-07-08 14:50:53 -04:00
Jeff Young 85220591e2 Fix bugs in keyboard cursor movement.
1) Generate refreshPreview events so the modern toolset doesn't
fall behind by one event (see LP:1818667)
2) In the legacy toolset don't call unimplemented routines and don't
snap to grid on the non-movement axis.
2019-07-05 01:32:15 +01:00
Jeff Young ecadc8bbba 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

(cherry picked from commit ef03afe289)
2019-07-03 14:34:11 +01:00
jean-pierre charras d129abb9c9 Eeschema, lib editor: fix a message error when loading a symbol from the schematic editor.
Adaptation from master branch, commit ff995bb7
2019-07-02 18:40:48 +02:00
Jeff Young 216acd98d6 Separate default line and wire thicknesses.
Fixes: lp:1834324
* https://bugs.launchpad.net/kicad/+bug/1834324
2019-06-30 11:13:17 +01:00
Jeff Young 10fd8a59b2 Apply relevant fixes from 51479c2042.
Fixes: lp:1834703
* https://bugs.launchpad.net/kicad/+bug/1834703
2019-06-29 21:17:22 +01:00
Ian McInerney f82962e42c 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:17:20 +02:00
Wayne Stambaugh df3a57dcda 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

(cherry picked from commit 288982b15d)
2019-06-25 08:46:27 -04:00
jean-pierre charras f0ac61a8fd Eeschema: minor fix for root sheet plot file name.
Fixes: lp:1833487
https://bugs.launchpad.net/kicad/+bug/1833487
2019-06-20 13:41:04 +02:00
Seth Hillbrand 8f7278e34f Eeschema: Normalize layer ordering between plot and screen
Fixes: lp:1833428
* https://bugs.launchpad.net/kicad/+bug/1833428
2019-06-19 10:49:28 -07:00
Seth Hillbrand 697234dd51 eeschema: Insert junctions when repeating
Fixes: lp:1832253
* https://bugs.launchpad.net/kicad/+bug/1832253
2019-06-18 19:38:13 -07:00
Wayne Stambaugh aa3aafc4ff 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
(cherry picked from commit 7235da0979)
2019-06-17 17:02:21 -04:00
Seth Hillbrand ddbc25077c Eeschema: Plot in same order as drawing
This ensures the junctions are on top and the bitmaps are on bottom
2019-06-17 13:27:11 -07:00
Seth Hillbrand b075886b19 DC printing: Place worksheet behind schematic
And place bitmaps behind other items.  This ensures they are drawn in
the background of the page rather than covering schematic elements.

This also hacks around the buggy wxPostScriptDC implementation that
resets the page to print an image.

Fixes: lp:1819934
* https://bugs.launchpad.net/kicad/+bug/1819934
2019-06-17 13:03:00 -07:00
Wayne Stambaugh eae999a85a 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
(cherry picked from commit d74ec1a1b2)
2019-06-17 15:06:27 -04:00
jean-pierre charras 8de93ad8b4 Eeschema: fix incorrect size of junctions on screen.
Fixes: lp:1831931
https://bugs.launchpad.net/kicad/+bug/1831931
2019-06-17 18:08:44 +02:00
Seth Hillbrand 75b5324762 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.
2019-06-17 04:48:10 -07:00
Wayne Stambaugh 610d200e8a Fix spelling error in symbol library table warning string.
(cherry picked from commit be8fe3884f)
2019-06-16 12:28:56 -04:00
Wayne Stambaugh 8002692f3e 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

(cherry picked from commit 3f665318f4ab5c02b7d3c29b5233a273fdac2e4e)
2019-06-16 12:28:35 -04:00
Steven A. Falco cfa187f477 Show the current grid setting. 2019-06-13 12:14:41 -04:00
Wayne Stambaugh 1ed411e431 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

(cherry picked from commit 028973d182)
2019-06-13 08:59:26 -04:00
Seppe Stas 9233ae97d0 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

(cherry picked from commit 455ee4c08c)
2019-06-12 14:12:01 -07:00
Seth Hillbrand df89b5bf8a eeschema: Don't extend the block when finalizing action
The block draw function is called during the mouse capture callback.  It
shouldn't be called after the block size is finalized.

Fixes: lp:1832289
* https://bugs.launchpad.net/kicad/+bug/1832289
2019-06-11 12:17:25 -07:00
jean-pierre charras 4ceb186251 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 20:37:34 +02:00
Seth Hillbrand 370109b868 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
2019-06-09 17:02:46 -07:00
Seth Hillbrand fb85612f81 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
2019-06-07 22:08:06 -07:00
Seth Hillbrand 63f18f0b03 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

(cherry picked from commit c6af38477d)
2019-06-05 13:10:00 -07:00
Jeff Young cd6da987cc Make sure the current desc is shown for parts being edited.
Fixes: lp:1820298
* https://bugs.launchpad.net/kicad/+bug/1820298

(cherry picked from commit 7c337ec45d)
2019-06-04 16:30:59 +01:00
Ian McInerney 81842fc9d0 eeschema: Make symbol editor cursor track crosshairs with arrow keys
Fixes: lp:1829280
* https://bugs.launchpad.net/kicad/+bug/1829280
2019-05-31 07:47:18 -04:00
Seth Hillbrand 455136ee50 eeschema: end mouse capture before exiting sheet
The mouse capture has a cleanup associated that we call to cancel the
action.  This prevents issues when trying to copy between hierarchical
sheets.

Fixes: lp:1819278
* https://bugs.launchpad.net/kicad/+bug/1819278
2019-05-28 21:19:21 -07:00
Wayne Stambaugh 1638c3b1c2 Eeschema: fix broken symbol library links after sheet edit.
Refresh the currently edit sheet screen symbol links when the sheet file
name is changed.

This fix was better than the previous fix as it was the same diff between
the master and 5.1 branches.

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

Fixes lp:1830315

(cherry picked from commit 89ada624d3d3b28ad5ee1477b353501d46dae3a2)
2019-05-28 17:29:48 -04:00
Wayne Stambaugh 2d0e92d412 Revert "Eeschema: fix broken symbol library links after sheet edit."
This reverts commit f1a43f4977.
2019-05-28 17:07:46 -04:00
Wayne Stambaugh f1a43f4977 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 14:49:02 -04:00
Jon Evans 356ccd0314 Eeschema: improve simulator behavior for two-source DC analysis
Fixes: lp:1830478
* https://bugs.launchpad.net/kicad/+bug/1830478
2019-05-27 18:13:07 -04:00
Seth Hillbrand b4e70e56a6 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

(cherry picked from commit 0e5cc54ec9)
2019-05-26 20:34:05 -07:00
Jon Evans 720b26d11e Eeschema: fix worksheet and background color for printing
Fixes: lp:1820611
* https://bugs.launchpad.net/kicad/+bug/1820611
2019-05-26 14:25:57 -04:00
Jon Evans e35be13b23 Eeschema: use worksheet color when plotting
Fixes: lp:1825568
* https://bugs.launchpad.net/kicad/+bug/1825568
2019-05-26 12:21:08 -04:00
Wayne Stambaugh 6db7cb8937 Symbol Editor: fix datasheet field bug loading old symbol libraries.
This only applies to the root symbol when the datasheet field is not
empty and the datasheet for root symbol alias in the document file is
empty.  Use the root symbol datasheet field value when adding a new
symbol that meets this criteria.

The root symbol datasheet field gets copied to the root symbol alias
datasheet member variable so if the symbol is modified and saved, the
datasheet information is saved in the .dcm file.

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

Fixes lp:1830078

(cherry picked from commit c52ff1ca23)
2019-05-23 09:02:21 -04:00
Wayne Stambaugh 6afc572eae Eeschema: fix datasheet field bug loading old symbol libraries.
This only applies to the root symbol when the datasheet field is not
empty and the datasheet for root symbol alias in the document file is
empty.  Use the root symbol datasheet field value when adding a new
symbol that meets this criteria.

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

Fixes lp:1830083

(cherry picked from commit 300f5cb082)
2019-05-23 07:35:10 -04:00
Seth Hillbrand ec6fd23636 EAGLE: Prevent numeric-only component references
KiCad does not allow references to be numeric only.  This prefixes such
references with "UNK" to note that the reference designator type is
unknown.

(cherry picked from commit a62a89eac3)
2019-05-22 10:38:16 -07:00
jean-pierre charras 764986a9b0 Fix a compil issue 2019-05-22 18:35:58 +02:00
jean-pierre charras c4efa95b4a * Eeschema: Ensure axis are always drawn in libedit and viewlib
(From master branch)
2019-05-22 17:56:08 +02:00
Wayne Stambaugh 5a655779d7 Eeschema: fix broken cursor after mouse wheel pan.
Fixes lp:1827787

https://bugs.launchpad.net/kicad/+bug/1827787
2019-05-21 14:21:53 -04:00
Wayne Stambaugh 0403437ad0 Eeschema: replace invalid characters when converting from text to label.
Fixes lp:1829664

https://bugs.launchpad.net/kicad/+bug/1829664
2019-05-20 14:49:49 -04:00
jean-pierre charras 9c0e4cae74 Eeschema: fix incorrect position of fields of a hierarchical sheet when rotated
(From master branch)

Fixes: lp:1829048
https://bugs.launchpad.net/kicad/+bug/1829048
2019-05-17 08:36:09 +02:00
Wayne Stambaugh ae139403e4 Fix library table editor dialog environment variable grid column names.
Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1828459
(cherry picked from commit 6f27ef7f66)
2019-05-14 07:59:22 -04:00
Wayne Stambaugh d3c9154f9a Fix frame name capitalization in all about dialogs.
This is a stop gap fix.  It should be possible to use the wxFrame title
string for this but some of the frame windows have appropriated the title
string for configuration file naming purposes which is less than ideal.

Fixes lp:1825977

https://bugs.launchpad.net/kicad/+bug/1825977
(cherry picked from commit 3c4f8c1bf7)
2019-05-13 16:22:52 -04:00
jean-pierre charras 3f48531da7 DIALOG_EDIT_COMPONENT_IN_LIBRARY: fix a dialog resize issue (grid not resized). 2019-05-11 10:09:32 +02:00
Wayne Stambaugh 8e93eda449 Eeschema: fix corrupted schematic and symbol library files.
Prevent user from pasting text with carriage return and/or line feed
characters in field value edit control in the schematic symbol and symbol
library properties dialogs.

Make all objects derived from GRID_CELL_TEXT_BUTTON use validators
correctly.

Add validators to FIELDS_GRID_TABLE object for field values other than
the mandatory fields.

Create a validator to check that a string is a valid LIB_ID.

Fixes lp:1828214

https://bugs.launchpad.net/kicad/+bug/1828214
(cherry picked from commit ae54f34392)
2019-05-10 09:16:38 -04:00
jean-pierre charras bb40f86daa * Eeschema: fix incorrect display of the page number in a complex hierarchy.
When, inside a complex hierarchy, one switch from an instance of a sheet to an other instance of this sheet,
the page number shown in the worksheet was not updated on screen, and the initial number was displayed.

Fix from master branch.
2019-05-07 11:02:05 +02:00
Wayne Stambaugh 616061a6ca Eeschema: fix broken symbol library links.
Force the symbol library links whenever the symbol library table has been
modified.  This will use the cache as a fallback when a library has been
removed that contains links in the schematic rather than display.

Fix the SCH_COMPONENT symbol resolver when falling back to the cache.  The
resolver was using the LIB_ID ':' notation which was failing.  Replacing
':' with '_' fixed this issue.  This was also an issue when generating the
symbol message panel information.

Convert wxLogDebug to wxLogTrace in symbol resolver code path.  Add new
trace type KICAD_SYM_RESOLVE.

Fixes lp:1821606

https://bugs.launchpad.net/kicad/+bug/1821606
(cherry picked from commit 7d803437e2)
2019-05-02 12:13:30 -04:00
John Beard 89d39cf8ff Pcbnew: use same null check as eeschema for recently used
When Pcbnew's add footprint browser is run up, it constructs
the recently used list without checking for nulls.

Although the DoAddLibrary call does internally check for
null, it's easier to filter these out before placing into
the vector in the first place.

The same logic in the symbol tree is already handled in the
same way.

(cherry picked from commit 42d20cbd96)
2019-04-29 17:00:42 +01:00
John Beard 454585d3d2 GAL: add some trace to GAL display options config
This can be helpful when tracing where certain configurations
come from (some apps load from other apps' config basenames).

(cherry picked from commit fcc4a84e0e)
2019-04-27 14:58:50 +01:00
John Beard 65a6e341ad Eeschema: Symbol preview widget needs common config for Hi-DPI
Currently, this widget doesn't read the common library settings.
This means it doesn't use the configured DPI scaling or anti-aliasing
settings.

Use the ReadConfig method on the GAL options to fix (rather than
only ReadAppConfig).

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

(cherry picked from commit 33fe9a2761)
2019-04-27 14:58:50 +01:00
John Beard fc933034db Eeschema: fix resizing of pin table and edit symbol dialog
These dialogs had logic to avoid a table re-adjustment unless
the width changed. This was done to avoid spurious resizing
calls under GTK+3. This was commit
13249b723b, fixing bug lp:1817810.

However, by only calling event.Skip() when the width changed,
redraws were inhibited when only the height changed.

Placing the Skip() outside the width-change check fixes this,
and does not re-introduce the lp:1817810 bug (it is the column
adjust call that causes that).

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

(cherry picked from commit eccadd92fb)
2019-04-27 14:12:00 +01:00
Jeff Young 6e8979d8d8 Add try/catch block around writing a new library.
Fixes: lp:1825203
* https://bugs.launchpad.net/kicad/+bug/1825203

(cherry picked from commit 2bcf38d2b6)
2019-04-18 22:02:24 +01:00
Jon Evans d18b12c1a3 Hide simulator settings tabs that aren't implemented yet
Calling Hide() is apparently not enough in Windows

(cherry picked from commit 895d4c9e1a)
2019-04-15 23:21:31 -04:00
Seth Hillbrand c4be74a9d0 eeschema: Prevent invalid '0' element in components
In the component, an m_unit/m_convert element is 1-indexed as opposed to
the library where they are 0-indexed.  The 0-index in the library is
reserved for those elements that are shared across all conversion/unit
whereas it is invalid for the component.

Fixes: lp:1824764
* https://bugs.launchpad.net/kicad/+bug/1824764
2019-04-15 12:32:29 -07:00
Jon Evans 593a5181d7 Fix rotation of global and hierarchical labels
Fixes: lp:1824432
* https://bugs.launchpad.net/kicad/+bug/1824432
2019-04-13 17:02:33 -04:00
Jon Evans c29274e760 Fix ngspice nested DC sweep command
Fixes: lp:1824336
* https://bugs.launchpad.net/kicad/+bug/1824336
2019-04-13 16:38:31 -04:00
Jon Evans 216573bf48 Fix ngspice netlisting when net names contain '/'
Fixes: lp:1821502
* https://bugs.launchpad.net/kicad/+bug/1821502
2019-04-13 15:35:00 -04:00
Jon Evans 1c235a5c89 Properly initialize sheets when loading them from ERC dialog
When displaying a sheet from this path, it's possible the sheet will
not have been initialized yet.  Call DisplayCurrentSheet() to make sure
it is initialized, and then call RedrawScreen to update the zoom level.

Fixes: lp:1824362
* https://bugs.launchpad.net/kicad/+bug/1824362
2019-04-13 12:25:06 -04:00
John Beard 2d43fcf9ee GAL opts: move config reading into GAL_DISPLAY_OPTIONS
Move repeated GAL config reading routines into GAL_DISPLAY_OPTIONS.
THe app-level config is in here already, do the same for the
common config.

This means that the configs are loaded consistently, which fixes
the symbol-chooser preview window, which previously didn't use the
same config routine as other GAL canvases.

Future work could move these functions to free functions that
act on the public interface of GAL_DISPLAY_OPTIONS to avoid
GAL_DISPLAY_OPTIONS having to know about wxConfig and wxWindow.

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

(cherry picked from commit ab2281d26f)
2019-04-12 16:48:50 +01:00
Jeff Young cb5948d3a5 When checking for duplicate aliases look in the dialog not the symbol.
Fixes: lp:1821543
* https://bugs.launchpad.net/kicad/+bug/1821543

(cherry picked from commit e90452d0e2)
2019-04-10 21:23:14 +01:00
Jeff Young 15cb032ab7 Readjust Edit Symbol Properties when symbol references changes.
The new reference may contain different numbers of units and/or
different deMorgan conversion settings.

Fixes: lp:1822316
* https://bugs.launchpad.net/kicad/+bug/1822316
2019-04-09 17:02:29 +01:00
Wayne Stambaugh bc821ff47d Eeschema: fix schematic text object plotting issue.
Save and restore text thickness in SCH_TEXT::Plot() function to prevent
the plotting default thickness value from stepping on the original text
thickness and causing all of the text objects to magically change to bold.

Fixes lp:1823165

https://bugs.launchpad.net/kicad/+bug/1823165
(cherry picked from commit 3d33cba574)
2019-04-09 10:18:08 -04:00
Jeff Young 42d9f42807 Allow no-connects to be dragged.
Fixes: lp:1821342
* https://bugs.launchpad.net/kicad/+bug/1821342

(cherry picked from commit c78c3c8198)
2019-04-09 11:20:03 +01:00
Wayne Stambaugh a533514763 Minor symbol library rescue dialog fixes.
Adjust the sizer proportions slightly to eliminate the reported bug.
This may not be the ideal way to do this and there could be some issues
on other platforms but it does resolve the issue on gtk3.

Fixes lp:1820084

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

(cherry picked from commit 615c49315f)
2019-04-06 08:19:06 -04:00
Wayne Stambaugh e07ef3be9c Minor schematic formatter fix.
Apparently at some point in KiCad's development, a '~' character was
prefixed to the symbol name to indicate that it was not visible.  The
visibility state is now saved in the name field so remove the prefix.
The parser was kept unchanged.

Fixes lp:1632048

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

(cherry picked from commit ee14da3093)
2019-04-04 10:50:23 -04:00
Jeff Young 3899ec136b Use a bigger hammer when refreshing fields in table.
Fixes: lp:1823050
* https://bugs.launchpad.net/kicad/+bug/1823050
2019-04-04 12:27:29 +01:00
John Beard 3a5e01c44a QA: Enable eeschema tests
Redesignate the eagle test as eeschema tests and build
more like the other unit tests.

Enable as a test in Ctest now that the test executes without
crashing.

The loading of the file with the hardocded part is still
not enabled, as this needs more infrastructure to support it.

(cherry picked from commit 4eb30f6b85)
2019-04-02 19:08:26 +01:00
John Beard d4883da98b Eeschema: construct simulator cursors on demand
Statically constructing wxCursors as used for the probe
and tune cursors crashes the qa_eagle_plugin test
instantly.

Fix this by introducing a new class CURSOR_STORE,
which allows to abstract the platform wierdness of wxCursors
and allow the simulator to laziliy init its own cursors
at runtime.

This code isn't properly tested, as these cursors are never
actually used. However, it does allow the eeschema unit test
to run.

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

(cherry picked from commit 6f1c3f5ef8)
2019-04-02 19:08:26 +01:00
Michael Kavanagh 7cc3e9a16d Add Ctrl+, hotkey to preferences dialog
Also change interactive router settings from Ctrl+, to Ctrl+Shift+,

(cherry picked from commit b0674b8802)
2019-04-02 13:17:37 -04:00
Michael Kavanagh 9ad352d4bd Fix 'hokey' -> 'hotkey' typo
(cherry picked from commit fe6bc411dd)
2019-04-02 13:17:18 -04:00
Jeff Young b57e9492b1 Disable alias controls when no alias is selected.
Fixes: lp:1821698
* https://bugs.launchpad.net/kicad/+bug/1821698
2019-04-01 13:47:31 +01:00
Jeff Young 95858b77c1 Ignore BRIGHTENED state when printing.
Fixes: lp:1788480
* https://bugs.launchpad.net/kicad/+bug/1788480
2019-04-01 13:46:46 +01:00
Jeff Young 4afbce5ad6 Fixes for importing board setup properties.
Save/restore default netclass.
Read layers back in with correct syntax ('.' between keyword and layer name).
Write layers to project file.
Read/write layer enablement bits.
Don't set solder paste margin min to 0 (most of them are negative).

Fixes: lp:1811990
* https://bugs.launchpad.net/kicad/+bug/1811990
2019-04-01 13:46:33 +01:00
jean-pierre charras 77993ced7e Symbol editor, DIALOG_LIB_EDIT_PIN_TABLE: fix crash when trying to delete a pin when the table is empty.
Fixes: lp:1822406
https://bugs.launchpad.net/kicad/+bug/1822406
2019-03-30 09:32:32 +01:00
Wayne Stambaugh f1a70662c5 Eeschema: do not merge graphical lines with different attributes.
Fixes lp:1821728

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

(cherry picked from commit 2447933b54)
2019-03-28 13:47:58 -04:00
jean-pierre charras b154c9a5c4 Eeschema: Force time stamp to 32 bits unsigned values, and make it
tolerant to files using 64 bits values. define timestamp_t as uint32_t.

This fix is adapted from master, commit 175a2bc0b (bug fix lp:1821476)
2019-03-27 13:17:54 +01:00
jean-pierre charras 12255e3680 Eeschema: fix incorrect handling of Escape key. Key events do not have to be skipped after they are handled. 2019-03-27 13:17:54 +01:00
John Beard 473c41ddbf Eeschema: internal tidying of field editor ApplyData
Make a few things const (specficially the reference into
m_fieldStore - we should commit to not modifying that in this
function.

Also avoid a couple of needless string copies.

Also explicitly dereference the into a (non-const) reference at the outset.
For the whole if this function, comp is the same object and may not
be null (as it is used unchecked).

(cherry picked from commit edd94ce2d6)
2019-03-27 10:29:36 +00:00
Baranovskiy Konstantin b93382831c Eeschema: place new field near parent component
For now fields created in Fields Editor are placed at
position (0, 0).
Every new field must be placed at the origin of
the parent component.

(cherry picked from commit 11f03c8551)
2019-03-27 10:29:36 +00:00
Brian Henning 4e8f191f43 Added an include to tell the compiler where to find wxIsdigit 2019-03-24 15:38:59 +01:00
Jon Evans 5f9fa05e21 Fix loading of components with convert parameter set to zero
(cherry picked from commit ab74445df4)
2019-03-23 18:58:17 -04:00
Wayne Stambaugh ee92fa51bc Symbol editor: improve tooltip in symbol properties dialog.
Make the "Define as power symbol" checkbox tooltip more descriptive so
the user has a better understanding of enabling this option.

Fixes lp:1804932

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

(cherry picked from commit a7c8df5666)
2019-03-20 15:58:11 -04:00
Seth Hillbrand 168fa09f5f Unify and correct Autosave functions
Autosave was not working correctly, partly due to different
implementations in eeschema and pcbnew and partly due to a mistaken
refactor at some point during v5 development.  This unifies the expected
autosave prefix to _autosave- for both pcbnew and eeschema.  It also
unifies the expected suffix for the backup files to -bak.

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

(cherry picked from commit 078320e2fb)
2019-03-18 10:27:09 -07:00
Seth Hillbrand 4facd57cb7 libedit: Don't move the field below the last item
There needs to be at least one item below the one we want to move down
in order to allow the action.

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

(cherry picked from commit 0943c176a3)
2019-03-18 10:27:09 -07:00
Wayne Stambaugh e999636048 Symbol editor: fix superfluous dialog display.
Call base object TransferDataFromWindow() to prevent Validate() from
being called twice.  Validation is handled completely under the hood
so there is no need to call Validate() directly.

Fixes lp:1820301

https://bugs.launchpad.net/kicad/+bug/1820301
2019-03-18 11:46:03 -04:00
jean-pierre charras af0cb68c1b Eeschema: do not draw dangling symbol (circle) for PIN_NC pin types. These pins are never connected, so a dangling symbol makes no sense.
Fix also a fex minor coding style issues.
2019-03-17 20:52:42 +01:00
jean-pierre charras c537e8a892 Eeschema: shows the opened sheet info in title bar.
Fixes: lp:1819564
https://bugs.launchpad.net/kicad/+bug/1819564
2019-03-17 08:52:00 +01:00
Wayne Stambaugh f7b4a20066 Replace isdigit() with wxIsdigit() when testing wxString characters.
This is a continuation of commit 8a03025a.  All known instances of
using isdigit() to test a character in a wxString have been replaced
by wxIsdigit().
2019-03-15 15:54:49 -04:00