Commit Graph

4032 Commits

Author SHA1 Message Date
Maciej Suminski a9efbf4716 Fixed memory leaks 2018-12-11 16:21:43 +01: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
Jeff Young 40dac0ecbb Default sizes for edit frames in case prefs get deleted.
Fixes: lp:1807676
* https://bugs.launchpad.net/kicad/+bug/1807676
2018-12-10 12:23:16 +00:00
jean-pierre charras e50d9df76a Eeschema: fix incorrect parsing of line color (r v b values).
Only the R and V were read, the parsing was stopping before reading the B value.
2018-12-09 17:59:24 +01:00
Seth Hillbrand fd537c8230 eeschema: Do not clear highlights with NULL screen
When closing a project, the screen is released, so we need to avoid
cross-probe calls dereferencing the screen pointer.

Fixes: lp:1807501
* https://bugs.launchpad.net/kicad/+bug/1807501
2018-12-08 07:54:31 -08:00
jean-pierre charras a40cff18d3 PANEL_EESCHEMA_SETTINGS_BASE: very minor cosmetic enhancement. 2018-12-07 11:30:52 +01:00
jean-pierre charras f1c1c5db3f Fix a minor compil warning 2018-12-07 11:22:03 +01:00
Maciej Suminski 766156ed87 Fix for dark mode on macOS Mojave
Thanks to Scott Rapson and Justace Clutter for the solution.

Fixes: lp:1797989
* https://bugs.launchpad.net/kicad/+bug/1797989
2018-12-07 09:03:56 +01:00
Jeff Young 3a0dbf48c8 Read Symbol Browser grid settings from Symbol Editor. 2018-12-07 00:26:10 +00:00
Seth Hillbrand ed506dd05e eeschema: Prevent excess link updates
Refreshing the symbols for each paint is excessive to catch the change
from library loads.  Instead we catch them on the KIWAY MAIL update
2018-12-06 13:46:52 -08:00
Wayne Stambaugh b8de4e73bf Eeschema: fix schematic symbol parsing bug.
Schematic symbol library link names are unquoted strings that can
contain non-ascii characters which breaks the parser.  Converting
the line to uft-8 before breaking the string into tokens resolves
the issue.
2018-12-06 12:44:13 -05:00
Wayne Stambaugh 742961119d Eeschema: fix library symbol pin definition parsing bug.
Pin names are unquoted strings that can contain non-ascii characters
which breaks the parser.  Converting the line to uft-8 before breaking
the string into tokens resolves the issue.
2018-12-06 11:47:20 -05:00
D4p0up e94752a6cf Added help string to select buttons.
Also moved highlight text string to help_common_strings.h

Fixes: lp:1497737
* https://bugs.launchpad.net/kicad/+bug/1497737
2018-12-05 20:13:03 -08: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
Wayne Stambaugh a61a51f26e Eeschema: fix UTF8 character handling bug in legacy parser.
Iterating over unquoted strings as ASCII8 fails when ' ' character is
not the LSB of a UTF8 string with wide characters.  Change parsing method
for unquoted strings to convert the entire line as UTF8 and then use
wxStringTokenizer to break the line into tokens at the ' ' characters.

Fixes lp:1806206

https://bugs.launchpad.net/kicad/+bug/1806206
2018-12-05 13:54:51 -05:00
jean-pierre charras 58036382c1 eeschema: Fix slow redraw on net highlighting (by redrawing only modified items)
Fixes: lp:1806197
https://bugs.launchpad.net/kicad/+bug/1806197
2018-12-04 20:55:59 +01:00
Maciej Suminski ca5751fc46 Symbol Editor: update the view after relocating the anchor 2018-12-04 09:42:26 +01:00
Jeff Young 61b749f0b2 Update dangling ends when resizing sheet.
Fixes: lp:1805127
* https://bugs.launchpad.net/kicad/+bug/1805127
2018-11-30 21:34:18 +00:00
Jeff Young ff6a3482ec Remove on-kill-focus-validation.
Fixes: lp:1805361
* https://bugs.launchpad.net/kicad/+bug/1805361
2018-11-29 19:00:21 +00:00
Maciej Suminski 6d8ca311f8 Fix a crash after clicking 'delete' button with empty Template Field Names grid 2018-11-29 14:09:07 +01:00
Jeff Young 9b7d6a27de Don't show dangling symbols at ends of wires with no-connect flags.
Fixes: lp:1805255
* https://bugs.launchpad.net/kicad/+bug/1805255
2018-11-27 14:44:13 +00:00
Jeff Young 6bf0e17036 Fix typo which was keeping rename from working.
(Renaming the dialog window instead of the libentry doesn't really
do the trick.)
2018-11-25 01:51:45 +00:00
Jeff Young d2756bedf1 Keep state except when the filter changed.
(Used to be "except when filtering".)

Fixes: lp:1804293
* https://bugs.launchpad.net/kicad/+bug/1804293
2018-11-25 01:51:45 +00:00
Jeff Young 239482ec98 Add tooltips to Symbol Properties dialogs.
Fixes: lp:1804931
* https://bugs.launchpad.net/kicad/+bug/1804931
2018-11-24 15:06:21 +00:00
Jeff Young 2e1920abad Add tooltips to library manager dialogs.
Fixes: lp:1804930
* https://bugs.launchpad.net/kicad/+bug/1804930
2018-11-24 15:06:21 +00:00
Jeff Young b2db49f4ac Add browse buttons to Library Manager dialogs.
Fixes: lp:1804924
* https://bugs.launchpad.net/kicad/+bug/1804924
2018-11-24 15:06:21 +00:00
jean-pierre charras db7deff21b DIALOG_SPICE_MODEL_BASE: fix minor wxWidgets alerts. 2018-11-23 10:21:57 +01:00
Jeff Young ed6c68a1e3 Clean up handling of component fields.
In particular the datasheet field and how its handled with aliases,
but also cleaning up duplicated functionality around aliases and
libids.
2018-11-22 21:31:45 +00:00
Jeff Young 023a445e9f Make sure original part record always has the write library nickname.
Fixes: lp:1804293
* https://bugs.launchpad.net/kicad/+bug/1804293
2018-11-21 19:51:04 +00:00
Jeff Young f934ce653f A bit of safety to prevent dereferencing NULL. 2018-11-21 19:51:04 +00:00
Jeff Young ae6989f3a1 Don't trim entire wires.
Fixes: lp:1804297
* https://bugs.launchpad.net/kicad/+bug/1804297
2018-11-20 21:44:35 +00:00
Jeff Young d6ac303a8c Don't dereference NULL when checking current part. 2018-11-20 20:21:29 +00:00
Jeff Young a958b23a11 Remove assert which fires incorrectly when emptying screen. 2018-11-20 20:21:29 +00:00
Jeff Young 9145d6a0a3 Put library name in confirmation dialog when reverting library. 2018-11-20 20:21:29 +00:00
Maciej Suminski 630baa3724 Code formatting 2018-11-20 17:54:10 +01:00
Maciej Suminski d405be95b8 Fix a symbol editor crash when clicking without any symbol loaded 2018-11-20 17:52:58 +01:00
jean-pierre charras ab3ff61faa Eeschema: adjust the working/drawing area size on the page size.
This makes using Scrollbars more easy to use, especially for "small" page sizes like A or B.
Note also the working/drawing area size is bigger than the page size (3 times)
2018-11-20 15:11:22 +01: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
Jeff Young 18dc618a13 Set color before drawing dangling symbols.
Fixes: lp:1804003
* https://bugs.launchpad.net/kicad/+bug/1804003
2018-11-19 20:29:48 +00:00
Jeff Young e715835c29 Copy dangling flag when cloning.
Fixes: lp:1804005
* https://bugs.launchpad.net/kicad/+bug/1804005
2018-11-19 19:07:40 +00:00
jean-pierre charras 8522baf4a7 bom_plugins.cpp: fix incorrect command line for python scripts on Windows.
* On Windows, a python command line must be python <script_path>/script.py
and not python <script_path>\script.py
* Fix also a incorrect warning message when a script is not found.
2018-11-19 17:50:38 +01:00
Maciej Suminski 2ee2d9014a Populate BOM plugins list if the list is empty
Fixes: lp:1464893
* https://bugs.launchpad.net/kicad/+bug/1464893
2018-11-19 16:17:53 +01:00
Maciej Suminski 15772e4b0b BOM plugins refactor
Extended BOM_PLUGIN to a class and moved the plugin construction related code there.
2018-11-19 15:59:08 +01:00
jean-pierre charras 240051fb26 Worksheet display in GAL mode: fix missing filename and (in Eeschema) sheet full name. 2018-11-19 10:21:28 +01:00
jean-pierre charras c539d6e0be fix incorrect initialization of VIEW::m_boundary.
This parameter defines the working area (full page) size.

The fix is not perfect, because it does not take in account the page size.
However it is similar to the "old" initialization, before Eeschema GAL.
In Eeschema, a reasonable boundary size is used.
2018-11-18 20:04:17 +01:00
Jeff Young 0de9cb345c Add shortcuts to setting dialogs for track widths, via sizes and grid sizes.
Fixes: lp:1803671
* https://bugs.launchpad.net/kicad/+bug/1803671
2018-11-17 00:35:06 +00:00
jean-pierre charras b35b1bb644 Fix a few minor I18n issues.
Especially remove trailing and leading spaces in sentences, always annoying in translations, and never useful in sources.
2018-11-16 18:12:01 +01:00
Maciej Suminski e3bcd31bff Added a dialog to confirm discarding unsaved changes in Pin Table dialog. 2018-11-16 16:10:53 +01:00
Maciej Suminski de1a8abd3e Fix a crash after accepting changes from Pin Table dialog
Pin Table dialog replaces LIB_ITEMs, while one of them may still
be pointed to as the current library item. Certain wxUpdateUIEvent
will try to dereference the pointer, leading to a crash.
2018-11-16 14:13:28 +01:00
Jeff Young 4050991d28 Move ERC marker focusing to GAL architecture.
Fixes: lp:1802537
* https://bugs.launchpad.net/kicad/+bug/1802537
2018-11-16 10:38:44 +00:00
jean-pierre charras acf696ca2d Eeschema, worksheet view: fix missing initialisation of sheet count and sheet number
Fixes: lp:1803637
https://bugs.launchpad.net/kicad/+bug/1803637
2018-11-16 09:36:10 +01:00
jean-pierre charras 1f3d5cee0e Fix a few minor I18n issues. 2018-11-15 09:34:29 +01:00
Jeff Young bcc8c64256 Consider edge cuts items to have zero width when filling zones.
Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
2018-11-14 23:45:32 +00:00
Jeff Young d65bb73d4e Finish up remaining block operation inconsistencies.
In particular, don't move block back to start when duplicating,
and don't move crosshair back to start when doing a cut, copy, or
paste.

Also fixes undo for libEdit block duplicate.

Fixes: lp:1740138
* https://bugs.launchpad.net/kicad/+bug/1740138
2018-11-14 23:45:32 +00:00
Jeff Young ac2e400598 Re-instate schematic-scope to dangling ends.
Fixes: lp:1803117
* https://bugs.launchpad.net/kicad/+bug/1803117
2018-11-13 21:03:18 +00:00
Jeff Young a60066115b Move no-connect symbols closer to the front for rendering.
Fixes: lp:1803124
* https://bugs.launchpad.net/kicad/+bug/1803124
2018-11-13 21:03:18 +00:00
Maciej Suminski 298a033b9d Fixed a crash on moving down the last field in the Symbol Properties dialog 2018-11-13 14:14:08 +01:00
Maciej Suminski 44424dcbb3 Fixed a crash in Symbol Properties dialog
Fixes: lp:1802641
* https://bugs.launchpad.net/kicad/+bug/1802641
2018-11-13 14:02:16 +01:00
jean-pierre charras 436f80a0bb eeschema/dialogs/dialog_lib_edit_pin_base.cpp: fix a minor wxWidgets alert 2018-11-13 13:03:38 +01:00
Jeff Young 4a9d538608 Fix typo when warping cursor (coords are world-coords).
Fixes: lp:1802811
* https://bugs.launchpad.net/kicad/+bug/1802811
2018-11-12 22:09:31 +00:00
jean-pierre charras 0a71212929 Fix a few minor issues in SYMBOL_PREVIEW_WIDGET.
Fixes: lp:1802808
https://bugs.launchpad.net/kicad/+bug/1802808
2018-11-12 20:40:41 +01:00
jean-pierre charras 0d3637c2ee Fix a few minor I18n issues.
Avoid translation of debug messages.
2018-11-11 10:46:26 +01:00
jean-pierre charras f7cf40f2f4 Fix a few Coverity warnings.
Sometimes a dynamic_cast was used without testing the returned value.
Some are replaced by static_cast, when the dynamic_cast was useless.
2018-11-11 08:28:58 +01:00
Wayne Stambaugh f1f4473d8b Footprint editor: add save view to PNG file.
Factor out save current canvas view to image file code from symbol editor
code so it can be used anywhere.

Add ability to save to any image format supported by wxBitmapType.  See
https://docs.wxwidgets.org/3.0/gdicmn_8h.html#a90a1eb6d85b5044a99b706fd979f27f5.
Currently only PNG output is implemented.

Please note that there is a minor bug that appears to be due to the
scroll bars which causes unfilled areas on the right and bottom edges
of the image.  This always existed in the save symbol editor view
image but it was not as noticeable because by default the background
color is white.  It is very noticeable in the footprint editor with
a black background.

The usual smattering of coding policy and comment fixes.

Fixes lp:1802127

https://bugs.launchpad.net/kicad/+bug/1802127
2018-11-09 08:32:36 -05:00
Jeff Young 6860320b1b Init LibEdit with unit & conversion when opening from schematic. 2018-11-08 21:27:15 +00:00
Jeff Young 3de04e184b Convert pasted objects to current unit and DeMorgan variant.
Fixes: lp:1797183
* https://bugs.launchpad.net/kicad/+bug/1797183
2018-11-08 21:27:15 +00:00
John Beard 075f428aca Include directories are implied by legacy_gal linkage
This avoids having to manually specify include/legacy_gal
in and legacy GAL targets, and harominizes with legacy_wx.

This also means .cpp files in common/legacy_gal do not
need to specify the legacy_gal subdirectory, so they
will continue to work as needed when legacy_wx is removed.
2018-11-08 07:52:36 -05:00
Maciej Suminski 02f81d7419 Handle 'show page limits' in eeschema 2018-11-08 09:57:16 +01:00
Jeff Young cbd13c7127 Show dangling pins when moving items; don't when dragging.
Fixes: lp:1801962
* https://bugs.launchpad.net/kicad/+bug/1801962

Fixes: lp:1801959
* https://bugs.launchpad.net/kicad/+bug/1801959
2018-11-07 14:24:16 +00:00
Maciej Suminski d6bc402f14 Fix instantly disappearing pop-up menu in eeschema
Fixes: lp:1798453
* https://bugs.launchpad.net/kicad/+bug/1798453
2018-11-06 17:21:13 +01: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
Maciej Suminski 293bc52299 Fix off-grid block paste
Fixes: lp:1801625
* https://bugs.launchpad.net/kicad/+bug/1801625
2018-11-05 11:59:38 +01:00
Jeff Young fec8ab372e Don't set the viewport when switching screens.
That's the job of ZoomAutomatique().

Fixes: lp:1799436
* https://bugs.launchpad.net/kicad/+bug/1799436
2018-11-04 19:17:53 +00:00
Jeff Young 589e1f6a96 MSW and GTK need a separate dialog for opening/saving directories.
Fixes: lp:1801528
* https://bugs.launchpad.net/kicad/+bug/1801528
2018-11-04 12:35:01 +00:00
Jeff Young 68b07d1aff Add show/hide search tree to modedit, and fix it in libedit.
Fixes: lp:1801531
* https://bugs.launchpad.net/kicad/+bug/1801531
2018-11-04 12:35:01 +00:00
Jeff Young 6e810a00e4 Warp mouse from context menu before dragging.
Fixes: lp:1798815
* https://bugs.launchpad.net/kicad/+bug/1798815
2018-11-04 12:35:01 +00:00
Jeff Young 69952a7b9f Improve updating of symbol and footprint trees.
In particular, update highlighting when changing footprints.
2018-11-02 19:55:30 +00:00
jean-pierre charras be0935b339 Eeschema: Update zoom/scale limits, due to recent change in GAL.
Fixes: lp:1797995
https://bugs.launchpad.net/kicad/+bug/1797995
2018-11-02 14:36:12 +01:00
jean-pierre charras d465af65a7 LIB_FIELD: fix incorrect text thickness for small sized texts.
Also remove duplicate code.
2018-11-02 11:36:07 +01:00
jean-pierre charras 5e44686711 Eeschema, symbol editor: re-enable PNG export and fix a minor issue in SVG export (was in B&W mode instead of color).
Add a comment in plotter.h to avoid other errors when selecting plotting mode B&W or color

Fixes: lp:1801058
https://bugs.launchpad.net/kicad/+bug/1801058
2018-11-02 09:24:55 +01:00
John Beard bf42247971 Eeschema: fix potential crash when closing Kicad app.
The crash happens when a wxPaint event is fired after deleting the schematic frame.
It happened only on one Linux install.

Fixes: lp:1800874
* https://bugs.launchpad.net/kicad/+bug/1800874
2018-11-01 08:27:19 +01:00
Maciej Suminski 6602e17edc Add copyright header to sch_view.h 2018-10-31 19:17:30 +01:00
Maciej Suminski a18be5d37c Adjust GAL world unit for eeschema 2018-10-31 19:17:30 +01:00
Maciej Suminski e81c3a59a2 Refactored and unified board editor and footprint editor print dialogs 2018-10-31 19:17:30 +01:00
Maciej Suminski 17205b4599 Added VIEW::DataReference() for sharing data with another VIEW instance 2018-10-31 19:17:29 +01:00
John Beard a1fad9d3fe Eeschema: allow dragging of text
Text doesn't have "special" handling of dragging, like connected items (it's
basically just a move).  However, allowing "drag" to work on text makes
handling text consistent when dragging other items.
2018-10-31 16:19:03 +00:00
jean-pierre charras 7985234556 Eeschema: Fix a subtle bug in SYMBOL_PREVIEW_WIDGET.
The dialog was using a LIB_ALIAS from library cache to show the symbol to the canvas without making a local copy.
Unfortunately, the library viewer is doing the same thing.

Now the GAL is used in Eeschema, a link to the VIEW used by the GAL canvas is stored in this class.
When The selector symbol dialog is used to choose a symbol to display in the Library viewer,
a race condition between the Library viewer GAL canvas and the dtor dialog that destroyed this link in the same instancied class.

Now, the SYMBOL_PREVIEW_WIDGET used in the dialog works on a local copy of the symbol to display.
2018-10-31 15:52:35 +01:00
Jeff Young c4cd81a906 Remove side-effect of LIB_FIELD::SetText().
Fixes: lp:1800545
* https://bugs.launchpad.net/kicad/+bug/1800545
2018-10-31 12:57:23 +00:00
Jeff Young 6888268f74 Timestamps are long rather than int.
Fixes: lp:1800796
* https://bugs.launchpad.net/kicad/+bug/1800796
2018-10-31 10:19:59 +00:00
jean-pierre charras 7b10490256 Library viewer: fix broken behavior of unit selector (could be Windows specific).
Remove a useless message in debug mode about LIB_ALIAS bounding box.
2018-10-30 17:51:12 +01:00
jean-pierre charras 49c94fb928 Eeschema, library viewer: fix a Kicad assert. 2018-10-30 15:58:08 +01:00
Jeff Young 4742c52250 Highlight symbol fields when selected. 2018-10-30 13:09:20 +00:00
Jeff Young 364be90dc5 Fix translation issues with copy/paste block.
Also fix issues with paste not working at all from the context
menu in LibEdit.

Fixes: lp:1800513
* https://bugs.launchpad.net/kicad/+bug/1800513
2018-10-30 11:33:49 +00:00
Jeff Young 4030eec939 Implement proper dangling end handling for block moves.
(Most of this is actually fixing the IsDanglingStateChanged() to
correctly indicate that it *updates* the dangling state, not just
tests it.)
2018-10-30 11:33:49 +00:00
Maciej Suminski b445b0fab2 Link eeschema with ngspice DLL
Adds a link-time dependency for libngspice, so that other tools may
detect ngspice as a KiCad dependency.

The library is still loaded with dlopen() as it gives a way to reload it
in case of problems. The DLL name is recognized during CMake
configuration and used to load the library at runtime.
2018-10-30 08:32:38 +01:00
Jeff Young 4fc1f4db3e LIB_ITEMs won't have parent in LibEdit. 2018-10-28 17:45:11 +00:00
Jeff Young a8c7bb0c92 Move library text items to LAYER_DEVICE. Only sch text items belong on LAYER_NOTES.
Fixes: lp:1800350
* https://bugs.launchpad.net/kicad/+bug/1800350
2018-10-28 17:45:11 +00:00
Jeff Young a96ebe8fac Sort reference by their numeric content.
Fixes: lp:1464805
* https://bugs.launchpad.net/kicad/+bug/1464805
2018-10-28 17:45:11 +00:00
jean-pierre charras c49917c5a8 Dialog edit component in lib: Fix a few minor wxWidgets alerts. 2018-10-28 18:42:16 +01:00
Stefan Brüns d1db2c7621 Use fixed version for libngspice.so.0
CanonicalizeName only adds the lib prefix and .so suffix, so loading
libngspice.so fails until the development package is installed.
MAC/Windows code paths lookup soversion 0 of ngspice as well, as this
is the only compatible version.
2018-10-27 10:20:09 +02:00