Commit Graph

200 Commits

Author SHA1 Message Date
Wayne Stambaugh 450dac4b1e Revert "Revert "Eeschema: remove rogue symbol libraries from project file.""
This reverts commit 0893e0043f.
2019-08-04 13:05:47 -04:00
Wayne Stambaugh 278127fe29 Revert "Revert "Eeschema: fix edit sheet bug.""
This reverts commit 2d48c81d58.
2019-08-04 13:05:35 -04:00
Wayne Stambaugh 23d71de75f Revert "Revert "Eeschema: fix many append schematic bugs.""
This reverts commit 238fb00727.
2019-08-04 13:05:09 -04:00
Wayne Stambaugh 238fb00727 Revert "Eeschema: fix many append schematic bugs."
This reverts commit 3518153d5b.
2019-08-04 12:34:25 -04:00
Wayne Stambaugh 2d48c81d58 Revert "Eeschema: fix edit sheet bug."
This reverts commit 6051dfae30.
2019-08-04 12:33:55 -04:00
Wayne Stambaugh 0893e0043f Revert "Eeschema: remove rogue symbol libraries from project file."
This reverts commit 5d60fe6812.
2019-08-04 12:33:19 -04:00
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 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
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
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 44cb979e91 Decouple SCH_EDIT_FRAME from symbol rescue and remap dialogs.
Do not keep pointer to SCH_EDIT_FRAME in the rescuer object to prevent
it from creating dialogs with itself as the parent when call from the
rescue dialog which is itself a grandchild of the frame window.
2019-02-05 12:43:46 -05:00
Seth Hillbrand 88d9f946a2 eeschema: Don't break Eagle junctions on import
Eagle can label nets independently of the connection point position.  In
an "interestingly" designed circuit, this can lead to a junction of a
pin, wire endpoint and unrelated wire.  While this is bad practice,
KiCad shouldn't force an incorrect net connection during the import.  In
this case, we skip the addition of junctions to ensure that we don't
create a schematic error.

Fixes: lp:1788019
* https://bugs.launchpad.net/kicad/+bug/1788019
2019-01-30 17:02:24 -08:00
Maciej Suminski 7e1498a46f Set the screen pointer to null before deleting the associated items
VIEW needs to be cleared before deleting the stored items. Otherwise it
may dereference stale pointers leading to a crash.
2018-12-11 16:21:43 +01:00
Wayne Stambaugh 07ebc4df14 Fix schematic append clear annotation bug.
Clear the annotation of only the appended schematic and any sheets in it's
hierarchy.  Do not clear the annotation of the symbols in the target sheet.

Fixes lp:1805695

https://bugs.launchpad.net/kicad/+bug/1805695
2018-12-05 17:12:11 -05:00
Jeff Young 984d3f04ab Update dangling ends after importing schematic content.
Fixes: lp:1803996
* https://bugs.launchpad.net/kicad/+bug/1803996
2018-11-19 20:47:31 +00:00
Maciej Suminski 8091573bf7 Fix disappearing schematic components
SCH_COMPONENTs should be added to VIEW only when symbol links are
resolved. Otherwise a dummy component bounding box will be used when
inserting a component to VIEW R-tree.

Fixes: lp:1801800
* https://bugs.launchpad.net/kicad/+bug/1801800
2018-11-06 11:25:47 +01:00
jean-pierre charras d953724365 Eeschema: fix bug: append schematic does not update canvas
Fixes: lp:1800144
https://bugs.launchpad.net/kicad/+bug/1800144
2018-10-26 16:42:14 +02:00
Wayne Stambaugh b9a9fe6c9e Eeschema, remove option to import schematic that has not been remapped.
When importing an existing schematic into a sheet that was no remapped
to use the symbol library table, the user was given the option to ignore
the warning and proceed with the import.  This would end up with all of
the imported symbol links being broke.  In hindsight, this was a bad
idea so now the user cannot import schematics that have been remapped.

Fixes lp:1791280

https://bugs.launchpad.net/kicad/+bug/1791280
2018-10-24 15:38:02 -04:00
Jeff Young 8a54b1b3b7 Add view refresh calls for edit operations.
Note that the bug referenced in the "fixes" section is only one
of many addressed by this commit.

Fixes: lp:1798449
* https://bugs.launchpad.net/kicad/+bug/1798449
2018-10-18 12:12:48 +01:00
Jeff Young 2d5baac77d Fix up zoom and pan issues entering/leaving sheets. 2018-10-09 11:08:56 +01:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Wayne Stambaugh 3c86bc951a Eeschema: fix yet another lock file issues.
Reset lock file when saving a schematic sheet to a different file name.
This prevents a file is already open error from being displayed when
opening the original file.

Fixes lp:1788507

https://bugs.launchpad.net/kicad/+bug/1788507
2018-09-24 08:59:03 -04:00
Jeff Young e45afdb912 Revert absolute-path asserts and fix off-by-one bug.
Fixes: lp:1767582
* https://bugs.launchpad.net/kicad/+bug/1767582
2018-09-15 22:36:09 +01:00
Jeff Young 872e1e6532 Remove asserts for absolute paths.
You can, for instance, specify relative paths via the command
line.

Fixes: lp:1767582
* https://bugs.launchpad.net/kicad/+bug/1767582
2018-09-15 20:06:42 +01:00
Jeff Young 4b1a31ffad Regularize save-changes dialogs. 2018-08-12 00:02:37 +01:00
Jeff Young d8d4f75fa1 Fix button order and genralize Exit dialog so it can be shared more.
This also fixes a bunch of bugs where an error during save would
still close the window (rather than cancelling the close action).

Fixes: lp:1785034
* https://bugs.launchpad.net/kicad/+bug/1785034
2018-08-02 11:01:03 +01:00
Jeff Young cb61525394 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
2018-07-26 15:43:53 +01:00
Jeff Young aa7da5dfcd Treat ${...} and $(...) envvar references uniformly.
Fixes: lp:1769282
* https://bugs.launchpad.net/kicad/+bug/1769282
2018-05-05 23:40:40 +01:00
Jeff Young 21ceb786ac Clear annotations *after* rebuilding symbol links.
We need to symbol links to determine whether or not units are
locked (ie: non-interchangeable).

Fixes: lp:1767744
* https://bugs.launchpad.net/kicad/+bug/1767744
2018-04-29 15:09:28 +01:00
Maciej Suminski 554cb54a4f Eagle SCH import: save project file after the full path is set
Fixes: lp:1765297
* https://bugs.launchpad.net/kicad/+bug/1765297
2018-04-20 10:04:41 +02:00
Wayne Stambaugh 81843c37a4 Organize trace debugging code for ease of maintenance. 2018-04-13 09:59:01 -04:00
Maciej Suminski 58c27398cb Eagle SCH import: improved implicit connections resolution
Nets assigned by power pins are weak, meaning they are valid
as long as there is nothing else attached to such pins. This patch
checks whether there are other wires or pins attached to a power pin
before placing a global net label.

Fixes: lp:1755191
* https://bugs.launchpad.net/kicad/+bug/1755191
2018-04-12 18:12:22 +02:00
Wayne Stambaugh 696ff81dc7 Load correct schematic page layout description file in stand alone mode.
Fixes lp:1678849

https://bugs.launchpad.net/kicad/+bug/1678849
2018-04-04 10:18:12 -04:00
Maciej Suminski 2af51ef20f Eagle import: do not call TrimWire() on imported schematics
It turns out that TrimWire() may remove legit Eagle wires and effectively
change the netlist.
2018-03-04 18:04:19 +01:00
Maciej Suminski 260f680c6c Eagle import: fix memory leak on schematic sheets import 2018-03-04 16:47:26 +01:00
Maciej Suminski 8e8d95dd7f Eagle import: process all sheets when adding junctions; fix footprint LIB_IDs 2018-03-04 16:45:42 +01:00
Maciej Suminski 77346d81ce Eagle import plugin: add junction dots to fix connectivity 2018-03-04 16:45:42 +01:00
Maciej Suminski 1f078f533b Refactor Eagle project import to use Kiway::ExpressMail() 2018-03-04 16:45:42 +01:00
Wayne Stambaugh aeae32b1a2 Fix file naming bug when importing Eagle projects with . in file name.
Fixes lp:1747470

https://bugs.launchpad.net/kicad/+bug/1747470
2018-03-03 08:35:53 -05:00
Jeff Young 4dda8a39fe Add inc/dec current layer alpha to menus.
Also adds indicators in layers palette for feedback.
Also generates sized images for all indicators instead of using
scaled bitmaps (which didn't look great).
Also fixes a completely unrelated typo in a UI string.
2018-02-22 17:48:14 +01:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
Camille f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Wayne Stambaugh bf44d394c3 Eeschema: fix remapping bug on windows builds.
The Windows drive specifier C: was being interpreted as a valid URL by
wxURI which was performing a URL comparison instead of a file comparison
which always failed in LIB_TABLE_BASE::FindRowByURI().  Change test for
URI to search string for "://" to determine if the comparison should be
a URI (string) comparison or a file (wxFileName) comparison.

Don't run final rescue unless the user performs the remapping.
2018-01-03 08:37:54 -05:00
Seth Hillbrand f4f0c09fe4 Eeschema: Clear drawing state when loading project
Prevents stray flags from entering schematic editing process

Fixes: lp:1738894
* https://bugs.launchpad.net/kicad/+bug/1738894
2017-12-19 11:49:25 -05:00
Maciej Suminski 124c82f1cf Eagle Schematic Import: fixed imported libraries location
Standalone eeschema did not have the project path set when importing
a non-KiCad sheet. Due to this any libraries created during the import
were saved to the directory of eeschema executable instead of the actual
schematic directory.
2017-12-17 18:45:40 +01:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
jean-pierre charras bfc3804115 Minor fixes related to timestamp_t. Move timestamp_t definition to base_struct.h 2017-12-07 13:33:59 +01:00
Henner Zeller 3f57fa5d24 Change time_t in the functions that deal with timestamps to a new typedef timestamp_t (defined as a long).
that makes sure the c++ side and swigged Python side agree on the type, because time_t create problems in Python scripts.
2017-12-07 13:16:33 +01:00