Commit Graph

4290 Commits

Author SHA1 Message Date
Wayne Stambaugh 49cc47afd1 Eeschema: fix broken new sheet path comparison on windows.
Using wxFileName::GetPath( wxPATH_WITH_SEPARATOR ) does not include the
drive specifier (A:, B:, C:, etc.) on windows which fails the comparison
with the project path 100% of the time.  wxFileName::GetPathWithSep()
solves the issue nicely.

Fixes https://gitlab.com/kicad/code/kicad/issues/5077

(cherry picked from commit 03423f13a1)
2020-09-03 14:26:31 -04:00
Wayne Stambaugh 673677c831 Eeschema: fix segfault when auto save file is detected.
Fixes https://gitlab.com/kicad/code/kicad/issues/5068
2020-09-01 10:29:06 -04:00
Seth Hillbrand 8d9bb7a63e libedit: Unselect before re-syncing
The library alias may change so we need to ensure that the underlying
selected lib_id is not maintained across regenerations.

Fixes https://gitlab.com/kicad/code/kicad/issues/5144
2020-08-26 10:10:43 -07:00
Ian McInerney 1b2d4d6522 Entries typed into the text size field should be read as mils
Previously, they were being interpreted as inches, and then being
displayed as mils - leading to a multiplication by 1000 if there
was no unit string included.

Fixes https://gitlab.com/kicad/code/kicad/issues/5117

(Cherry-picked from 259cacf648)
2020-08-11 00:52:05 +01:00
Jeff Young 00547b7aac Fix compile errors on CLang. 2020-08-10 20:06:06 +01:00
Ian McInerney b23db7c4cb Fixup the UI for the symbol preview widget
This is the proper fix for the symbole preview widget. It will ensure
there are no size changes between the two panels (preview and status),
and also ensure that the status panel has the same background color as
the preview panel.

Fixes https://gitlab.com/kicad/code/kicad/issues/4997
2020-08-10 00:52:48 +01:00
Ian McInerney b3525bc642 Hide the scrollbars on the symbol preview canvas
This canvas supports mouse interaction, and navigating using the
scrollbars is very difficult (it causes large jumps). Also, having
the scrollbars causes the background to bleed through around them,
making them appear floating in the canvas.

Fixes https://gitlab.com/kicad/code/kicad/issues/4997
2020-08-09 23:13:03 +01:00
jean-pierre charras 74adbbcc5d Ensure values with units are displayed correctly when numbers are very small.
from master branch.
see https://gitlab.com/kicad/code/kicad/issues/5074
2020-08-09 09:48:10 +02:00
Ian McInerney bab61dd249 Initialize clear annotation variable to false so they aren't cleared by accident
When it was uninitialized, cancelling the dialog could lead to the
sheet's annotations being cleared because the variable wasn't set
to false anywhere.
2020-08-08 23:24:36 +01:00
Wayne Stambaugh 5ef9db6d67 Eeschema: fix large diffs when saving schematics.
Apparently the < operator was never implemented for SCH_JUNCTION objects
so they were not get sorted which was causing the large diffs between
schematic saves.

Fixes https://gitlab.com/kicad/code/kicad/issues/4370

(cherry picked from commit 35f3eb6220)
2020-08-06 09:27:14 -04:00
Tormod Volden 1797a9c61a bom2grouped_csv.xsl: Fix sorting of grouped references
Commit a96ebe8f seems to have missed a dollar sign.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/940
hopefully for good this time.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>

(Cherry-picked from e82e30d215)
2020-08-06 10:14:26 +01:00
Frank Severinsen fd49bc5d8d Check reference designator type when comparing comp
example: prevents a 10K NTC resistor from getting grouped with a 10K SMD resistor

(Cherry-picked from 9ca61b50b6)
2020-08-06 10:12:57 +01:00
Ian McInerney 5bca5e2d77 eeschema: Only warn user about off-grid pins if the position has changed
(Cherry-picked from f7156a9d49)

Fixes https://gitlab.com/kicad/code/kicad/issues/4673
2020-07-03 03:02:03 +01:00
Seth Hillbrand 24aad2eed4 Fix order-of-ops issue in sim plot
(cherry picked from commit 67bd49b4a8)
2020-06-27 20:00:17 -07:00
jean-pierre charras 567ce48cc1 panel lib tables: avoid crash when deleting the last entry in list.
From master branch
2020-06-14 17:51:27 +02:00
jean-pierre charras e099a82d15 eeschema: do not propagate text field change to other units for not annotated symbols
Fixes #4602
https://gitlab.com/kicad/code/kicad/issues/4602
2020-06-03 08:52:48 +02:00
Jeff Young b681af4556 Check for duplicate field names.
Fixes https://gitlab.com/kicad/code/kicad/issues/4219

(cherry picked from commit 5d493abea7)
2020-06-02 22:57:29 +01:00
jean-pierre charras 2395c6fdaa toolbars_lib_view.cpp and toolbars_libedit.cpp: do not
recreate comboboxes when clearing toolbars. Clearing toolbars delete only
tools, not other widgets. recreating comboboxes creates strange cosmetic issues.

From master, commit 598ed8b39.
2020-05-30 15:57:18 +02:00
Jeff Young 52139cf0c4 Don't resync the screen before we've changed it back.
Fixes: lp:4382
* https://bugs.launchpad.net/kicad/+bug/4382
2020-05-12 22:58:15 +01:00
Jeff Young aec3649524 Add FocusOnLocation for second items in ERC markers.
Fixes: lp:4237
* https://bugs.launchpad.net/kicad/+bug/4237
2020-05-12 22:58:15 +01:00
Wayne Stambaugh f61c692929 Eeschema: fix partial schematic load bug in the legacy plugin.
Move the hierarchical sheet loading outside of the try exception block
so that any sheets that were loaded when a schematic file load fails
are loaded rather than skipped.  This allows more of the schematic to
be loaded when any parser errors occur.

(cherry picked from commit 1a8082c6d6)
2020-05-11 16:45:11 -04:00
Wayne Stambaugh 3f717f3baf Eeschema: fix sheet bug in schematic editor drawing tool.
SCH_SHEET objects can only have another SCH_SHEET object as a parent
or nullptr for the root sheet so overload EDA_ITEM::SetParent() to
prevent the parent from being set to another type of object and add
some checks to the root sheet code just in case someone gets clever
and attempts to bypass the overloaded SetParent() call.

(cherry picked from commit fa57c8a570)
2020-05-11 16:33:40 -04:00
jean-pierre charras d871a92d1c library viewers: fix a focus issue that prevent using arrow keys in lib or fp lists.
Once the gal canvas hsad the focus, it was not possible to use arrow keys in library
or symbols or fp lists even after clicking on an item.

This focus issue is now fixed.

From the fix in Master
2020-05-03 20:23:41 +02:00
Wayne Stambaugh a2d7881afe Fix cherry pick error on previous commit. 2020-04-02 16:09:25 -04:00
Wayne Stambaugh d79e598bf8 Eeschema: fix symbol cache library look up bug.
Use an underscore character instead of a semicolon between the library
ID library nickname and symbol name in library ID search strings when
looking up symbols in the cache library since that is how they are saved
when creating the cache library.  This fixes rescuing missing symbols
from the cache when they have been removed from the original library and
preventing a broken symbol link indicator from being shown when a symbol
is removed from the library.

Add some defensive testing to make sure the library passed to function
SchGetLibPart() is actually the cache library.

(cherry picked from commit f6d7ef367d)
2020-04-02 16:04:59 -04:00
Wayne Stambaugh 5d0883c0e4 Eeschema: fix rescue multiple unit symbol bug.
The code that checked for pin conflicts to determine if a symbol needed
rescued did not check either the pin convert setting so it was possible
for a pin from the other convert on symbols that do not have identical
units to appear to not have a pin conflict.  Add tests for pin unit and
convert setting to prevent that from breaking the comparison.  This must
have always been broken.

Fix the symbol preview widget to prevent drawing all symbols on top of
each other (if we need to do this the code will have to be revised) and
also show the convert if valid.

Fix broken symbol cache library when saving alias symbols.

Fixes https://gitlab.com/kicad/code/kicad/issues/3879

(cherry picked from commit e91f1f57dd)
2020-04-02 09:31:25 -04:00
Jeff Young e9b059ee94 Re-implement change from cbef95256b
Fixes: lp:4103
* https://bugs.launchpad.net/kicad/+bug/4103
2020-03-30 20:24:08 +01:00
Ian McInerney 6b2a8f54a1 Check for file writability before saving part
This is a 5.1 only fix for this crash. Fixing in master requires
a major refactor of the library writability detection code.

Fixes https://gitlab.com/kicad/code/kicad/issues/3864
2020-03-25 13:23:49 +00:00
Seth Hillbrand 5d9bda6f97 Partial revert of 134a7ba85
The margin fix prevented some schematics from printing.  Reverting in
favor of transitioning to the Cairo print base in eeschema

(cherry picked from commit 9de7547c25)
2020-03-13 11:54:09 -07:00
jean-pierre charras ddedf2e046 Annotate dialog: fix incorrect list of changes in complex hierarchies
Previously, to list changes, the Reference field was used in comparisons.
In complex hierarchies, this is incorrect: the Reference field contains
only the last displayed reference, not the reference of a given sheet.

The comparison uses now the sheet paths for ref and unit selection.

From a similar fix in master branch.
2020-03-09 18:28:39 +01:00
Seth Hillbrand 1ffcedd9d4 libedit: Fix speed of lib check
The symbol check output the HTML message for each item.  This is _very_
slow and can lock the system reponsiveness.  Changing to a queue/flush
method is much faster

cherry-picked from 245b778454
2020-02-28 08:50:05 -08:00
Ian McInerney e6a3e7024d Also verify that the .dcm is writable when saving library
Fixes https://gitlab.com/kicad/code/kicad/issues/3946

(cherry-picked from b2cc454878)
2020-02-26 19:38:30 +00:00
jean-pierre charras c7230a6f77 eeschema: fixes related to translated and not translated field names.
When searching for fields, the code was sometimes comparing
translated and not translated names. This is an issue for mandatory fields,
in non English languages.

From master branch.
2020-02-17 12:26:51 +01:00
Seth Hillbrand 25aa233cef eeschema: Temporary fix for GTK printing offset
The full fix will be Cairo printing in v6

Fixes https://gitlab.com/kicad/code/kicad/issues/1907

(cherry picked from commit 134a7ba85d)
2020-02-10 09:07:21 -08:00
Jeff Young 8bf8a649c8 Adjust justified text for mirroring and rotation.
Fixes https://gitlab.com/kicad/code/kicad/issues/3737

(cherry picked from commit 2507f985ad)
2020-02-05 22:20:16 +00:00
Ian McInerney 7ba8d8b608 Revert eeschema highlighting changes
This reverts commit 366d4d7b0b.
This reverts commit 8b3c0a941c.

Fixes https://gitlab.com/kicad/code/kicad/issues/3866
2020-02-05 11:51:46 +00:00
Ian McInerney 366d4d7b0b eeschema: Ignore the highlight flag when responding to dbl click
Fixes https://gitlab.com/kicad/code/kicad/issues/3855
2020-02-03 21:41:03 +00:00
Karl Zeilhofer 5b58dbc980 Fixes dangling ends and rotation when labels/texts are converted into each other
CHANGED: Eeschema: Preserve text justification when switching text types

Closes https://gitlab.com/kicad/code/kicad/-/merge_requests/86
2020-02-01 16:08:34 +00:00
easyw 8b3c0a941c Highlight eeschema symbol on left click
CHANGED: Highlight eeschema symbol on left click

Closes https://gitlab.com/kicad/code/kicad/-/merge_requests/83
2020-02-01 16:08:19 +00:00
Seth Hillbrand 3ce29a3d7e Eeschema: Add bit that was missing from commit 7ac83ac64
This part of the check removes recursive sheets from the schematic when
loading and notifies the user that their schematic has been repaired.

(cherry picked from commit 128ec782dd)
2020-01-27 09:43:07 -08:00
Seth Hillbrand dc3c6b2f39 Check recursion before appending
We need to ensure that the appended sheet does not already exist in the
parent hierarchy.  We do this for new sheets but need to check for
existing ones as well.

Fixes #3806 | https://gitlab.com/kicad/code/kicad/issues/3806

(cherry picked from commit 7ac83ac64d)
2020-01-27 06:31:16 -08:00
Seth Hillbrand ac39e32bc9 Recognize subckt blocks in spice
Spice lines defining circuit elements are contained in a .subckt ..
.ends block.  The intervening lines should be exported to the netlist as
well as the control lines.

(cherry picked from commit d9eaff1c99)
2020-01-17 18:58:27 -08:00
Ian McInerney fcb6f814de Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275

(Cherry-picked from 25a302758e)
2020-01-18 01:44:01 +00:00
Ian McInerney df664bd55f Don't tie generic validators to a specific field
(Partial cherry-pick of 15cd13ba6e)

Fixes #3667
2020-01-15 16:12:39 +00:00
Wayne Stambaugh 7f1c7d808d 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.

(cherry picked from commit b66ecf141f)
2019-12-27 12:08:13 -05:00
Wayne Stambaugh be12aece5b 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.

(cherry picked from commit 773f45aae3)
2019-12-27 12:07:15 -05:00
Wayne Stambaugh d7605f1449 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
(cherry picked from commit d4cea0f2b7)
2019-12-27 12:05:59 -05:00
Ian McInerney 79954657e2 eeschema: Fix return ID check in annotate dialog
Fixes https://gitlab.com/kicad/code/kicad/issues/3708

(cherry-picked from e6e2cf47fd)
2019-12-25 23:18:31 +00:00
Seth Hillbrand 65008c5c0b Eeschema: Check twice before using GAL
The windows display may through an error which we need to catch when
starting GAL under windows.  This is a reimplementation of
e39586e15 which cannot be cherry-picked into v5

Fixes #2620 | https://gitlab.com/kicad/code/kicad/issues/2620
2019-12-10 16:01:59 -08:00
Jeff Young c69080f11e Fix some issues with the previous commit. 2019-12-02 23:33:45 +00:00