Commit Graph

3167 Commits

Author SHA1 Message Date
Jeff Young 17e6720bc9 Implement undo for eeschema's "Import existing drawings"
Fixes: lp:1522189
* https://bugs.launchpad.net/kicad/+bug/1522189
2018-01-17 15:30:36 -05:00
Seth Hillbrand 2fa5c723d8 Don't cleanup schematic when symbols are rescued.
Schematic cleanup only makes sense after the libraries are fully updated
and loaded.  Before pin caching, this was a minor difference but once we
needed to update pin caches, schematic cleanup can remove junctions from
pin-wire connections incorrectly.

Instead, we use the global OpenProjectFiles() schematic cleanup call to
be sufficient and not call a second time, prior to all libraries being
rescued and loaded.

Fixes: lp:1743148
* https://bugs.launchpad.net/kicad/+bug/1743148
2018-01-17 12:53:38 -05:00
Maciej Suminski 60963fe2fc Fixes for 590cac9d
The original patch did properly recognize the case when all transient
source definition fields are empty, which is perfectly valid.
2018-01-17 10:37:57 +01:00
Dan Weatherill 590cac9d55 Fix transient SPICE source field check logic
Fixes: lp:1743486
https://bugs.launchpad.net/kicad/+bug/1743486
2018-01-17 10:36:35 +01:00
Maciej Suminski ac1771a9f0 Handle block selection removal of libraries in SYMBOL_LIB_TABLE dialog
Fixes: lp:1741543
* https://bugs.launchpad.net/kicad/+bug/1741543
2018-01-17 09:59:48 +01:00
jean-pierre charras 2e79b93b99 Eeschema: fix issue (2 tools not working in left vertical toolbar) created by commit 7e6a6540c8 2018-01-16 19:39:31 +01:00
Jeff Young 947a4839fd Use generic Save (and New and Open) commands where unambiguous.
Fixes: lp:1743426
* https://bugs.launchpad.net/kicad/+bug/1743426
2018-01-16 08:39:12 -05:00
Oliver 195b85b0c5 Cleanup of KiCad Icons
Major cleanup of many icons (started as a simple effort to tweak libedit and modedit icons)
Ref: https://lists.launchpad.net/kicad-developers/msg32860.html
* Each application icon has been updated
* Consolidated icon "modifiers" across many icons
* Replaced confusing arrows with "load" and "save" icons
* Slight code updates to reference correct icons
* Consolidate multiple representations of single icon type(s)
2018-01-12 14:06:45 -05:00
Seth Hillbrand 98c8a5ac0c Fix non-conforming signbit test
Fixes: lp:1742803
* https://bugs.launchpad.net/kicad/+bug/1742803
2018-01-12 19:58:33 +01:00
Wayne Stambaugh 41f5c754e5 Eeschema: fix minor component tree model bug.
The component tree model was always saving the root symbol name which
prevented the actual alias from be selected in the symbol chooser
dialog.  This also prevented the correct documentation information
from being shown in the information panel.

Fixes lp:1740742

https://bugs.launchpad.net/kicad/+bug/1740742
2018-01-12 11:59:26 -05:00
Wayne Stambaugh 3c9316957d Eeschema: allow remapping if a project symbol library table exists.
Change the behavior of the remapping algorithm to remap even if a
project symbol library table exists in the project file in case a
previous attempt to remap failed.  The existing symbol library table
is backed up to the back folder and rebuilt.

Fixes lp:1741983

https://bugs.launchpad.net/kicad/+bug/1741983
2018-01-12 10:13:41 -05:00
jean-pierre charras de9161be85 Larger dialog size. 2018-01-11 14:21:36 +01:00
jean-pierre charras 47dfabc6c8 Add size control to HTML_MESSAGE_BOX. Fix incorrect default size of a few dialogs.
Clean code: remove useless code and not used parameters.
2018-01-11 10:48:52 +01:00
Chris Pavlina 7e6a6540c8 Implement primitive icon scaling for high DPI
This is meant as a stopgap for 5.0, with plans to add proper scaled
icons in the 6.0 cycle. A function KiScaledBitmap() is added, which
works like KiBitmap() except it scales the bitmap according to the
calling window's font size. Controls have been added to all the main
applications to let the user select scaling manually (these were omitted
from smaller apps that didn't already have a place to put them).

In addition, in eeschema only, the pixel height of the system font is
shown in the options dialog for diagnostics. This is only for collecting
feedback before 5.0 release from users with different displays and will
be removed.
2018-01-10 21:26:06 -07:00
Wayne Stambaugh 998d9179e9 Eeschema: fix library naming bugs in symbol rescuer and re-mapper.
File names with spaces were causing invalid symbol names in both the
rescue library and the cache which would cause both libraries to fail
to load because library symbol names are not escaped so the spaces
tripped up the library parser.  Replace the spaces in the file names
with hyphens and in both the rescuer and the remapping code so the
library nickname in the symbol library table does not contain spaces.

Update the symbol library table dialog to prevent users from defining
library nicknames with spaces.  This is different than the footprint
library table which allows nicknames with spaces.  This solution is
a temporary fix until the new symbol library and schematic file formats
are implemented.

Fix off by one row in illegal nickname error message in the symbol
library table editor.
2018-01-10 16:04:32 -05:00
jean-pierre charras 87045ea94c Fix tipo and tooltip 2018-01-10 14:48:14 +01:00
Maciej Suminski efe55b6f0a Symbol Library Editor: fix renaming symbols with multiple aliases
Fixes: lp:1737964
* https://bugs.launchpad.net/kicad/+bug/1737964
2018-01-10 12:15:12 +01:00
Maciej Suminski c09cf252c6 Symbol Library Editor: update node information on library sync 2018-01-10 12:04:34 +01:00
Maciej Suminski 12041551a1 Removed unnecessary debug messages 2018-01-10 12:03:53 +01:00
Maciej Suminski 8c42abc10c Symbol Library Editor: fix crash after renaming a symbol
Crash was caused by removal of the selected item from the
wxDataViewModel, which was later accessed in
COMPONENT_TREE::GetSelectedLibId(). To avoid the problem, the selection
is validated before regenerating the tree widget.

Fixes: lp:1740952
* https://bugs.launchpad.net/kicad/+bug/1740952
2018-01-10 08:52:17 +01:00
Maciej Suminski 6e65049a56 Do not modify LIB_ID in LIB_PART::SetLib()
This commit is a partial revert of aa81f5b9 & 445ac505. LIB_ID should
not be modified when a library is assigned to its part, as the library
nickname cannot be evaluated during the assignment and might be
different than its filename.
2018-01-10 08:52:17 +01:00
Camille f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Camille 3168d03fe5 Fix unnecessary copy initialization detected by clang-tidy 2018-01-09 18:22:10 -05:00
Wayne Stambaugh 28692c40e1 Eeschema, project rescue bug fix and other minor improvements.
Fix a bug where the full LIB_ID was not being used to look up the name
of the symbol in the cache library preventing the rescue to work when
rescuing symbol library table projects.

Add information as to why a symbol was rescued rather than only showing
what symbols were rescued.

Do not add rescue suffix to symbol name for symbol library table rescues
because if a symbol name exists in multiple libraries that need rescued
at the same time will cause subsequent symbol rescues to be overwritten.
Append the nickname of the schematic symbol library to prevent symbol
name clashes in the rescue library.
2018-01-09 15:41:26 -05:00
Wayne Stambaugh 00fb70088f Eeschema: fix progress dialog title capitalization. 2018-01-09 10:58:01 -05:00
Wayne Stambaugh 69560ec587 Eeschema, fix bug in edit one field dialog.
Verify the library symbol of the field being edited still exists rather
than use an assertion because it is entirely feasible that the library
symbol or library containing this symbol has been deleted and will cause
a segfault.  Unfortunately there is no way to determine if the symbol is
a power symbol or not so just set it as a regular symbol so the user can
still edit the schematic symbol field.

Fixes lp:1742111

https://bugs.launchpad.net/kicad/+bug/1742111
2018-01-09 09:20:54 -05:00
Maciej Suminski 82fc038c9b Fixed wxLogTrace for LIB_ALIAS
When a LIB_PART object is removed, it deletes all of its aliases.
When the last one is removed, it tries to report the name of the
parent part, but as it has no aliases - it cannot return a valid name.
2018-01-09 09:55:05 +01:00
Maciej Suminski ee140ce6c8 Symbol Library Editor: do not leave the old part after renaming 2018-01-09 09:55:01 +01:00
jean-pierre charras 019eed0d28 Symbol editor: rework on multi-unit symbols: pin edition synchronization is now only between units (Work in progress)
The synchronization between body styles of the same units is removed.
This is easier to understand by users.
2018-01-09 08:54:48 +01:00
jean-pierre charras 1d2752ee47 Symbol editor: rework on multi-unit symbols are pin edition synchronization between units (work in progress)
User Interface: better tooltips and better messages.
Code: better comments, and better member name.
Fix a few minor issues.
2018-01-09 08:54:47 +01:00
Wayne Stambaugh 0e9c8a4238 Prevent segfault when remapping project with corrupt cache library.
Use the symbol found in the library when the symbol is not in the cache
library.

Add an assert to prevent dereferncing a null pointer in the future even
thought this should not happen as the rescue algorithm does not add a
candidate when a symbol cannot be found in either the cache or any other
library.

Fixes lp:1741964

https://bugs.launchpad.net/kicad/+bug/1741964
2018-01-08 17:33:32 -05:00
Maciej Suminski 7fe6249ac3 Alternative fix for lp:1741050
Calling wxListBox::SetSelection( wxNOT_FOUND ) changes the internal
state of the widget without the intended visual effect (show nothing
selected). It leads to a situation when the default choice is overridden
with wxNOT_FOUND, even though the list box shows a valid value.

As there is no point in calling wxListBox::SetSelection( wxNOT_FOUND ),
the confusing call has been removed.
2018-01-08 16:02:34 +01:00
Maciej Suminski 12c6b3337b LIB_MANAGER does not hold a SYMBOL_LIB_TABLE pointer
SYMBOL_LIB_TABLE might be destroyed without a forewarning, so
it is safer to request it every time it is needed.

Fixes: lp:1741820
* https://bugs.launchpad.net/kicad/+bug/1741820
2018-01-08 15:19:25 +01:00
ludovic leau-mercier 31902f967a Fixed an assert when selected the default semiconductor model
Fixes: lp:1741050
* https://bugs.launchpad.net/kicad/+bug/1741050
2018-01-08 12:53:57 +01:00
Chris Pavlina 6cee19d37d eeschema: neatly wrap placeholder text in symbol chooser 2018-01-07 19:30:56 -07:00
Jon Evans ca264f8982 Add bidirectional net highlight cross-probing
Fixes: lp:1738875
* https://bugs.launchpad.net/kicad/+bug/1738875
2018-01-07 14:12:50 -05:00
jean-pierre charras 504e7a4a51 Very minor fix in a menuitem label 2018-01-07 16:31:15 +01:00
jean-pierre charras 20e66253bb symbol editor: add icons in popup menus of the symbol tree list. 2018-01-07 13:18:18 +01:00
Chris Pavlina c5b2ad9595 simulator: DPI-independent default size 2018-01-06 22:23:58 -07:00
Chris Pavlina 7b1c9c145f DIALOG_BOM_EDITOR: DPI-independent size 2018-01-06 20:37:49 -07:00
Chris Pavlina e971b0e698 Don't call FinishDialogSettings in DIALOG_EDIT_COMPONENTS_LIBID
Dialogs displaying a lot of scrollable data should use SetSizeInDU()
instead, as FinishDialogSettings() will set a minimum size equal to
whatever can contain all the data (making it overflow the screen for
large amounts).
2018-01-06 20:08:57 -07:00
Chris Pavlina 917804ef12 Make eeschema color select widget DPI-independent 2018-01-06 17:29:07 -07:00
Chris Pavlina 119a0f665b DIALOG_SYMBOL_REMAP: raise after remap is complete
On macOS in particular, there is a tendency for this to fall behind
other windows where the user has no clue it's still up.
2018-01-06 14:51:53 -07:00
Chris Pavlina 13bc706518 Fix several dialogs with bad default sizing
- Add helper methods for DPI-independent sizes
- Make splitter sashes visible on macOS
- Remove SetSizeInChars() - wx has a built-in way that I missed
- DIALOG_CHOOSE_COMPONENT: DPI-indep splitter sizes
- DIALOG_RESCUE_EACH: DPI-indep default size and sensible HTML window
  size
- COMPONENT_TREE: DPI-indep sizing
- DIALOG_FP_LIB_TABLE, DIALOG_SYMBOL_LIB_TABLE
2018-01-06 14:39:17 -07:00
Dan Weatherill 0dcf95ee1a automatically add extension to sim workbook files
CHANGED: When a workbook file is saved from the simulation dialog
in eeschema, the extension is automatically added if it is not
specified. This behaviour is consistent with the workbook loading
dialog, which filters the filelist for only ".wbk" files with no
"all files" option.
2018-01-06 12:04:53 -05:00
jean-pierre charras b98f6a2fd1 Minor fixes in strings and I18N fix. 2018-01-06 10:57:46 +01:00
jean-pierre charras cb60da3bc5 Fix Symbol editor: some hotkeys are not working (Delete item and Drag item)
Fixes: lp:1741145
https://bugs.launchpad.net/kicad/+bug/1741145
2018-01-06 10:36:56 +01:00
Mark Roszko b98cc0b937 Some coverity fixes 2018-01-05 22:51:03 -07:00
Chris Pavlina 57fe3739ca Symbol chooser: base default size on font for DPI flexibility 2018-01-05 22:02:05 -07:00