Commit Graph

3911 Commits

Author SHA1 Message Date
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
Wayne Stambaugh c842787492 Minor UI menu string improvements.
Change term "Flip Horizontal" to "Mirror About Horizontal(X) Axis" in
the schematic editor symbol context menu to improve clarity.

Change term "Flip Vertical" to "Mirror About Vertical(Y) Axis" in the
schematic editor symbol context menu to improve clarity.

Change to the same mirror terminology in the block context menu.

Change "Exchange Footprint" to "Change Footprint" in the board footprint
context menu for improved clarity.

Fixes lp:1740593

https://bugs.launchpad.net/kicad/+bug/1740593
2018-01-05 13:07:59 -05:00
Chris Pavlina 0945c319f0 eeschema: make footprint preview optional
The footprint preview and selection has been problematic for some users;
I'd rather option it out for 5.0 and work on polishing it for 6.0.
2018-01-03 18:28:44 -07:00
Wayne Stambaugh 4298d4ff4e Change missed UI string termonology from part/component to symbol. 2018-01-03 14:19:26 -05:00
Wayne Stambaugh 202cd43864 Eeschema: minor remapping improvements.
Create separate folder in project path to backup files changed during
remapping.

Add time stamp to backup file names in case multiple remappings are
performed.

Add backup file information to report panel instead of using debug
trace messages.

Disable the remap button if the user does not have write privileges to
the current project path.
2018-01-03 11:25:19 -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
jean-pierre charras c5b8c749da minor fix: use right parent to show the symbol or footprint viewer in dialog 2018-01-01 18:06:02 +01:00
jean-pierre charras 7d6230ab38 Eeschema: Cannot close opening Library Browser frame when reassigning symbols from the Library Browser (wxGTK specific)
Fixes: lp:1740607
https://bugs.launchpad.net/kicad/+bug/1740607
2018-01-01 13:40:23 +01:00
jean-pierre charras 6bb349e933 Better management of KIWAY_PLAYER frame when called in modal mode, and having the wxFLOAT_ON_PARENT style option.
(previously, did not use the actual parent)
2018-01-01 10:41:43 +01:00
jean-pierre charras 2fd7ab248e Fix compil warnings 2018-01-01 09:20:23 +01:00
Wayne Stambaugh 03e9f0c94a Eeschema: fix broken library symbol link for missing libraries.
When an attempt to resolve a library symbol link having a library
nickname that was no longer found in the symbol library table, the
symbol resolution was not falling back to the cache library due to
a silently handled exception.  Add check for valid symbol library
table nickname before attempting to resolve symbol link to prevent
exception bypassing falling back to the cache library.

Fixes lp:1740609

https://bugs.launchpad.net/kicad/+bug/1740609
2017-12-31 10:07:58 -05:00
Jeff Young fb597f4298 Enable tab navigation and shift-return-for-OK in multiline text controls for text objects.
Fixes: lp:1420916
* https://bugs.launchpad.net/kicad/+bug/1420916
2017-12-31 09:08:42 -05:00
Wayne Stambaugh b55eb0b5f1 Eeschema: fix assertion in LIB_PART destructor.
A new legacy symbol library plugin deletes all of the aliases from each
LIB_PART object that it owns cause an assertion in the dtor which calls
GetName() which checks for an empty alias list to prevent a segfault.
Remove the call to GetName() from the dtor trace message.

Fixes lp:1740597

https://bugs.launchpad.net/kicad/+bug/1740597
2017-12-30 19:55:11 -05:00
Seth Hillbrand e062780e9c Eeschema: Clears the active block after mirroring
Fixes: lp:1740549
* https://bugs.launchpad.net/kicad/+bug/1740549
2017-12-30 09:37:11 -05:00
Seth Hillbrand cfe20e22fb Eeschema: Correcting missing cleanup calls
Adds cleanup (wires and junctions) to two commands:
rotate/orient and drag without block.

Fixes: lp:1739951
* https://bugs.launchpad.net/kicad/+bug/1739951
2017-12-29 16:24:58 -05:00
Seth Hillbrand 6073bf3ea7 Library Editor: Moving current item to the base screen
Store the currently-edited item in the base screen class
instead of the libedit_frame.  This allows us to access it
for double-click disambiguation and harmonizes the library
editor with the schematic editor code that already does this.

Fixes: lp:1738694
* https://bugs.launchpad.net/kicad/+bug/1738694
2017-12-29 15:51:51 -05:00
Wayne Stambaugh 09cff5d8ed Eeschema: minor UI string spelling and coding policy fixes. 2017-12-29 10:44:33 -05:00
Wayne Stambaugh ae7cc5c868 Eeschema: only show the symbol library load progress dialog once. 2017-12-29 10:26:05 -05:00
Wayne Stambaugh 51717aad22 Eeschema: fix segfault bug when LIB_PART has no aliases.
The GetName() method attempts to access the first LIB_ALIAS pointer in
the m_aliases member without checking if m_aliases is empty.  This
should never happen because a new LIB_PART creates a LIB_ALIAS object
in the ctor.  Some how, this is getting bypassed and causing Eeschema
to crash in the LIB_PART dtor on debug builds.  GetName() now checks
for an empty alias list to prevent a null pointer segfault.

Fixes lp:1739614

https://bugs.launchpad.net/kicad/+bug/1739614
2017-12-29 09:57:12 -05:00
Wayne Stambaugh 70f516bde4 Eeschema: changed missed instances of component in UI strings.
Fixes lp:1740440

https://bugs.launchpad.net/kicad/+bug/1740440
2017-12-29 08:46:24 -05:00
Nick ?stergaard 4f1b510750 Use same path icon for the Configure Paths menu option
Also move the path configure item above the General Options to align
better with the menu in pcbnew.
2017-12-28 17:08:15 -05:00
Jeff Young 8a21641639 Eeschema: fix block copy and cut command event handlers.
Popup menu IDs must be between START_RANGE and END_RANGE to get bound to
the right event handler.

Fixes: lp:1667730
* https://bugs.launchpad.net/kicad/+bug/1667730
2017-12-28 16:12:33 -05:00
Wayne Stambaugh 1175d50486 Eeschema: fix default ERC dialog tab. 2017-12-28 14:17:47 -05:00
Simon Richter b4ad8ec560 Order source file names alphabetically 2017-12-27 14:01:05 -05:00
Wayne Stambaugh 71ea6dc2b9 Common, 3D viewer, CvPcb, and Eeschema dialog tweaks.
Improve dialog layout and fix UI policy issues with all of the dialog
boxes in the common, 3D viewer, CvPcb, and Eeschema code paths.

Updated the use of component to symbol.
2017-12-26 09:38:45 -05:00
Wayne Stambaugh 570866557f Add environment variable configuration dialog to Eeschema.
Fixes lp:1739910

https://bugs.launchpad.net/kicad/+bug/1739910
2017-12-24 12:57:57 -05:00
Wayne Stambaugh f7ab50f791 UI string normalization.
Replace all instances of "component" and "part" with "symbol" when
referring to schematic and library symbols.

Replace all instances of "component" with "footprint" when referring to
board and library footprints.

Minor dialog layout fixes to some of the dialogs impacted by the UI
string changes.
2017-12-24 10:04:32 -05:00
jean-pierre charras fe6ade185a DIALOG_UPDATE_FIELDS: make it resizable and fix a few very minor UI policy issues. 2017-12-24 10:38:10 +01:00
Wayne Stambaugh 8f0e6469ca Minor symbol remapping fixes.
The remapping utility would create a new project specific library when a
symbolic link pointed to a library already defined in the symbol library
table.  Now the comparison checks to see if the library path and file
name are actually a symbolic link if the file names are not the same when
the symbol library table entry is a file name rather than a URL.  URLs
are simple string comparisons.

Disable the remap button after the remapping completed.

Remove some commented out code from the edit symbol in schematic dialog.

Fixes lp:1738634

https://bugs.launchpad.net/kicad/+bug/1738634
2017-12-22 08:03:49 -05:00
Seth Hillbrand 1396ab0941 Eeschema: Consider buses for junctions
Allows buses to acquire junctions based on their connections.  Buses
can only have junctions with other buses.  Also allows buses to be
draggable junctions for collections
2017-12-21 11:04:46 -05:00
jean-pierre charras 23d71cfa93 fix typo 2017-12-21 15:08:10 +01:00
Maciej Suminski 783b5e2616 Forbid colon, slash and backslash characters in symbol names 2017-12-21 13:56:35 +01:00
Seth Hillbrand a061fe1f99 Eeschema: Adding connection block selections
This adjusts the selection addition criteria for
blocks to allow items such as labels to connect to
lines not at the endpoints.  It also uses the same
logic to correctly gather bus-wire, bus-bus entries.

Fixes: lp:1738941
* https://bugs.launchpad.net/kicad/+bug/1738941
2017-12-20 10:04:25 -05:00
Maciej Suminski 7f9876ec27 Fix lexical sort in component tree widget on Windows
Apparently explicitly requesting a column to be sorted breaks component
filtering on Windows. Without SetSortOrder() call the list is sorted and
filtering still works as expected.

Fixes: lp:1739412
* https://bugs.launchpad.net/kicad/+bug/1739412
2017-12-20 14:50:36 +01:00
Maciej Suminski 320fa7120d Expand/collapse library nodes with Enter key in component chooser 2017-12-20 12:25:12 +01:00
Maciej Suminski 5fac73fc21 Fixed browsing order with arrow keys in component chooser on Windows
As Windows displays the component list in inverted order, the direction
of scrolling had to be reversed as well.
2017-12-20 12:23:05 +01:00
Maciej Suminski 6344e238b3 Fix random node selection in symbol library editor on Windows
Selecting a node while wxDataViewCtrl is frozen selects a random node on
Windows.

Fixes: lp:1739202
* https://bugs.launchpad.net/kicad/+bug/1739202
2017-12-20 12:06:21 +01:00
Maciej Suminski 457bbbed15 Added a comment for a1b70601 (fixed filtering in component chooser) 2017-12-20 11:48:00 +01:00
Maciej Suminski f3a6bc6651 Fix crash on cut/remove a part in symbol library editor
Fixes: lp:1738635
* https://bugs.launchpad.net/kicad/+bug/1738635

Fixes: lp:1738999
* https://bugs.launchpad.net/kicad/+bug/1738999
2017-12-20 09:46:02 +01: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 a1b7060189 Fixed filtering in component chooser on Windows
Please never ask me about the SetSortOrder() part. When it is set to
'true', wxDataViewCtrl::EnsureVisible() does not always work correctly,
so sometimes the best search result is not shown in the window (no
pattern found). Now it is set to 'false' to avoid the described
behavior, but the sorting order is reversed on Windows, not on Linux.
I could not test it on OSX, but I am sure it paints walls in your room
pink. /me burst into tears.

Fixes: lp:1738696
* https://bugs.launchpad.net/kicad/+bug/1738696
2017-12-19 15:19:04 +01:00
Maciej Suminski d4c8e1b5e9 Fixed ignored hot keys for save part/library commands in Symbol Editor
Previously wxUpdateUIEvent::SetText() stripped hotkey from menu entries.

Fixes: lp:1737819
* https://bugs.launchpad.net/kicad/+bug/1737819
2017-12-19 12:21:07 +01:00
Maciej Suminski 017fc4da8f Fixed capitalization and accelerators in Symbol Library Editor
Menu item labels follow the KiCad UI guideline.
Removed an accelerator conflict for 'Place' and 'Part' menus.
2017-12-19 12:21:07 +01:00
jean-pierre charras 9d4bfbded8 libedit, UI very minor change:
Enable "save curr lib" tool of main toolbar when modified even if this lib is empty.
It happens when all items are erased, and it is consistent with the close libedit dialog
that ask for saving all modified libraries
2017-12-18 09:50:28 +01:00
Christian Jacobsen ff4829eee6 Added a validity check in SIM_PLOT_PANEL::IsGridShown()
Fixes: lp:1712086
* https://bugs.launchpad.net/kicad/+bug/1712086
2017-12-18 09:34:25 +01:00
Andrew Wygle 9413793ef4 Eeschema: Correctly assign unit when copy/pasting
Fixes: lp:1738656
* https://bugs.launchpad.net/kicad/+bug/1738656
2017-12-17 22:27:31 +01:00
Seth Hillbrand 3f24128f17 Eeschema: Updates pin cache correctly for multi-unit components
Fixes: lp:1738615
* https://bugs.launchpad.net/kicad/+bug/1738615
2017-12-17 14:44:12 -05:00
Maciej Suminski 378846c2e3 Eagle Schematics Importer: support for UTF-8
Fixes: lp:1736083
* https://bugs.launchpad.net/kicad/+bug/1736083
2017-12-17 19:54:21 +01: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
Maciej Suminski 7665a839cd Eagle Schematic Import: try harder to generate a meaningful library name
The previous implementation relied only on the project name. When it is
set, the imported library was named '-eagle-import'. Now it tries
the project name and then the file name, using 'noname-eagle-import'
as fallback.

The library name is stored in the plugin to avoid changing the library
name after the project name has been set.
2017-12-17 18:45:40 +01:00
Seth Hillbrand 0ef2a7f08b Eeschema: Mark wire-bus entries correctly
Marks wire-bus entries as not dangling if there is at least a wire
and a bus on each end.  Corrects behavior when wires and buses overlap
at the endpoint.
2017-12-16 09:03:23 -05:00
jean-pierre charras 2398d5ef8b DIALOG_EDIT_COMPONENTS_LIBID: enhancement in orphan automatic remap:
add dialog to choose the right candidate when more than one is found
2017-12-16 14:50:37 +01:00
Seth Hillbrand 6f3e55d344 wx: Add double-click handling in disambiguation cases
Fixes: lp:1154020
* https://bugs.launchpad.net/kicad/+bug/1154020
2017-12-15 16:32:19 -05: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
Seth Hillbrand 87938b06b4 Eeschema: TestDanglingEnds on Cross-probe
Fixes: lp:1672381
* https://bugs.launchpad.net/kicad/+bug/1672381
2017-12-14 16:04:30 -05:00
jean-pierre charras dee93e5eeb Minor fix: rename LIB_PART::m_dateModified to LIB_PART::LIB_PART::m_dateLastEdition
and use m_dateLastEdition type for LIB_PART::m_dateLastEdition
2017-12-14 17:27:40 +01:00
jean-pierre charras dc6c98310f Export drawing in symbol editor results in error message and no drawing file (.sym file) saved
Fixes: lp:1737875
https://bugs.launchpad.net/kicad/+bug/1737875
2017-12-14 16:45:30 +01:00
jean-pierre charras 33c2d6e4ba Fixed disappearing components in COMPONENT_TREE in library editor
The reason the component tree widget was cleared on Windows is the fact
m_adapter->UpdateSearchString( m_query_ctrl->GetLineText( 0 ) ) is
called on any change of the symbol. But if m_query_ctrl is empty,
m_query_ctrl->GetLineText( 0 ) returns the "hint" (currently the word
"Search") not the actual value, so there is no "candidate" symbol in
list. Using m_query_ctrl->GetValue() returns the actual value and fixes
this issue.

Fixes: lp:1737132
* https://bugs.launchpad.net/kicad/+bug/1737132
2017-12-13 10:34:14 +01:00
Seth Hillbrand 8e764f85a4 Optimizing speed of sch_component pin references
Pins are weak_ptrs to the library, so they require a lock() before
accessing.  This imposes a performance hit on fast loops that access
the pin list repeatedly.  This patch caches the pin position locally
for each component, updating only when needed.

Fixes: lp:1737363
* https://bugs.launchpad.net/kicad/+bug/1737363
2017-12-12 17:48:50 -05:00
jean-pierre charras 5f6f03b16c HIERARCHY_NAVIG_DLG: allows closing the dialog by ESC key (like other dialogs)
cleanup hierarch.cpp code
2017-12-12 09:54:42 +01:00
Maciej Suminski aedf24d944 Fix crash when renaming a component in symbol library editor
COMPONENT_TREE::STATE used wxDataViewItem to store the selection, but it
will point to a deleted object if the selection was removed. Switched to
storing the selection using LIB_ID as it is much safer to use.
2017-12-11 11:22:24 +01:00
Seth Hillbrand cb422e29df Eeschema: Filter out empty libraries
Fixes: lp:1736930
* https://bugs.launchpad.net/kicad/+bug/1736930
2017-12-09 08:33:58 -05:00
Seth Hillbrand 394749f1d6 Eeschema: calculate not-connected pins correctly
Show the NC box only on pins connected via the same component,
indicating a stacked pin group.  Do not show NC box on pins for
different components with the same symbol.
2017-12-08 17:20:08 -05:00
Seth Hillbrand f0fecba9e1 Eeschema: add junction to 3-component/wire connection
Fixes: lp:1737014
* https://bugs.launchpad.net/kicad/+bug/1737014
2017-12-08 17:19:47 -05:00
jean-pierre charras 4c4b11b45f change UTF8& operator+=( wchar_t ch ) to UTF8& operator+=( unsigned ch ), because swig does not like wchar_t.
(on Linux, wchar_t is a unsigned int, on Windows a unsigned short, so always using a unsigned int do not create issues)
2017-12-08 17:57:53 +01:00
Wayne Stambaugh 7ca7d9078e Eeschema: fix potential symbol cache library name collisions.
If a schematic contains two symbols with the same name from different
libraries, the cache will contain the last symbol saved with that name.
Prepend the library nickname with the original schematic symbol library
nickname when saving the cache library to prevent name collisions.
2017-12-08 08:32:23 -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
Simon Richter 0dad728e86 Pass -DBOOST_TEST_DYN_LINK to all parts of test 2017-12-06 19:28:57 -05:00
Simon Richter 227afe77c0 Avoid C-style array member init (illegal in C++)
This is not part of the C++ language, and only supported in some compilers.
2017-12-06 19:28:17 -05:00
Wayne Stambaugh 8af9aa7574 Eeschema: allow for partial schematic loading.
With the implementation of the legacy schematic plugin, any I/O error
when parsing the schematics would prevent the entire schematic from
being loaded.  This change restores (somewhat) the previous behavior
where as long as the root schematic is loaded properly, then all of
the remaining sub-sheet will attempt to load.

Add GetError() method the SCH_PLUGIN object to allow for partial
schematic loading.

Check the error message contents when no exception was caught to warn
the user of any accumulated errors.

Fixes lp:1690644

https://bugs.launchpad.net/kicad/+bug/1690644
2017-12-06 19:11:09 -05:00
Bernhard Stegmaier 1e88695001 Fix initial sizing of 'Fields' table columns in component table view. 2017-12-06 07:30:44 -05:00
Seth Hillbrand 8b68a1736a Eeschema: Set "edited" flag on newly created sheets
Forces newly created sheet to be considered for saving when created.

Fixes: lp:1736054
* https://bugs.launchpad.net/kicad/+bug/1736054
2017-12-05 08:19:55 -05:00
Seth Hillbrand bdc1fb04be Eeschema: Correct wire/bus/entry connections
Fixes the connection display and dragging behavior of wires,
busses and their entries.

The implemented drag logic is:
-busses and bus-bus entries drag each other when connected at endpoints
-wires and wire-bus entries drag each other when connected at endpoints
-entries do not drag wires or busses when connected to wire middles
-wire-bus entries do not drag busses

The implemented connection logic is:
-bus-bus entries connect busses to busses but not wires
-wire-bus entries connect wires to busses but not wire to wires or
busses to busses
2017-12-04 15:19:46 -05:00
jean-pierre charras cd3122d8cd Refactor hierarch.cpp: remove old dead code and clean current code. 2017-12-04 12:46:13 +01:00
jean-pierre charras c0a539959e Fix a few Coverity warnings 2017-12-04 12:46:11 +01:00
Maciej Suminski 36a54aef21 Component Tree: fixed the sort order 2017-12-04 10:52:05 +01:00
Maciej Suminski 45bf919923 Restoring the previous performance of COMPONENT_TREE widget
It turns out the fastest way to update wxDataViewCtrl is to nuke the
model and rebuild it from scratch rather than via
ItemAdded()/ItemDeleted() update notifications.

Fixes: lp:1734773
* https://bugs.launchpad.net/kicad/+bug/1734773
2017-12-04 10:42:37 +01:00
Seth Hillbrand a240f88785 Eeschema: Remove wire under a placed component
CHANGE: In Eeschema, when placing a component directly over an existing
wire, the wire is automatically removed where it shorted pins.

This helps workflow in Eeschema, allowing one to quickly add components
to existing lines.

Fixes: lp:1678449
* https://bugs.launchpad.net/kicad/+bug/1678449
2017-12-03 18:42:57 -05:00
jean-pierre charras 6be5596620 Symbol Editor: fix a bug in global pin edit: changes were not always taken in account when saving the symbol in lib. 2017-12-03 11:50:50 +01:00
jean-pierre charras 3109343b96 Fix a compil issue with gcc 4.8.4
Fixes: lp:1735909
https://bugs.launchpad.net/kicad/+bug/1735909
2017-12-02 14:22:43 +01:00
Wayne Stambaugh 694ad93385 Move LIB_PART save code to legacy schematic plugin.
This is the last of the object save/load code that was not moved into
the SCH_LEGACY_PLUGIN object.  All schematic and library I/O is now
performed in the SCH_LEGACY_PLUGIN object and as been removed from the
schematic and library objects.

The old single symbol file format has been replaced with the normal
symbol library file format since there was no difference between them
except the SYMBOL token.  The SYMBOL token was no longer being read
since the introduction of the SCH_LEGACY_PLUGIN symbol library loader.

Update the Doxygen comments in all of the modified files.
2017-12-01 11:49:44 -05:00
Seth Hillbrand 76dbbfdf92 Eeschema: Clarify disambiuation of entry types
Replace the disambiguation menu entry for
wire2bus and bus2bus entries with their menu icon.
2017-12-01 08:19:52 +01:00
Seth Hillbrand 069448f20e Eeschema: Automatically manage junctions
CHANGE: eeschema automatically adds and removes junctions
when required by the schematic

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

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

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

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

Fixes: lp:1491052
* https://bugs.launchpad.net/kicad/+bug/1491052
2017-11-30 10:02:24 -05:00
Seth Hillbrand b5ec5f9a73 Eeschema: Moving BreakSegment into SCH_EDIT_FRAME
BreakSegment now breaks a known segment and BreakSegments
breaks all segments. This allows functions to break a
segment without needing to iterate through the whole list.
2017-11-30 10:02:15 -05:00
Seth Hillbrand e9a297de5b Eeschema: Removing DC dependencies 2017-11-30 10:02:05 -05:00
Seth Hillbrand bf32cc2555 Eeschema: Moving SchematicCleanup to SCH_EDIT_FRAME
SchematicCleanup function moved from SCH_SCREEN to
SCH_EDIT_FRAME to allow access to the undo stack as we
are changing the schematic.
2017-11-30 10:01:58 -05:00
Seth Hillbrand c6632bdded Eeschema: Remove zero-length wires in RemoveBacktracks
RemoveBacktracks call removes zero-length wires as well
2017-11-30 10:01:50 -05:00
Seth Hillbrand 692fecea9a Eeschema: don't cleanup unseen schematics
Changes to the schematic shouldn't be made
where the user isn't looking.  Removing the
cleanup in ERC and netlisting prevents
unintended consequences

CHANGE: ERC and Netlist calls do not modify schematic
2017-11-30 10:01:34 -05:00
Seth Hillbrand 0fd2405c00 Eeschema: Add two utility functions to sch_line
Add IsSameQuandrant and IsParallel functions
2017-11-30 10:01:26 -05:00
Seth Hillbrand d0b2f078fe Eeschema: Unify delete operations
DeleteItemsInList now shares the code for DeleteItem.
SCH_FRAME::DeleteItem removes junctions that are no longer needed.
2017-11-30 10:01:21 -05:00
Seth Hillbrand f8e0099ecc Eeschema: Add 'append' option to undo
Allows eeschema to add elements to previous undo commits,
permitting stacking of changes through multiple calls
2017-11-30 10:01:15 -05:00
Seth Hillbrand 7b1938d999 Eeschema: IsCorner check for layer match
SCH_LINE can represent a bus, wire or graphic line.  Checking
for the corner needs to distinguish between these types.

Fixes: lp:1635984
* https://bugs.launchpad.net/kicad/+bug/1635984
2017-11-29 08:54:00 -05:00
jean-pierre charras f992d144d9 Eeschema, LIB_PIN::SetNumber(): ensure spaces are replaced by _ and set modify flag on change.
Fixes: lp:1734187
https://bugs.launchpad.net/kicad/+bug/1734187
2017-11-28 21:02:29 +01:00
Wayne Stambaugh 0acdd9f02e Remove obsolete symbol library item load code. 2017-11-27 14:42:22 -05:00
Maciej Suminski 480b1c2592 Fixed a crash when _cvpcb.kiface is not available when opening cvpcb 2017-11-27 17:11:12 +01:00
Wayne Stambaugh b4e9d9b6f7 Symbol rescue dialog improvements.
Make the user prompt an HTML control for improved layout.

Fix some column title sizing issues.  This is not a complete fix but
it seems better than the default sizing done by wxWidgets.

Use symbol terminology instead of part and/or component.

Create trace string source files for a common place for them and their
Doxygen comments.
2017-11-26 18:14:10 -05:00
jean-pierre charras 6e728739bb Eeschema: multi part with empty value (~) generates incorrect netlist
Fixes: lp:1734453
https://bugs.launchpad.net/kicad/+bug/1734453
2017-11-26 10:51:14 +01:00
Wayne Stambaugh 84e360dd0d Symbol library table remapping improvements.
Don't back up schematic files unless the user requests a remap.

Back up all files that could be changed by a remap including the
schematic file(s), cache library, project file, and rescue library
files.

Use an HTML control instead of a static text control for improved layout
of the user remap prompt.

Improve the user prompt in the remap dialog to make it clear that changes
will be made to project files.
2017-11-24 11:43:42 -05:00
Maciej Suminski 1d48fd28e3 Generate safe alias names in case of name collisions
Duplicated aliases were given " (copy x)" suffix. There are two
problems: aliases cannot contain spaces and the string was translatable
which could create more issues. Now duplicated aliases receive "_x" suffix.
2017-11-24 17:39:58 +01:00
jean-pierre charras 37f68f824b minor cosmetic enhancement: menu "Edit Components to Symbol Library Links": add specific icon. 2017-11-24 10:19:23 +01:00
jean-pierre charras cd9d81d720 dialog_edit_components_libid: add a tool to remap orphan components.
Orphan components are components that have a link (lib_id) pointing to a non existent symbol in any loaded libraries.
2017-11-23 19:49:53 +01:00
Wayne Stambaugh b82bd8e0c5 Fix symbol names with illegal library ID characters.
Change the legacy schematic plugin to preserve illegal LIB_ID characters
when load schematics prior to version 4.

Check for illegal LIB_ID symbol names during project rescue.  Rename and
rescue any symbols with illegal LIB_ID names.

Add static methods to LIB_ID object for testing for and fixing names
with illegal characters so there is uniform code for doing so.

Update the Eagle plugin symbol loader to fix symbol names using the new
LIB_ID fix illegal names method.

Fixes lp:1732236

https://bugs.launchpad.net/kicad/+bug/1732236
2017-11-23 10:52:55 -05:00
jean-pierre charras d52fd5769d Show a tooltip if dialog_choose_component has no symbol selected. 2017-11-23 13:24:02 +01:00
jean-pierre charras 1aff677562 Eeschema, getpart.cpp: fix incorrect call to lib browser
(was not called if a symbol was not previously selected)
2017-11-23 12:09:35 +01:00
jean-pierre charras fea9d121b7 dialog_edit_components_libid: UI enhancements, and use viewlib for LIB_ID selection 2017-11-23 10:40:14 +01:00
jean-pierre charras c3015f4671 Fix incorrect LIB_ID exported by viewlib when used as component chooser
(was not to the new format libname::symbol_name)
2017-11-23 10:40:13 +01:00
Seth Hillbrand faadbea10e Eeschema: Select component connections in drag
Dragging a full line that is connected to a component
now drags the component as part of the block, maintaining
connections.

Fixes: lp:1167714
* https://bugs.launchpad.net/kicad/+bug/1167714
2017-11-22 12:01:58 -05:00
jean-pierre charras 76d08c8bd2 UI fixes and enhancements in dialog_edit_components_libid. 2017-11-22 17:54:17 +01:00
jean-pierre charras 4d0d56fbd7 Fix incorrect handling of the last component in the component list. 2017-11-22 17:54:16 +01:00
Maciej Suminski 6b74f8ef48 Library Editor: fixed an assert after removing libraries with Symbol Library Table dialog 2017-11-22 14:15:51 +01:00
Maciej Suminski d76f7d7bd2 Library Editor: fixed an assert after canceling add library action 2017-11-22 14:03:01 +01:00
Maciej Suminski baec127852 Library Editor: show also empty libraries 2017-11-22 13:40:14 +01:00
Maciej Suminski aaabf8ab78 Library Editor: fixed a crash when creating a new library with existing file 2017-11-22 13:40:14 +01:00
Maciej Suminski 8b0041bf9a Library Editor: progress dialog when loading libraries 2017-11-22 13:40:14 +01:00
Maciej Suminski 1625129054 Library Editor: removed duplicated 'Duplicate Block' (doh..) 2017-11-21 23:40:21 +01:00
Maciej Suminski e25a1feb25 Component Tree: restore expanded nodes after search query is cancelled 2017-11-21 23:18:55 +01:00
Maciej Suminski 4a942a9810 Library Editor: do not change background for the active part/library 2017-11-21 23:18:55 +01:00
Maciej Suminski ed059383c7 Library Editor: removed library actions from the part context menu 2017-11-21 23:18:55 +01:00
Maciej Suminski 0b7ab40288 Updated cut/copy/paste toolbar icons
Removed cut & copy toolbar icons in the schematic editor, as they
were inaccessible. One cannot have an item selected and move the
mouse outside the canvas area due to autopanning.

Added paste icon to the library editor.
2017-11-21 23:18:55 +01:00
Maciej Suminski 256276cf1c Library Editor: copy/cut/paste for graphical items 2017-11-21 23:18:55 +01:00
Maciej Suminski 4fe06656a6 Minor refactor in LIB_EDIT_FRAME::Process_Special_Functions()
Shortened 'screen->m_BlockLocate' to 'block'.
2017-11-21 23:18:55 +01:00
Maciej Suminski 6b87c2d6b1 Library Editor: faster filtering on Windows
Preventing redraw by freezing wxDataViewTreeCtrl significantly
improves the performance.
2017-11-21 23:18:55 +01:00
Maciej Suminski e0e4e5f1be Library Manager: alternative way to manage dynamic fixes
Tree nodes now have an additional field 'InTree' to determine
if the view is aware of its existence. This way, there is no need
to rebuild the data structures from scratch when they need to be
filtered.
2017-11-21 23:18:55 +01:00
Maciej Suminski db4bd0c2db Library Editor: fixed dynamic updates
Duplicate entries were caused by multiple model assignment done by
CMP_TREE_MODEL_ADAPTER_BASE::AttachTo().
2017-11-21 23:18:55 +01:00
Maciej Suminski 891cf783fb Library Editor: Windows fixes 2017-11-21 23:18:55 +01:00
Maciej Suminski d3d2770093 Library Editor: fixed library manager synchronization to sym-lib-table 2017-11-21 23:18:55 +01:00
Maciej Suminski b229286313 Library Editor: fixed a crash after a library is removed 2017-11-21 23:18:55 +01:00
Maciej Suminski 6400e31d5b Library Editor: more coherent icons for part import/export 2017-11-21 23:18:55 +01:00
Maciej Suminski 8dabcc0125 Fixed signed vs unsigned integer comparisons 2017-11-21 23:18:55 +01:00
Maciej Suminski 658dd362cd Library Manager: clear the deleted part buffer when original file is saved 2017-11-21 23:18:55 +01:00
Maciej Suminski 86f71a9eb4 Library Editor: notify is library is read-only 2017-11-21 23:18:55 +01:00
Maciej Suminski d2d3680774 Library Editor: more descriptive symbol table picker dialog 2017-11-21 23:18:55 +01:00
Maciej Suminski 50dc0ffd9d libedit: Call OnModify after a pin has been moved
Library Editor updates its working copy of the edited part every time
it is modified. If LIB_EDIT_FRAME::PlacePin() calls OnModify() too early,
the working copy does not include the last change.
2017-11-21 23:18:55 +01:00
Maciej Suminski 95754632c2 Library Editor: renamed 'component' to 'part' 2017-11-21 23:18:55 +01:00
Maciej Suminski a4f475c97d Library Editor: icon improvements
- new icons: 'save part', 'add library'
- added a toolbar icon for 'add library'
- made icons on toolbar and menu consistent
2017-11-21 23:18:55 +01:00
Maciej Suminski 44117a7d5e Library Editor: added a hotkey to save a component 2017-11-21 23:18:55 +01:00
Maciej Suminski d900e89382 Library Editor: fixed a bug when multiple components were shown as active 2017-11-21 23:18:55 +01:00
Maciej Suminski ba4515885b Library Editor: select part in the widget component on create/paste/duplicate component 2017-11-21 23:18:55 +01:00
Maciej Suminski 7d45d8b23c Library Editor: made the component tree pane resizable 2017-11-21 23:18:55 +01:00
Maciej Suminski 076633bb5e Library Editor: disable 'save component' for read-only libraries 2017-11-21 23:18:55 +01:00
Maciej Suminski 33242fd111 Library Manager: do not clear modified flag on 'save library as' action 2017-11-21 23:18:55 +01:00
Maciej Suminski df8dc01e8d Library Manager & Editor: comments 2017-11-21 23:18:55 +01:00
Tomasz Włostowski 7fc1e1d53c Library Editor: component cut/copy/paste/duplicate 2017-11-21 23:18:55 +01:00
Maciej Suminski 2ed19668cd Eeschema: removed protos.h
Contained duplicated function declarations with invalid comments.
2017-11-21 23:18:55 +01:00
Maciej Suminski 8f1897adfd minor refactor 2017-11-21 23:18:55 +01:00
Maciej Suminski 3ace948197 block_libedit.cpp: minor refactor
Replaced numerous GetScreen()->m_BlockLocate with a shorter reference.
2017-11-21 23:18:55 +01:00
Tomasz Włostowski 72de4e1857 libedit: field edition should be undoable 2017-11-21 23:18:55 +01:00
Maciej Suminski f2257ccccc Eeschema: created a header for list operations 2017-11-21 23:18:55 +01:00
Maciej Suminski 03c5620efe Library Editor: removed 'load component' hot key 2017-11-21 23:18:55 +01:00
Maciej Suminski 73ec145c33 Library Manager: wrapped risky calls with try..catch 2017-11-21 23:18:55 +01:00
Maciej Suminski fb4875c681 Library Editor: refactored code for creating backup files 2017-11-21 23:18:55 +01:00
Maciej Suminski f6f1dff9d0 Library Editor: enable part buffering for faster save, better 'save as' implementation
Previous 'save as' implementation simply copied the original file, so
the buffered changes were not save.
2017-11-21 23:18:55 +01:00
Maciej Suminski 9fcaa83b7d Library Manager: fixed a memleak in LIB_EDIT_FRAME::OnCreateNewPart() 2017-11-21 23:18:55 +01:00
Maciej Suminski a2b6c8e20a Library Manager: select library when none is set for import/create new part 2017-11-21 23:18:55 +01:00
Maciej Suminski bb83b73f76 Library Editor: mark the current library/part with a different color 2017-11-21 23:18:55 +01:00
Maciej Suminski dfcd42f5ef Library Editor: save libraries added in the editor to sym-lib-tables 2017-11-21 23:18:55 +01:00
Maciej Suminski 26304c54ed Library Editor: fixed update UI event handlers 2017-11-21 23:18:55 +01:00
Maciej Suminski 24ddbbaf25 Library Editor: display a list of libraries to save on close 2017-11-21 23:18:55 +01:00
Maciej Suminski 2c20a10242 Removed friendship in LIB_PART and LIB_ALIAS classes.
It is not required and may a source of unnecessary temptation. There is
no place for friendship in rough C++ world.
2017-11-21 23:18:55 +01:00
Maciej Suminski aa81f5b98d Removed LIB_PART::SetLibId()
To avoid potential incoherency, LIB_ID is defined by setting the part
name and library.
2017-11-21 23:18:55 +01:00
Maciej Suminski 445ac50588 Keep LIB_ID and LIB_PART name/library in sync
Updates LIB_ID::LibItemName field when a part is renamed and LIB_PART
name when a new LIB_ID is set.

Similarly, LIB_ID::LibNickName field is updated when a library set, but
there is no easy way to assign library when LIB_ID::LibNickName is
modified.
2017-11-21 23:18:55 +01:00
Maciej Suminski 4c4f5ae962 Unified way of setting LIB_PART name
LIB_PART name is stored in three places that might be changed
independently:
- the first LIB_ALIAS in m_aliases
- LIB_FIELD with VALUE ID
- m_name wxString field

This is potentially leads to an incoherent LIB_PART state. To prevent
this, all fields are changed using only one method: LIB_PART::SetName().

LIB_PART::m_name has been removed as the same information is available
in two other variables.
2017-11-21 23:18:55 +01:00
Maciej Suminski 3589244ff3 Library Editor field edit dialog takes data from LIB_MANAGER 2017-11-21 23:18:55 +01:00
Maciej Suminski 5c61b61c27 Improved synchronization algorithm for LIB_MANAGER<->COMPONENT_TREE 2017-11-21 23:18:55 +01:00
Maciej Suminski a789b735e9 Library Manager: logic 2017-11-21 23:18:55 +01:00
Maciej Suminski 769c6a8d51 Library Manager: user interface 2017-11-21 23:18:55 +01:00
Maciej Suminski d29e115804 CMP_TREE_MODEL: set LibID for library nodes
LibID needs to be set for libraries as well to be able to tell which
library has been selected in the component tree widget.
2017-11-21 23:18:55 +01:00
Maciej Suminski 0d190639f1 Extracted CMP_TREE_MODEL_ADAPTER_BASE class 2017-11-21 23:18:55 +01:00
Maciej Suminski 3288a5f8b8 Right-click context menus for COMPONENT_TREE widget 2017-11-21 23:18:55 +01:00
Maciej Suminski 42220579df Const modifiers 2017-11-21 23:18:55 +01:00
Maciej Suminski 3bdcdd808b Fix minor warnings 2017-11-21 23:18:55 +01:00
jean-pierre charras 945325d63a Eeschema: fix incorrect display of pin number in ERC messages and marquers. 2017-11-21 18:39:59 +01:00
jean-pierre charras 656d4d0dff dialog_edit_components_libid: shows orphan components (components with no symbol found in library) 2017-11-21 18:06:37 +01:00
Wayne Stambaugh 8de70f3dd0 Fix symbol library viewer crash.
Handle exception in best zoom method when a symbol could not be loaded
from the symbol library table.  This was triggered by an empty symbol
library table but could be triggered by any exception thrown while
loading the symbol.

Fixes lp:1733111

https://bugs.launchpad.net/kicad/+bug/1733111
2017-11-21 09:30:56 -05:00
Oliver e25a777c41 Add progress dialog when loading symbol libraries
- Provides UX feedback for user
2017-11-21 08:18:51 -05:00
Oliver f85ce87e44 Toggle LIB_TABLE_ROW enabled/disabled in grid editor
- Checkbox editor for enabled / disabled status
2017-11-21 08:18:17 -05:00
Oliver 7cdb78e852 Added "enabled" parameter for LIB_TABLE_ROW
- Read and write from lib-table working
2017-11-21 08:18:06 -05:00
jean-pierre charras f17f604072 Add warning message in dialog_edit_components_libid 2017-11-21 13:09:13 +01:00
jean-pierre charras 8507ea45fc Add a dialog to edit/change components LIB_ID inside a schematic.
This is useful for instance after moving a symbol from a lib to an other lib.
2017-11-21 11:52:40 +01:00
Maciej Suminski 422b7dd551 Removed declaration of non-existent method (SCH_SHEET::Load()) 2017-11-20 09:16:13 +01:00
Julius Schmidt 375a4e28d6 fix MANDATORY_FIELDS comparisons (need to exclude -1) 2017-11-20 08:48:01 +01:00
Wayne Stambaugh 8b2b1381c4 Fix symbol library table editor plugin type selection bug.
Remove the placeholders for the upcoming s-expression schematic and
symbol library file format plugin type.  The lack of a valid plugin
implementation was causing an undefined plugin type string in the
plugin type selection cell when new rows were added to the table.

Fixes lp:1733116

https://bugs.launchpad.net/kicad/+bug/1733116
2017-11-19 16:53:31 -05:00
Maciej Suminski 33cf082c41 Fixed library path resolution in Spice netlist exporter
SEARCH_STACK is a deprecated method for getting the list of paths where
one could look for a file. Instead it tries the project path and
environmental variables.
2017-11-19 11:38:57 +01:00
jean-pierre charras 31083a4060 Better menu item label and tool tip.
Modify incorrect menu label.

Fixes: lp:1733113
https://bugs.launchpad.net/kicad/+bug/1733113
2017-11-19 10:49:28 +01:00
jean-pierre charras 06d0e593ba dialog_sym_lib_table: gives an existing plugin type when creating a new entry in symbol library table
It avoids a strange (for an user) error message on creation.
2017-11-19 10:04:38 +01:00
Maciej Suminski 4c623daa1d Added 'Browse Library' button to Symbol Library Table dialog
NEW: File browser for the Symbol Library Table dialog
2017-11-18 20:05:54 +01:00
Maciej Suminski 759359f602 Moved path normalization functions to a separate file
Normalizing paths to environmental variables might be useful in
many places, therefore it is better to keep them accessible.
2017-11-18 20:05:08 +01:00
Wayne Stambaugh a0473614b5 Remove all schematic object load and save code.
All of the schematic object load and save code is implemented in the
legacy schematic plugin so it is no longer required.

Remove unused file with old schematic file loader.

Doxygen comment cleaning.
2017-11-18 08:53:13 -05:00
Wayne Stambaugh e97ce6ee4f Use legacy schematic plugin for loading schematics in all code paths.
Use the legacy plugin schematic loader in the sheet edit and append
schematic code paths.

Check for fully qualified LIB_ID objects (must have library nickname)
when loading existing schematics when edit sheets.

Rewrite append schematic feature to handle import issues rather than
change the name and file name of all of the sheets in the imported
schematic.  This includes the following:
- Load the schematic into a temporary SCH_SHEET object.
- Make sure the imported schematic does not cause any hierarchy
  recursion issues.
- Verify the imported schematic uses fully qualified #LIB_ID objects
  (symbol library table).
- Check to see if any symbol libraries need to be added to the current
  project's symbol library table.  This includes:
- Check if the symbol library already exists in the project or global
  symbol library table.
- Convert symbol library URLS that use the ${KIPRJMOD} environment
  variable to absolute paths.  ${KIPRJMOD} will not be the same for
  this project.
- Check for duplicate symbol library nicknames and change the new symbol
  library nickname to prevent library name clashes.
- Update all schematic symbol LIB_ID object library nicknames when the
  library nickname was changed to prevent clashes.
- Check for duplicate sheet names which is illegal and automatically
  rename any duplicate sheets in the imported schematic.
- Clear all of the annotation in the imported schematic to prevent
  clashes.
- Append the objects from the temporary sheet to the current page.
- Replace any duplicate time stamps.
- Refresh the symbol library links.

Add support code to SCH_SCREEN object to assist with schematic import.

Doxygen comment cleaning.

Fixes lp:1731760

https://bugs.launchpad.net/kicad/+bug/1731760
2017-11-18 08:10:58 -05:00
Seth Hillbrand b6884d3423 Eeschema: Improve wire merging
CHANGED: wires now merge along the full length rather than just
endpoints.  Wires also merge at oblique angles when aligned.
2017-11-17 17:44:18 +01:00
Seth Hillbrand d24c88f254 Eeschema: Show abbreviated units
CHANGED: Edit Line Style shows "in" and "mm" instead of full word
2017-11-17 08:20:00 +01:00
jean-pierre charras a3c4b508f8 Fix a very minor issue in eeschema when plotting in SVG format. 2017-11-16 19:49:07 +01:00
jean-pierre charras bdc6a5950b rename plot_common.h to class_plotter.h, a better name, consistent with other class definitions. 2017-11-16 15:53:30 +01:00
Seth Hillbrand af8b71ac87 Eeschema: Fix bug in block selector
The block selector needs to add all connected items
to the block.  Lines marked skip should not affect
the next item tested.
2017-11-16 08:30:39 +01:00
jean-pierre charras df6d005fd3 A few cosmetic enhancements in dialog_edit_line_style 2017-11-15 20:28:44 +01:00
Wayne Stambaugh 41a9007b6d Fix assertion in symbol library remap dialog.
Do not attempt to normalize environment variables that are not valid
paths, paths that do not exist, or paths that the user does not have
read access to.

Fixes lp:1731655

https://bugs.launchpad.net/kicad/+bug/1731655
2017-11-15 12:24:51 -05:00
jean-pierre charras eaaa85c2c0 Make a few sentences more easy to translate. 2017-11-15 15:38:45 +01:00
jean-pierre charras 0517f78085 eeschema: store line style using a more readable format 2017-11-15 14:08:27 +01:00
Seth Hillbrand 634fc80916 Eeschema: Update line syle colorbox
Line style colorbox is updated to follow Kicad colorbox
convention.  The alpha channel is also forced to opaque.
2017-11-15 08:10:51 +01:00
Seth Hillbrand 7c0a7f9f7b Adds plot functionality to Eeschema line formats
Dotted, dashed and dash-dot lines are provided in
HPGL, PDF, PS and SVG plot outputs along with line
width and color formatting.

DXF format does not currently provide any dashed
line functionality

A bug in HPGL plotted is corrected.  Previous HPGL
dashed line commands were incorrect, plotting all
lines as solid.
2017-11-15 08:10:51 +01:00
Seth Hillbrand b576189a00 Eeschema: Adding line styling options
NEW: Adds support in eeschema for changing the default line style,
width and color on a case-by-case basis.

CHANGED: "Wire" lines now optionally include data on the line style,
width and color if they differ from the default.

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

Fixes: lp:1405026
* https://bugs.launchpad.net/kicad/+bug/1405026
2017-11-15 08:10:51 +01:00
Wayne Stambaugh d98fc85a83 Improve assert message in symbol table remap dialog.
Fixes lp:1731655

https://bugs.launchpad.net/kicad/+bug/1731655
2017-11-13 14:17:49 -05:00
Wayne Stambaugh 7e7d3004fb Fix UI string typo in rescue dialog error message. 2017-11-12 11:38:31 -05:00
Maciej Suminski 75d9a18fc0 VIEW_LIB_FRAME: catch exceptions for invalid libraries 2017-11-12 14:36:20 +01:00
Wayne Stambaugh 620251de69 Fix UI string typo. 2017-11-12 07:38:39 -05:00
Wayne Stambaugh 652b969193 GTK+ file dialog wildcard improvements.
The GTK+ file dialog is case sensitive however it does support regular
expressions.  Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.

A note to developers: make sure to add a file extension when setting
when setting the default file argument.  If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.

There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.

Fixes lp:1720542

https://bugs.launchpad.net/kicad/+bug/1720542
2017-11-11 19:32:26 -05:00
Maciej Suminski 61578f9da8 SYMBOL_LIB_TABLE: replaced wxASSERTs with wxCHECKs
The replaced wxASSERTs notify the developer that a variable is a
null pointer, but continue code execution and lead to a crash.
Instead, they are changed to wxCHECKs, that give the same type
of notification, but return from a function before the crash
happens.
2017-11-12 01:10:11 +01:00
Baranovskiy Konstantin 1412296398 Fix field align settings in dialogs of Eeschema. 2017-11-11 19:48:28 +01:00
Seth Hillbrand 0017c701c7 Eeschema: Draw junctions last
Places junctions on the schematic after all other items
to avoid visual clutter when a pin overlaps a junction.

Fixes lp:1582343

https://bugs.launchpad.net/kicad/+bug/1582343
2017-11-11 13:41:52 -05:00
Wayne Stambaugh 5181c0ac75 Minor symbol library table edit dialog fix.
A copy and paste error was causing to footprint library table file name
and path to be shown in the symbol library table edit dialog.  Factor
out code in PROJECT::FootprintLibTblName() to PROJECT::libTableName()
to handle both symbol and footprint library table names and create a
new PROJECT::SymbolLibTableName() method to fix the path and file name
in the symbol library table edit dialog.
2017-11-11 10:33:06 -05:00
jean-pierre charras 4af85239ba Internationalize dialog_symbol_remap_base 2017-11-11 11:35:06 +01:00
Wayne Stambaugh 9f0b2e4bb0 Fix project symbol library table load bug in Eagle plugin.
Remove functional code inadvertently added to wxASSERT macro in symbol
library table loader.
2017-11-10 17:55:37 -05:00
Baranovskiy Konstantin 0b34d09bc0 Fix double "choose to" in symbol remap dialog. 2017-11-10 07:31:27 -05:00
Wayne Stambaugh 610ff7485f Fix more bugs in the schematic symbol rescuer.
In the rare case when something goes wrong with the symbol library
table remapping, do not attempt to rescue symbols that are neither
in the cache nor in any of the libraries.

The legacy rescue library code overwrote the existing library so
previous rescues would get lost.  If the rescue library exists,
copy it's contents into the new rescue library before adding the
new rescued symbols so no previously rescued symbols are lost.

Fix a null pointer bug in the symbol library editor when no symbol
is loaded.

Set LIB_ID item name to name passed to LIB_PART ctor.

Copy LIB_ID in LIB_PART copy ctor.
2017-11-09 21:24:43 -05:00
Wayne Stambaugh 6d63873128 Fix a bug in the schematic symbol rescuer.
If a library disappears all together or a symbol name is changed, force
the rescuer to add it to the rescue library.  The current rescue code
only looked for differences if they existed between libraries.  This was
causing symbols to be unceremoniously dumped from the symbol library
table remapping.

Don't search for cache rescue candidates in the symbol library table
rescuer.
2017-11-09 18:50:23 -05:00
Wayne Stambaugh a2e7e7aed4 Clear symbol library list from project file after remapping.
The old symbol library list save/load code does not get called in the
schematic project file configuration code.  Use the LibNamesAndPaths
static function from the PART_LIBS object.

Bump schematic file version from 3 to 4 which represents the switch to
the library table symbol linking which is incompatible with all previous
versions.

Refresh the schematic after running remapping dialog manually.
2017-11-09 18:50:23 -05:00
Wayne Stambaugh 44d81e4005 Minor fixes broken by symbol library table changes.
Add missing CMP_TREE_NODE_LIB_ID type that was inadvertently deleted by
the symbol library table implementation that broke the preselected symbol
tree expansion and highlighting.

Changed CMP_TREE_NODE_LIB_ID type from ALIAS to LIBID for more accurate
description.

Use LIB_ID in COMPONENT_SELECTION object instead of strings of the
library and symbol names.
2017-11-09 18:50:22 -05:00
Wayne Stambaugh 168bf5e4b0 Symbol library archive bug fixes.
Move FindAlias() inside a try/catch block as is can throw an exception.

Don't abort adding symbols to library when a symbol cannot be found in
the symbol library table or the cache library.  Instead, queue up error
messages and display them after attempting to add all of the symbols.

Always save the library file even if some of the symbols could not be
archived.

Catch IO_ERRORs in SCH_COMPONENT resolve to prevent unhandled exceptions
further up the stack.
2017-11-09 18:50:22 -05:00
Wayne Stambaugh 56d73f837d Fix build error caused by rebasing against commit 5eb56dd8. 2017-11-09 18:50:21 -05:00
Wayne Stambaugh 8fd89c881d Final symbol library table changes before merge.
Remove all symbol libraries from the project file after remapping to
prevent symbols that should be loaded from the cache being loaded from
a library further up the search order.  Save the project file to clear
all of the libraries so they never get reloaded again.

Remove the symbol library management dialog and menu entries.

Rename the symbol library table dialog menu entry.

Remove all symbol libraries from default project file to prevent clashes
with the cache library.

Fix illegal symbol naming in Eagle plugin.
2017-11-09 18:50:21 -05:00
Wayne Stambaugh 8d995f48de Update Eagle plugin to use symbol library table. 2017-11-09 18:50:21 -05:00
Wayne Stambaugh c1f7c1778a Revise symbol rescuer to support symbol library table.
Refactor rescue objects so that they can support derivation.

Factor out legacy rescuer code to perform legacy project rescues.

Create new symbol library table rescuer for rescuing symbol library table
based projects.

Perform the correct rescue type on project load.

Add symbol library table remapping support to the tools menu for run on
demand as applicable.

Add flag to SCH_SCREENS::UpdateSymbolLinks() to allow forcing the symbol
link updates when the library modification hash has not changed.
2017-11-09 18:50:20 -05:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
Wayne Stambaugh 329fc18732 Convert component chooser dialog over to use symbol library table.
Change all of the component tree helper objects to use LIB_IDs instead of
LIB_ALIAS pointers.  LIB_ALIAS pointers are dangerous to use because they
can be deleted in the symbol library editor while the component chooser
dialog has copies of them.  With LIB_IDs, the LIB_ALIAS pointer is found
on demand and can be guaranteed to be valid.

Update the chooser dialog to load the symbol library table instead of the
libraries defined in the project file and return a LIB_ID instead of a
LIB_ALIAS pointer.

Modify SCH_BASE_FRAME::SelectComponentFromLibrary() to handle the LIB_IDs
returned from the component chooser dialog.
2017-11-09 18:50:18 -05:00
Wayne Stambaugh 81e8d8fd89 Symbol library table remapping fixes.
Use GetPath() instead of GetFullPath() when initializing environment
variable table entries KICAD_SYMBOL_DIR and KICAD_PTEMPALTE due to
unexpected trailing path separator which was causing find libraries
by URI to fail.

Don't create a project symbol library table when there are no libraries
not found in the global symbol library table.

Don't add non-existent libraries to project symbol library table.

Clear symbol library table when loading a new schematic.

Minor remapping status message improvements.
2017-11-09 18:50:18 -05:00
Wayne Stambaugh 0cf2df51c6 Convert symbol library viewer over to symbol library table.
Remove all instances of PART_LIBS and replace them with SYMBOL_LIB_TABLE
except for the CMP_TREE_MODEL_ADAPTER which requires updating as well.

Return the selected symbol using the LIB_NICKNAME:SYMBOL_NAME format when
viewer is launched as modal.

Add code to SYMBOL_LIB_TABLE object to allow enumerating symbol library
power symbols only.

Add a non-const version of LIB_TABLE::findRow().

Remove redundant information from Doxygen comments.
2017-11-09 18:50:17 -05:00
Wayne Stambaugh 96c3d5ff21 Enable symbol library table remapping.
Check the if the schematic being loaded has been remapped (no symbol
library table nicknames defined) and remap accordingly.

Fix issues when resolving the library symbol links in the schematic
symbols.

Add cache library fallback when resolving symbols that cannot be
remapped.

Add remap complete message to remap dialog.

Add HasLibrary() helper to LIB_TABLE_BASE.

Fix issues when loading library symbols using symbol library table.

Add hashing function to symbol library table.

Improve the symbol panel message to warn user when cache library is
used to resolve symbol.
2017-11-09 18:50:17 -05:00
Maciej Suminski 636298b5dc Fixed 2 warnings in eeschema/sch_plugin.cpp
- removed an implicit conversion of NULL to boolean false
- removed an unused variant of not_implemented() function
2017-11-10 00:33:26 +01:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Marvin Schmidt a155a5c780 Remove some dead code 2017-11-09 19:52:17 +01:00
Marvin Schmidt 7daaa3e9d9 Remove unused #define 2017-11-09 19:52:17 +01:00
Maciej Suminski cd21218c34 Fixed a memleak in libedit undo buffer, minor code cleanup
In LIB_EDIT_FRAME::GetComponentFrom{Undo,Redo}List() methods, the
PICKED_ITEMS_LIST object which was retrieved from undo/redo list has not
been destroyed.

Rewritten SCH_SCREEN::ClearUndoORRedoList() to be easier to read.

Minor whitespace formatting.
2017-11-08 17:32:59 +01:00
Wayne Stambaugh d5290bdfe0 Fix malformed symbol libraries when importing Eagle schematics.
KiCad library symbol text objects cannot contain carriage returns and/or
line feeds which isn't the case with Eagle symbol libraries.  Otherwise,
the library file will be corrupt when it is saved.  Fixing this in the
legacy plugin would break the current file format so just replace them
with underscores.  Ideally these text objects should be broken into
multiple text objects but the current plugin design doesn't support
this.
2017-11-04 21:36:47 -04:00
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
jean-pierre charras 08a9dc01c5 Fix minor coding style issues 2017-11-03 10:22:34 +01:00
Maciej Suminski 5eb56dd8b0 Coverity fixes
CIDs:
102571
168696
168701
168704
168706
168708
168710
168713
168716
168717
2017-11-01 10:24:26 +01:00
Wayne Stambaugh 83cf726cd6 Fix crash when no symbol libraries are found.
Remove adding the power symbol library when no libraries are specified
in the project file to prevent unexpected missing library dialog.

Only show progress dialog if there are actually libraries to load.

Do not call wxWindow::Destroy().  The dialog is created on the stack and
will be destroyed properly in the wxWindow dtor.

Fixes lp:1728648

https://bugs.launchpad.net/kicad/+bug/1728648
2017-10-31 18:37:44 -04:00
Maciej Suminski a6f84051e9 Fixed a memory leak in Spice probe 2017-10-29 00:54:22 +02:00
Maciej Suminski 2b052265b2 Added library contents preview to Spice model editor dialog 2017-10-27 17:10:37 +02:00
Maciej Suminski 162d445ce4 Spice Model Editor upgrades
- set a proper title for the dialog
- changed the library parser delimiters to all whitespaces
- sorts the model list in the alphabetical order
- one tab to select subcircuit and semiconductor models
- model type is automatically selected
2017-10-27 16:53:04 +02:00
Maciej Suminski acbe30af51 Improved Spice library parser
Now the parser filters out models placed inside .subckt sections.
2017-10-27 16:53:04 +02:00
jean-pierre charras 302f234264 Eeschema: fix an issue: doc never displayed if a non English language is used due to a bad way to retrieve the DATASHEET field. 2017-10-24 09:47:23 +02:00
Kristoffer Ödmark a562525ec9 Use schematic symbol field to show documentation link.
This instead of using the library alias property. But to not break any
library. When adding new components to the schematic, copy the value
from the library into the Field variable only if the field variable would
otherwise be empty.

This way, the context menu for showing the docs is more understandable
for users, and is also changeable from the schematic without having to
modify the actual libraries.

Fixed: lp:1723104
2017-10-23 16:58:56 -04:00
jean-pierre charras 7418deb454 Pcbnew: fix issues with 360 deg angle arcs.
Fixes: lp:1725943
https://bugs.launchpad.net/kicad/+bug/1725943
2017-10-23 15:35:03 +02:00
jean-pierre charras 772dc2f24a Fix compil warnings 2017-10-20 13:48:36 +02:00
Maciej Suminski 59394fedbf Eeschema Eagle Import: fixed global net label rotation 2017-10-20 09:34:33 +02:00
Maciej Suminski 0ed7483868 Eeschema Eagle Import: support UTF-8 for fields 2017-10-20 09:34:33 +02:00
Maciej Suminski b77ba486ec Eeschema Eagle Import: fixed name and reference fields placement 2017-10-20 09:34:33 +02:00
Maciej Suminski 62156b9b69 Eeschema Eagle Import: refactored common code for setting text attributes 2017-10-20 09:34:33 +02:00
Maciej Suminski ee8012a5cc Eagle import plugin: Code clean-up and formatting 2017-10-20 09:34:33 +02:00
Maciej Suminski 25b8111341 Modified Eagle import plugins to use nanometers as the internal unit 2017-10-20 09:34:33 +02:00
Maciej Suminski 7f697de432 Handle empty texts correctly 2017-10-20 09:34:33 +02:00
Maciej Suminski 87465002c3 Eeschema Eagle Import: changed fixNetName() to escapeName() 2017-10-20 09:34:33 +02:00
Russell Oliver 82b1e3c790 Eagle Import: Handle muli-pad pins. Adds overlapping pins in the symbol definition to ensure that electrical connections are made to each pad on the footprint. 2017-10-20 09:34:33 +02:00
Maciej Suminski ce145373e4 Change the Eagle schematic import plugin license to GPLv3+ 2017-10-20 09:34:33 +02:00
Maciej Suminski 444811ccfe Added exception handler for SCH_EDIT_FRAME::ImportFile 2017-10-20 09:34:32 +02:00
Maciej Suminski d617021d98 Added 'Import Non-KiCad Schematic' 2017-10-20 09:34:32 +02:00
Maciej Suminski 6b44d12bd8 Revert modifications to SCH_EDIT_FRAME::OpenProjectFiles() 2017-10-20 09:34:32 +02:00
Maciej Suminski e75d76d1a8 Enable LOCALE_IO in Eagle schematic import plugin 2017-10-20 09:34:32 +02:00
Maciej Suminski ce11e9a264 Eeschema Eagle Import: Changed convertTextSize() to ETEXT::ConvertSize() 2017-10-20 09:34:32 +02:00
Russell Oliver 2a0a999350 Eeschema Eagle Import: Code clean-up and formatting 2017-10-20 09:34:32 +02:00
Maciej Suminski 630a883f80 Update Eagle schematic import plugin after long pin/pad name patch 2017-10-20 09:34:32 +02:00
Russell Oliver 3b0855d204 Eagle Project Import: Code cleanup and documentation.
- Also makes the project and file import functions filetype dependent.
- The change from IO_MGR::KICAD to IO_MGR::KICAD_SEXP removes a conflict from a compile definition for KICAD when compiling kicad/import_project.cpp
2017-10-20 08:58:40 +02:00
Russell Oliver c3b0fca922 Eeschema Eagle Import: Fix graphics on multi-unit symbols -- sets correct gate for arcs and polylines from eagle symbol wires. 2017-10-20 08:58:40 +02:00
Russell Oliver 869743d573 Kicad Eagle Project Import Improvements. -- schematic and board files are both visible in file selection dialog. -- Allows for the selection of either the board or schematic file. -- silently fails on not detecting the corrosponding board or schematic file. -- all new kicad files are generated in new project directory -- Silently read netlist without generating annotation warnings which synchronises timestamps and paths based on given eagle references, otherwise renumbering schematic references will break links accross schematic and pcbnew. 2017-10-20 08:58:40 +02:00
Russell Oliver 3145829b77 Fix compiler redefined warnings for FMT_IU 2017-10-20 08:58:40 +02:00
Russell Oliver a8fa64f158 Eeschema Eagle Import: Shift convertTextSize to common eagle parser. 2017-10-20 08:38:42 +02:00
Russell Oliver 433aa653fe Kicad: Add Project import function. -- add menu entry -- add ImportFile kiway function -- expose functions for creating/reading netlist -- add example eagle boad file as well 2017-10-20 08:38:42 +02:00
Russell Oliver d260609e69 Eeschema Eagle Import: Fix package assigment by combining eagle libraries of the same name. 2017-10-20 08:38:42 +02:00
Russell Oliver e63e916279 Eeschema Eagle Import: Parse eagle symbol name prefix and fix reference values. 2017-10-20 08:38:42 +02:00
Russell Oliver cdb5a01091 Eeschema Eagle Import: Set visibility of fields based on attribute display value. 2017-10-20 08:38:42 +02:00
Russell Oliver 00d1368099 Eeschema Eagle Import: Add a better test file to qa 2017-10-20 08:38:42 +02:00
Russell Oliver d9396ac43b Eeschema Eagle Import: Hide reference and values based component smashed status and attribute. 2017-10-20 08:38:42 +02:00
Russell Oliver cec76c4de2 Eeschema Eagle: Created convertTextSize function. 2017-10-20 08:38:42 +02:00
Russell Oliver 857f9f3216 Eeschema Eagle Import: arc fix 2017-10-20 08:38:42 +02:00
Russell Oliver afaa2499dc Eeschema Eagle Import: Set Pinshape. - modifies lin_pin.cpp function InternalPinDecoSize to default back to number text size if pin name text is set to zero. 2017-10-20 08:38:42 +02:00
Maciej Suminski 08907d4fe8 Eeschema Eagle Import: generate unique timestamps for multiunit parts 2017-10-20 08:38:42 +02:00
Maciej Suminski a8e800f571 Eeschema Eagle Import: Moved net name correction to a function 2017-10-20 08:38:42 +02:00
Russell Oliver b11c876e48 Eeschema Eagle Import: Move any labels while inserting bus entry symbols. 2017-10-20 08:38:42 +02:00
Russell Oliver fa6d777ee0 Eeschema Eagle Import: More rigorous file header check 2017-10-20 08:38:39 +02:00
Russell Oliver 41f1f2cc48 Eeschema Eagle Import: WIP Handle bus entry symbols for any direction. 2017-10-20 08:38:39 +02:00
Russell Oliver 3f738b661e Eeschema Eagle Import: Set subsheet name based on original Eagle schematic file name. 2017-10-20 08:38:39 +02:00
Russell Oliver 4a4954dd82 Eeschema Eagle Import: Renable label generation for unlabeled nets. 2017-10-20 08:38:39 +02:00
Russell Oliver aeb43b055c Eeschema Eagle Import: Fix power symbol import. - Set pins to power in to match current power supply symbols. - Change IsPowerConnection() to match POWER_IN pins from power symbols as well. 2017-10-20 08:38:39 +02:00
Maciej Suminski d4201ef51f Eeschema Eagle Import: memory leak fixes 2017-10-20 08:38:39 +02:00
Maciej Suminski 37445042ed Eeschema Eagle Import: corrected arc radius size 2017-10-20 08:38:39 +02:00
Russell Oliver 2a96f26b7e Eeschema Eagle Import: Arc importation fix 2017-10-20 08:38:39 +02:00
Russell Oliver 956ef0fa61 Eeschema Eagle Import: WIP trying to fix indirect memory leaks 2017-10-20 08:38:39 +02:00
Russell Oliver 1fdb13daa6 Eeschema Eagle Import: Parse all pin directions 2017-10-20 08:38:39 +02:00
Maciej Suminski 8b8a9ea705 Eeschema Eagle Import: enumerate units starting with 1 2017-10-20 08:38:39 +02:00
Russell Oliver 9f4c7af6fb Eeschema Eagle Import: Set symbol as a power symbol for single supply pin eagle symbols. 2017-10-20 08:38:39 +02:00
Maciej Suminski ff86c8eeb1 Eeschema Eagle Import: check rotation property before accessing it 2017-10-20 08:38:39 +02:00
Russell Oliver 64f4eaddff Eeschema Eagle Import: Improve arc parsing to replicate eagle filled arcs. 2017-10-20 08:38:39 +02:00
Russell Oliver e379329ee6 Eeschema Eagle Import: Better conversion between ! and ~ in text and pin names 2017-10-20 08:38:39 +02:00
Russell Oliver a6f7cdc949 Eeschema Eagle Import: Update text alignment parsing 2017-10-20 08:38:39 +02:00
Russell Oliver 8f66e73749 Eeschema Eagle Import: Fill rectangles in symbols 2017-10-20 08:38:39 +02:00
Russell Oliver bc23c55cec Eeschema Eagle Import: Update layer handling 2017-10-20 08:38:39 +02:00
Maciej Suminski 2adc3d48b4 Eeschema Eagle Import: Assign timestamps for modules 2017-10-20 08:38:39 +02:00
Russell Oliver 7af2a21891 Eeschema Eagle Import: Parse polyline symbol elements. 2017-10-20 08:38:39 +02:00
Russell Oliver 7f8ac1cf02 Eeschema Eagle Import: Parse plain wires as lines on the notes layer. 2017-10-20 08:38:39 +02:00
Russell Oliver d41fe9d567 Eeschema Eagle Import: Disable label creation for unlabeled nets, may have to be renabled for edge cases where a multi segment net is unlabled in Eagle but which would not be connected in Kicad. 2017-10-20 08:38:38 +02:00
Russell Oliver 9932d18b77 Eeschema Eagle Import: Set value and reference component field visibilities based on presence of text in symbol definition. 2017-10-20 08:38:38 +02:00
Russell Oliver 05e9ec94f1 Eeschema Eagle Import: Set pin and pad name visibilities using text size. 2017-10-20 08:38:38 +02:00
Russell Oliver bb754b33d0 Eeschema Eagle Import: Parse instance attributes for value and refererence positions and alignment. 2017-10-20 08:38:38 +02:00
Russell Oliver ef880f57a2 Eeschema Eagle Import: Field checks and library insertion fix. 2017-10-20 08:38:38 +02:00
Russell Oliver c0c75d4732 Eeschema Eagle Import: Convert overbar prefix on pins. 2017-10-20 08:38:38 +02:00
Russell Oliver afa5ef0ca6 Eeschema Eagle Import: Load labels as global or local depending on if the net is shared accross multiple eagle sheets. Test created kicad labels to check if they are on a wire, otherwise movethem to the nearest wire start, midpoint or end. 2017-10-20 08:38:38 +02:00
Russell Oliver dcdc66b79e Eeschema Eagle Import: Add wire to bus entry symbols. 2017-10-20 08:38:38 +02:00
Russell Oliver 3919b79777 Eeschema Eagle Import: Use bounding box for sheet position and size. 2017-10-20 08:38:38 +02:00
Russell Oliver 13abec84ef Eeschema Eagle Import: Symbol field positioning fixes. 2017-10-20 08:38:38 +02:00
Russell Oliver 23dc8fdf32 Eeschema Eagle Import: During recentering of items the sheet, round translation to 100 mils to keep items on the grid. 2017-10-20 08:38:38 +02:00
Russell Oliver 2db2319156 Eeschema Eagle Import: Fix label rotation. 2017-10-20 08:38:38 +02:00
Russell Oliver 03739a4d37 Eeschema Eagle Import: Import pins even if Eagle even if pin to pad mapping (connects) to found. Fixes missing pins in supply symbols. 2017-10-20 08:38:38 +02:00
Russell Oliver 246e1fcd9c Eeschema Eagle Import: Save imported library to disk. 2017-10-20 08:38:38 +02:00
Russell Oliver e7377c0a26 Eeschema Eagle Import: dynamically size sheet based on positions of wires and junctions within the sheet. 2017-10-20 08:38:38 +02:00
Russell Oliver 512b574132 Eeschema Eagle Import: Import Busses. 2017-10-20 08:38:38 +02:00
Russell Oliver b8f98eaffe Eeschema Eagle Plugin: Code Cleanup 2017-10-20 08:38:38 +02:00
Russell Oliver 3741793f77 Eeschema Eagle Plugin: Set Component Orientation 2017-10-20 08:38:38 +02:00
Russell Oliver 2523c6b5d7 Eeeschema Eagle Plugin: Set footprint field using Eagle device package value. 2017-10-20 08:38:38 +02:00
Russell Oliver 812cae5409 Eeschema: Eagle Import: Add schematic text. Parse eagle vector text ratio to determine if text is bold. 2017-10-20 08:38:38 +02:00
Maciej Suminski 0d76b2947f Store imported Eagle symbols in a library 2017-10-20 08:38:38 +02:00
Maciej Suminski 3298387f7b Assert for non-standard rotation during Eagle schematics import 2017-10-20 08:38:38 +02:00
Maciej Suminski deaa1d1477 Fixed crashes when importing an Eagle schematic
If release() is called on a unique_ptr, one needs to be sure
that is not dereferenced anymore.
2017-10-20 08:38:38 +02:00
Maciej Suminski d6383893a2 eeschema: Iterate through plugins when determining file format. 2017-10-20 08:38:38 +02:00
Russell Oliver c274a21548 WIP: Symbols are imported and displayed, and save to cache file on schematic save. 2017-10-20 08:38:38 +02:00
Russell Oliver b9edfe4fe4 WIP: Refactor symbol importation to account for multiple gates and device connect pin maps. 2017-10-20 08:38:38 +02:00
Russell Oliver f9845bfa12 Add Eagle plugin implementation notes. 2017-10-20 08:38:38 +02:00
Russell Oliver 55d6f4e0fc WIP: Eagle symbol importation 2017-10-20 08:38:38 +02:00
Russell Oliver 4e69acbb49 Eeschema: Add CheckHeader function to SCH_PLUGIN and cycle through plugins when loading files. 2017-10-20 08:38:38 +02:00
Maciej Suminski e03bc32e49 Eagle plugin: Code formatting 2017-10-20 08:38:38 +02:00
Maciej Suminski f049b01a59 Eagle plugin: Added 'static' and 'const T&' as applicable 2017-10-20 08:38:38 +02:00
Maciej Suminski c72b2155a6 Eagle plugin: changed #define to constexpr 2017-10-20 08:38:38 +02:00
Maciej Suminski 7d2320b5ad Eagle plugin: check before dereferencing optional attributes 2017-10-20 08:38:38 +02:00
Russell Oliver 7ea33f76b4 Eeschema: Determine file plugin to use from first line of file. 2017-10-20 08:38:38 +02:00
Russell Oliver 75d9185e4a Eeschema: Eagle Plugin: Add loadSymboltext, and position default symbol texts. 2017-10-20 08:38:38 +02:00
Russell Oliver 04c7fbebdc Eeschema: Eagle Plugin: Handle pin rotation. 2017-10-20 08:38:38 +02:00
Russell Oliver 739754cfd6 Eeschema: Eagle plugin: Save symbols to schematic library cache file. Remove unneeded variable. Fix add extension to filename 2017-10-20 08:38:38 +02:00
Russell Oliver ea8f7ed02d Eeschema: Eagle plugin> work on schematic and symbol elements 2017-10-20 08:38:37 +02:00
Russell Oliver e92c8c1d6c Eeschema: Handle multiple sheets in Eagle plugin. 2017-10-20 08:38:37 +02:00
Maciej Suminski c727423979 Work in progress
- !! Eeschema uses Eagle plugin for loading schematics (i.e. it does not
use KiCad format anymore)
- Fixed build errors
- Fixed a few crashes
- Code formatting
2017-10-20 08:38:37 +02:00
Maciej Suminski f5b2a2ea57 Code formatting and cleanup 2017-10-20 08:38:37 +02:00
Alejandro García Montoro 404457f455 Eeschema Eagle plugin 2017-10-20 08:38:37 +02:00
Alejandro García Montoro df708f8ada Starts the loading layout 2017-10-20 08:38:37 +02:00
Alejandro García Montoro 75b0549f6f Testing the structure 2017-10-20 08:38:37 +02:00
Alejandro García Montoro 2403f2b558 Adds necessary structure to implement and test Eagle schematich plugin 2017-10-20 08:38:37 +02:00
Ingo Kletti df15e63d41 Fix Unit naming typo in eeschema spice model config 2017-10-16 20:07:26 +02:00
Maciej Suminski 609da9b61d Add missing sentinels for KICAD_T[] in SCH_EDIT_FRAME::OnLeftClick() 2017-10-15 18:11:31 +02:00
jean-pierre charras e0b9a21417 Modify a few messages to make translations more easy. 2017-10-12 10:39:32 +02:00
Seth Hillbrand f685cfaf3d Eeschema: Add collision-based selection code to circles and text 2017-10-10 20:54:31 +02:00
jean-pierre charras 47f37efdec Fix a compil issue on Linux 2017-10-10 08:37:50 +02:00
jean-pierre charras e626136e29 Eeschema: boom generator: ugly fix on Windows to allow xsltproc.exe working from the command line created from bom dialog.
(On windows, xsltproc.exe does not accept '\' in output filename, only '/' like on Unix, so this separator is converted when possible)
Minor code cleanup
2017-10-09 20:57:41 +02:00
jean-pierre charras 835c19f1e2 Fix dcm files not working with lib file in version 2.4
Fixes: lp:1722107
https://bugs.launchpad.net/kicad/+bug/1722107
2017-10-09 13:10:29 +02:00
jean-pierre charras 4905bbe500 hotkey management: enhancements in code to know if a hotkey was handled by an event or not.
No actual change in key management: in legacy it was partially existing, and not yet used in GAL mode.
2017-10-06 09:23:13 +02:00
jean-pierre charras 06a59022e4 minor fixes (compil warning and a very minor fix) 2017-10-02 20:39:09 +02:00
Maciej Suminski 85faa0e101 Added a dialog to select fields to be updated 2017-10-02 15:57:23 +02:00
Maciej Suminski e29d77c891 'Update Field Values' tool for eeschema 2017-10-02 15:57:23 +02:00
Maciej Suminski d90ac8299d Added 'Update Fields' button in schematic component properties 2017-10-02 15:57:23 +02:00
Oliver Walters 948dfe88ce Added option to not test other pins when setting pin parameters
- On loading from file, other pins are not LINKED and thus can be ignored
- 90% reduction in library load time when launching eeschema
2017-09-28 13:10:08 -04:00
Wayne Stambaugh ded4ad9b17 Pcbnew: delete objects from removed layers.
This fixes potential DRC false positive bugs that occur when inner layers
are removed from the board but the actual objects on contained on those
layers remain in the board.

Since Pcbnew does not handle odd number layers, this is not a perfect fix.
When the user chooses the front or back layer only options from the layer
setup dialog, objects on the copper layers will not be removed.  This will
not cause the false positive issue described above.

Get rid of dialog OK and cancel button event handlers and use the proper
TranferData(To/From)Window for handling control data.

Add PCB_LAYER_COLLECTOR for collecting board objects by layer.  Factor out
redundant [] operators into base PCB_COLLECTOR object.

Fixes lp:893950

https://bugs.launchpad.net/kicad/+bug/893950
2017-09-28 13:01:09 -04:00
Maciej Suminski 068a29952c Changed AUI toolbars background from gradient to solid
Based on patches from Windsor Schmidt <windsor.schmidt@gmail.com>
2017-09-27 23:23:06 +02:00
Wayne Stambaugh 39b27e39a9 Eeschema: silently save project file after schematic plot setting changes.
Don't prompt the user to save the project file after the schematic plot
settings change.  It is not done this way anywhere else in KiCad.

Fixes lp:1478131

https://bugs.launchpad.net/kicad/+bug/1478131
2017-09-26 08:32:04 -04:00
Wayne Stambaugh 427e5ec461 Eeschema: fix crash when undo called during item edit.
Add EDA_DRAW_FRAME::isBusy() method to test if the current item is being
edited or a block operation is in progress.

Ignore undo and redo commands when editor is busy.

Fixes lp:1718656

https://bugs.launchpad.net/kicad/+bug/1718656
2017-09-21 12:37:52 -04:00
Wayne Stambaugh cb764d73c5 Minor trace logging improvements.
Make all trace environment variable strings upper case and prefix with
KICAD_TRACE_ for consistency.

Add Doxygen group for the trace environment variable strings.
2017-09-21 08:58:41 -04:00
Wayne Stambaugh 6816b0dc99 Schematic hierarchy selection dialog fixes.
Derive the dialog from DIALOG_SHIM and show dialog quasi-modally to prevent
other KiCad main frame window events from being blocked.

Remove redundant storing of parent window pointer.

Verify parent window pointer is actually a SCH_EDIT_FRAME since the dialog
directly accesses parent object methods.

Replace static event table with dynamic event handling.

Fixes lp:1718241

https://bugs.launchpad.net/kicad/+bug/1718241
2017-09-20 08:45:30 -04:00
jean-pierre charras 4122aa1c01 Fix translation (I18n) problems 2017-09-20 09:32:37 +02:00
Simon Richter 40ffb364df Avoid converting fixed string to UTF-8
This fixes a build error on MSVC. The code may actually be legal, but a
proof of that would require a lengthy dissertation on argument promotion
rules for the ternary operator, and the simplest rule of promoting both
cases to a wxString rvalue is not likely to be what is intended here.

Fortunately, this expression can be simplified.
2017-09-20 08:57:35 +02:00
Maciej Suminski 1edaa8090d Turned LIB_ITEMS_CONTAINER into a template 2017-09-20 08:39:14 +02:00
Maciej Suminski 55bc8da726 LIB_ITEMS_CONTAINER code formatting 2017-09-20 08:39:14 +02:00
Bernhard Stegmaier 0be357ec3e LIB_ITEMS_CONTAINER reimplemented using C-style array of boost::ptr_vector
Fixes: lp:1714974
* https://bugs.launchpad.net/kicad/+bug/1714974
2017-09-20 08:39:14 +02:00
Maciej Suminski d6f3961804 pcbnew & eeschema file format version bump 2017-09-19 18:22:56 +02:00
Maciej Suminski 85be485c34 Enable long names for pin numbers and pads
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
2017-09-19 18:19:49 +02:00
Fabrizio Tappero d2d665e540 library option reviewed and renamed, minor menu text changes 2017-09-19 08:11:24 -04:00
Maciej Suminski 0083ce1bdc Disable enforced slash as the path separator in NETLIST_EXPORTER
It causes issues with files that are stored on network resources and
pointed to using the Windows UNC format.
2017-09-19 12:08:10 +02:00
Wayne Stambaugh 3d1bebe9f8 Fix tooltip in the edit library symbol properties dialog. 2017-09-18 13:18:49 -04:00
Maciej Suminski 25abe30c72 Code formatting 2017-09-18 11:25:32 +02:00
Kristoffer Ödmark 5e70810161 Disabled the automatic schematic-cross probing due to performance reasons. Added sheet-context menu entry for the cross-probing instead. 2017-09-18 11:16:18 +02:00
Oliver Walters f299266107 Added button logos to DIALOG_EDIT_COMPONENT_IN_SCHEMATIC dialog 2017-09-14 08:49:55 -04:00
Oliver Walters f529e3100c Altered text buttons to image buttons
- Used same tooltip messages
- Added "MoveFieldDown" button / function
2017-09-14 08:47:43 -04:00
Jean-Samuel Reynaud 50c9d8f77d Fix duplicated pin in case of multipart symbol creation.
Fixes lp:1509936

https://bugs.launchpad.net/kicad/+bug/1509936
2017-09-13 11:41:31 -04:00
Maciej Suminski 4a6777e0d1 Validate LIB_ITEMS::ITERATOR after erase operation 2017-09-08 08:52:01 +02:00
Maciej Suminski 4cd319b0c7 Make LIB_ITEMS::ITERATOR operator++ and end() coherent
Previous operator++() could move LIB_ITEMS::ITERATOR past the iterator
returned by LIB_ITEMS::ITERATOR::end(), potentially leading to a
segfault.
2017-09-08 08:51:59 +02:00
Seth Hillbrand 3b086360b8 Fixed a condition in LIB_ITEMS_LIST::operator[]
Fixes: lp:1714110
* https://bugs.launchpad.net/kicad/+bug/1714110
2017-09-07 00:44:40 +02:00
Seth Hillbrand 1fe91e6252 Eeschema: handle disambiguation cancel in library editor right-click
Fixes: lp:1714608
* https://bugs.launchpad.net/kicad/+bug/1714608
2017-09-02 14:52:18 -04:00
Seth Hillbrand 1c617b9f56 Prevent duplicate objects during block copy in symbol library editor.
Fixes lp:1714109

https://bugs.launchpad.net/kicad/+bug/1714109
2017-08-31 12:26:39 -04:00
Jean-Samuel Reynaud 21c104fcc7 Fix incorrect (missing) initialisation of m_cur_grid in symbols libraries table dialog box 2017-08-31 09:49:28 +02:00
Wayne Stambaugh 3bcc3dc4f9 Add delete block hotkey to schematic editor. 2017-08-29 15:16:56 -04:00
jean-pierre charras 758445e33e Fix a compil warning and a wxASSERT in COLOR4D_PICKER_DLG_BASE 2017-08-28 17:40:26 +02:00
jean-pierre charras e3c64f1f06 Slightly modify keywords used to store color config of Eeschema and Pcbnew, to avoid this config destroyed each time a stable version is run. 2017-08-27 09:06:26 +02:00
Maciej Suminski da88ed02e5 Fix bom2grouped_scv BOM template
For empty or undefined fields the quotation mark was not closed.
2017-08-25 17:06:32 +02:00
Wayne Stambaugh ee43728b18 Fix bug when adding symbol library with $ as first character of path name.
Test the result of wxFileName::MakeRelativeTo() before testing to see if
the resulting relative path starts with '.'.  When a library with relative
path that contains a path name with $ as the first character,
MakeRelativeTo() calls Normalize() which attempts to do an environment
variable substitution that concatenates consecutive paths i.e. the path
/foo/$bar ends up being foo$bar which is obviously incorrect.  This fix
is only a fix for absolute paths and files that contain path names that
begin with $.  This still does not resolve the issue when adding a
library file relative to one of the search paths that contains a path
name that begins with a $.  Fixing this would potentially break paths
that are expecting environment variable substitution.

Fixes lp:1712361

https://bugs.launchpad.net/kicad/+bug/1712361
2017-08-24 11:37:10 -04:00
Wayne Stambaugh 17b8342dc0 Disable drawing schematic sheet bounding box. 2017-08-24 08:22:03 -04:00
Wayne Stambaugh 33048e709a Better fix for schematic sheet re-sizing bug.
Use sheet pin direction to calculate sheet minimum height and width.

Remove sheet pin offsetting as the new sheet height and width calculation
prevents invalid minimums.
2017-08-23 18:33:27 -04:00
Wayne Stambaugh e176fc181d Fix schematic sheet resizing bug.
Calculate the proper minimum height when resizing sheets to prevent resized
sheet height from always increasing.

Prevent the sheet pins from being drawn in the corners of the sheet when
updating the edge constraints on resize.  This ensures that the sheet pin
is always drawn within the bounds of the sheet.  Please note that this fix
may not be 100% accurate as is assumes the default grid size of 50 mils.
This may not be what the user expected but it guarantees that wires will
connect to the pin properly.

Fixes lp:1699796

https://bugs.launchpad.net/kicad/+bug/1699796
2017-08-23 13:19:31 -04:00
Maciej Suminski 57619956e8 One more fix for LIB_BEZIER::Save() 2017-08-23 16:04:23 +02:00
Maciej Suminski d4fddf1929 Fix eeschema crash when saving LIB_BEZIER objects 2017-08-22 13:29:53 +02:00
Chris Pavlina a20cce0753 Show component history at the top and preselect it
This was the behavior before the factoring out of COMPONENT_TREE. Moving
the history at the top just required inserting it at the right point;
fixing preselect involved wxEVT_INIT_DIALOG not propagating to the
panel. Simple solution was to move the parts of that event handler to
the constructor as they didn't have to be in an event handler anyway.

Fixes: lp:1707538
* https://bugs.launchpad.net/kicad/+bug/1707538
2017-08-19 00:41:21 -06:00
Maciej Suminski 352919658d Refactored LIB_PART data storage
Instead of keeping all items in a boost::ptr_vector(), LIB_ITEMs are now
stored in an integer (KICAD_T) to LIB_ITEMS map.

The map allows to quickly access a subset of items of given type.
As the items are stored per type, there is no need to call
LIB_ITEMS::sort() to assure the correct drawing order. As a result,
libraries load faster.

To retain the old interface, there is a LIB_ITEMS_LIST wrapper for
the map, allowing the developers to access the items as if it was a flat
list-like structure.
2017-08-16 16:05:22 +02:00
Wayne Stambaugh 0e41632105 Fix build error.
Bind() and Unbind() require class specification when passing a pointer to a
class member.
2017-08-12 12:10:47 -04:00
Wayne Stambaugh f781691049 Eeschema: add symbol library table editor dialog.
Create a new dialog to edit global and project specific symbol library
tables.

Add menu entries for new symbol library table editor in schematic editor
and symbol library editor main frame menus.

Add command event handler for symbol library table editor dialog to
SCH_BASE_FRAME so it is accessible from derived frames.

Fix bug in default environment variables initialization.  A test for
existing user defined environment variables was preventing any new
default environment variables added to the list from being initialized.
2017-08-12 08:10:34 -04:00
jean-pierre charras 6bdc9cd25e fix a minor issue in dialog netlist, and add comments in code. 2017-08-11 09:44:06 +02:00
jean-pierre charras 4e96f9990d Use the new color4Dpicker to choose a color in Eeschema.
However, the opacity is not modifiable because the wxDC used in Eeschema does not know the alpha channel.
2017-08-06 10:42:11 +02:00
Wayne Stambaugh 7bf9f8e1c7 Eeschema: add global symbol library configuration dialog.
Create a dialog to give the user options to configure the global symbol
library table the first time Eeschema is run when no global symbol library
table exists.
2017-08-04 15:51:53 -04:00
jean-pierre charras 8dacd0582a Make a few internal error strings not translatable 2017-08-04 20:43:31 +02:00
Wayne Stambaugh 34abef3f5a Fix build error caused in previous commit. 2017-08-01 17:21:03 -04:00
Wayne Stambaugh 863db59a3d Eeschema: improve schematic symbol message panel information.
Add information when dummy symbol is used for library symbols that could
not be found to give the user some useful information to help track down
the broken link rather than display an empty message panel.
2017-08-01 15:34:59 -04:00
jean-pierre charras 58c32367ee filter useless autosave tests, and optimization of autosave test in Eechema 2017-07-26 18:06:04 +02:00
Dick Hollenbeck 19e6bde09a Rewrite class UTF8 to contain rather than extend std::string storage.
This forces the compiler class specific features rather than borrowing
from the base class's std::string.  In some cases prior to this,
wxString( std::string ) was being called rather than UTF8::operator
wxString() leading to garbled wxStrings.

Added function UTF8::wx_str() which is of great convenience also.

Implicit conversions still work as before, and hopefully more reliably.
2017-07-26 08:30:12 -04:00
Dick Hollenbeck 4e7de8a761 Reverse commit 4011ed4e31.
This commit was too broad and not cognizant of the purpose of the class
UTF8.

Add MAYBE_VERIFY_UTF8() macro, which can trap non-UTF8 encoded strings in
debug builds.

Use that macro conditionally in class UTF8 to trap non-UTF8 encoded strings
being put into UTF8 instances.
2017-07-26 08:26:56 -04:00
Oliver Walters c27f5b725d Improved various error messages
- Moved developer "jargon" to details pane
- Changed error messages to "WHAT" rather than "WHY" or "WHERE"
2017-07-25 07:37:14 -04:00
Oliver Walters a0a3ca6646 Added extra information to error and info messages
Optional extra information string which is displayed in a drop-down "details" box
2017-07-25 07:37:13 -04:00
jean-pierre charras cb2f3d6304 fix minor typo 2017-07-22 13:46:18 +02:00
jean-pierre charras f042fcddd0 Change the way power symbols are annotated before creating a netlist or running ERC.
Now only not annotated symbols (or duplicate references) are modified.
2017-07-21 18:41:04 +02:00
Fabrizio Tappero f453cec938 Changed all Rotate 90 deg CW with Rotate Clockwise. Changed all Rotate 90 deg CCW with Rotate Counterclockwise 2017-07-21 10:28:44 -04:00
Fabrizio Tappero deeeed38a1 deleted several redundant icons in right-click menu. The objective is to get to a more uniforme right click menu look
Signed-off-by: Fabrizio Tappero <fabrizio.tappero@gmail.com>
2017-07-21 10:28:42 -04:00
Fabrizio Tappero cef616fcd8 fixed text titles that should have only the first word capitilized 2017-07-21 10:19:29 -04:00
Fabrizio Tappero 269238a7ee fixes label text, now only first word is capitilized 2017-07-21 10:19:29 -04:00
Fabrizio Tappero 7be14f774d fixed plot menu labels 2017-07-21 10:19:29 -04:00
Chris Pavlina c78a2ba4f8 Render symbols correctly with convert=0 in chooser
Fixes: lp:1705315
* https://bugs.launchpad.net/kicad/+bug/1705315
2017-07-19 11:43:39 -06:00
Chris Pavlina 04d299ae0e libedit: add correct unit/convert from component chooser
Fixes: lp:1705073
* https://bugs.launchpad.net/kicad/+bug/1705073
2017-07-19 11:35:11 -06:00
Chris Pavlina e34f1222fa Fix LIB_VIEW_FRAME only returning Unit A
Due to library list repopulation on refresh, the unit was being
overwritten with 1. Now, we track whether the unit needs to be
overwritten.

Fixes: lp:1677736
* https://bugs.launchpad.net/kicad/+bug/1677736
2017-07-19 11:12:14 -06:00
Oliver Walters f509ccc7cf Search component footprint text
- Added footprint text to search string for each component.
2017-07-18 08:58:03 -04:00
Chris Pavlina 94b9524f6d Fix documentation error in DIALOG_CHOOSE_COMPONENT 2017-07-17 15:00:13 -06:00
Wayne Stambaugh 0633d90ae4 Remove leading/trailing white space error message from field validator.
The illegal white space testing for reference and value (library editor
only) fields are adequate to ensure the user cannot enter invalid white
space characters.  Leading and/or trailing white space should not be an
issue for field storage in the schematic file as they are quoted.  Rather
than silently removing the leading and/or trailing white space which is
frowned upon, let the user fix it.

Fixes lp:1659526

https://bugs.launchpad.net/kicad/+bug/1659526
2017-07-13 13:45:25 -04:00
Wayne Stambaugh e01eb29758 Symbol and footprint library table parser fixes.
Fix potential memory leak in both footprint and symbol library table
parsers when a duplicate library nickname entry exists.

Parse entire symbol library table before raising duplicate nickname
exception.

Improve the duplicate library table nickname error message to make
life easier for users to fix broken tables.
2017-07-13 10:09:38 -04:00
jean-pierre charras c93ab4d5da Fix possible crash and issues when a incorrect fp lib table is loaded:
correct lines are loaded, and pcbnew / eeschema is no more aborted.
Fixes: lp:1701627
https://bugs.launchpad.net/kicad/+bug/1701627
2017-07-12 20:24:35 +02:00
jean-pierre charras 459fd9e584 Better fix for bugs 1703258 and 1702707: better detection of cache lib modifications, not always detected previously.
The component to symbol links were previously not always updated after a library change,
if the change is made outside the library editor.
2017-07-12 16:07:08 +02:00
jean-pierre charras d7a4fb7d8b Fix a crash in Eeschema when creating a netlist just after saving the project.
This is more a workaround than a fix.
The crash was due to the fact the library cache is modified on the disk with the saving process.

Fixes: lp:1702707
https://bugs.launchpad.net/kicad/+bug/1702707
2017-07-09 20:17:18 +02:00
jean-pierre charras 83b4e45eb4 Fix a memory leak, if an error occurs. 2017-07-09 10:16:00 +02:00
jean-pierre charras 895c0bb716 Fix a compil warning and a wxASSERT in netlist dialog and component_tree.cpp 2017-07-08 15:58:22 +02:00
Maciej Suminski e18475f220 Renamed remaining constants to match the action (see ab44e7cc) 2017-07-04 10:08:33 +02:00
Maciej Suminski 2300697f02 Added 'Cut Block' to right-click menu in eeschema 2017-07-03 18:03:34 +02:00
Maciej Suminski e981eedf64 Renamed cut_button icon to cut, removed delete_text icon 2017-07-03 18:03:34 +02:00
Maciej Suminski ab44e7cc72 Renamed constants to match actions in eeschema 2017-07-03 17:39:07 +02:00
Fabrizio Tappero 0c8200aaeb Rename actions in eeschema: copy->duplicate, save->copy 2017-07-03 17:22:00 +02:00
Fabrizio Tappero 50f6d28e25 Replaced a few icons with generic variants in eeschema 2017-07-03 17:13:13 +02:00
Kristoffer Ödmark 4fb2f80dd4 Eeschema copy/cut/paste to ctrl+c/x/v cut is now undoable Highlight net is now at ctrl+b by default 2017-07-03 16:41:47 +02:00
jean-pierre charras 9a2322cfcd New fix for bug 1700331 (Filenames with Double Period Invalid).
The previous fix was building the full name incorrectly, when this name contains a path not relative to the project.

Fixes: lp:1700331
https://bugs.launchpad.net/kicad/+bug/1700331
2017-07-02 10:30:21 +02:00
Tomasz Włostowski 0f5ab1bc87 Reverted commit 4130083445. 2017-07-02 00:34:41 +02:00
jean-pierre charras 22a8df69c4 Fix a few doxygen warnings 2017-06-30 16:03:17 +02:00
Wayne Stambaugh 4130083445 Eeschema: fix loading symbol libraries with dot in file name.
Initializing wxFileName objects by using string assignment or the single
string argument ctor will cause wxFileName to parse everything to the
right of the first dot as the file extension.  Therefore, file names such
as foo.1.lib and bar.baz.lib will fail.  This is probably not the only
place in the KiCad source where this can occur.

Fixes lp:1700331

https://bugs.launchpad.net/kicad/+bug/1700331
2017-06-29 10:36:12 -04:00
Wayne Stambaugh 85a0a371b1 Add support to resolve schematic symbol links using symbol library table.
Add Resolve() and ResolveAll() methods the SCH_COMPONENT object to use the
symbol library table to obtain links to the library symbols.

Add LoadAlias() method to SYMBOL_LIB_TABLE to find an alias by it's LIB_ID.

Clean up Doxygen comments to match coding policy changes.
2017-06-27 11:22:58 -04:00
jean-pierre charras 3c3ee9b8c3 Fix a few doxygen warnings 2017-06-26 18:12:57 +02:00
Maciej Suminski ac688e688a Fixed selecting components with Enter (DIALOG_CHOOSE_COMPONENT)
Added dedicated event types: COMPONENT_SELECTED, COMPONENT_PRESELECTED.
2017-06-25 23:13:39 +02:00
Wayne Stambaugh 375ec9fec6 Eeschema: remove hierarchy navigation tool from right vertical toolbar.
The hierarchy navigation tool did not seem to be used frequently and was
deemed redundant.
2017-06-21 16:44:46 -04:00
jean-pierre charras e5137f4eb4 Fix a few doxygen warnings 2017-06-21 10:01:39 +02:00
Maciej Suminski 6733101c6f Flags to select additional widgets for COMPONENT_TREE 2017-06-19 14:48:54 +02:00
Maciej Suminski f667f54c52 Moved component tree widget to a separate class 2017-06-19 14:48:53 +02:00
jean-pierre charras dfc49da29b Fix issues in strings that need to be translated (non ASCII7 strings, trailing spaces...) 2017-06-18 21:35:37 +02:00
jean-pierre charras 1466d0cee6 Fix a few doxygen warnings 2017-06-18 09:18:41 +02:00
Maciej Suminski 2018d48946 Fixed removal order in SIM_PLOT_PANEL::DeleteTrace() 2017-06-16 23:17:34 +02:00
Wayne Stambaugh dab73e172b Doxygen warning fixes and coding policy comment changes. 2017-06-16 10:08:28 -04:00
jean-pierre charras 996bcdf458 Fix a few doxygen warnings 2017-06-16 09:18:31 +02:00
Wayne Stambaugh 66e97fa905 Doxygen comment improvements.
Fix lots of Doxygen warnings.

Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
Kristoffer Ödmark 19d5cc7548 Removed all exception specifiers since deprecated.
Exception specifiers are deprecated in cpp11, so went through them all
and removed them from the code.
2017-06-12 13:54:55 -04:00
jean-pierre charras ad48cd435d Replace SetToolID( ID_NO_TOOL_SELECTED, ...) by SetNoToolSelected() in code 2017-06-12 16:17:48 +02:00
jean-pierre charras 526b5e2cd3 Fix broken behavior of the "Zoom to selection" tool in Gerbview and Eeschema. 2017-06-10 09:07:17 +02:00
jean-pierre charras 51bed4bae9 Fix incorrect handling of wxID_CANCEL and Close events in DIALOG_BOM_EDITOR. 2017-06-07 18:43:53 +02:00
danngreen a18d72b5d6 Made BOM editor dialog quasi modal 2017-06-06 13:43:08 -04:00
Bernhard Stegmaier 0e71686bfd Reunion of zoom toolbar buttons.
The zoom window toolbar button is on the right toolbar separated from the
other zoom buttons on the top toolbar.  Move the zoom window button to the
top toolbar beside the other zoom buttons.
2017-06-06 09:35:20 -04:00
Cheng Sheng 521e18ddbd "Show Datasheet" button: Resolve env-vars (like ${KIPRJMOD}) if appears.
This way, the datasheets can be stored within the project dir, and referred as ${KIPRJMOD}/relative/path/to/datasheet.
2017-06-06 08:30:35 -04:00
jean-pierre charras bea4664311 Fixes: lp:1695751 (EEschema: "Not-connected" flag not movable)
https://bugs.launchpad.net/kicad/+bug/1695751
2017-06-05 18:16:08 +02:00
jean-pierre charras 0d2634fe2d Fix incorrect declaration of a translatable string. 2017-06-05 18:16:08 +02:00
Fabrizio Tappero ac9a64a173 general UI fix. Fixed a lot of icons and a lot of menu.
Also a few no longer used .cpp icon files are removed.
2017-06-02 11:51:11 +02:00
Andrey Fedorushkov ddec8036c1 Eeschema: fix an other erroneous "unit value out of range" test. 2017-05-31 15:43:28 +02:00
jean-pierre charras c0bb8a30c2 Fixes: lp:1694456
https://bugs.launchpad.net/kicad/+bug/1694456

EEschema load: report "unit value out of range" in sub-sheet, although it is not the case.
2017-05-31 10:20:49 +02:00
jean-pierre charras e9577a1025 Fixes: lp:1692706 (eeschema cache lib not rebuilt when saving schematic, and existing symbols already in cache are not updated)
https://bugs.launchpad.net/kicad/+bug/1692706
2017-05-29 18:22:36 +02:00
jean-pierre charras 2100c29a1a Fixes: lp:1692436 (reset to defaults in Eeschema, edit component properties, puts fields in the wrong position)
https://bugs.launchpad.net/kicad/+bug/1692436
2017-05-24 21:19:26 +02:00
Oliver Walters ea855c1abf Fixed duplicate field names
- Now works correctly even if users overload default field names
2017-05-22 15:29:33 -04:00
Oliver 2a3a699d98 Component table is left aligned 2017-05-18 08:37:08 -04:00
Maciej Suminski e79f97860c Bezier2Poly refactor
Before the refactor library browser display Bezier curves correctly only
once, at other times they were just straight lines or crashed the
application.
2017-05-16 17:58:09 +02:00
jean-pierre charras c5b09696ab Eeschema bom scripts: move python scripts to eeschema/plugins/python_scripts and xsl scripts to subdir xsl_scripts.
Python scripts are now installed (previously: were ignored by the make install command)
2017-05-13 16:52:56 +02:00
jean-pierre charras 305a166e95 Pcbnew: update immediately the 3D viewer opened from the footprint editor/viewer/wizard after a change. 2017-05-13 08:17:06 +02:00
Wayne Stambaugh 747583606b Eeschema: fix regression when sheet files are not in project path.
Fixes lp:1683921

https://bugs.launchpad.net/kicad/+bug/1683921
2017-05-10 16:05:06 -04:00
Oliver Walters d4e41c4f97 Component table improvements 2017-05-08 12:43:20 +02:00
Wayne Stambaugh c70adcdf31 Don't apply last line width to text thickness in symbol library editor.
The symbol library header was setting the text thickness using the
last line thickness setting which is incorrect so use the default
thickness when creating new text objects.

Fixes lp:1635344

https://bugs.launchpad.net/kicad/+bug/1635344
2017-05-03 16:20:46 -04:00
jean-pierre charras 342f28f106 dilaog bom editor: fix min sizes. 2017-05-03 08:56:32 +02:00
Oliver Walters 5fe13c01c7 Improvements for component table 2017-05-03 08:56:31 +02:00
jean-pierre charras e4d2924ee2 Make a sentence translatable in dialog_bom_editor. 2017-05-02 19:51:02 +02:00
Oliver Walters 29e3e55ad3 Removed BOM functionality
- Removed ability to generate BOM to file
- Removed Save/Cancel window when closing table
- No longer updates table <after> table is closed
- Bugfix for field names (previously comparison was case insensitive)
2017-05-02 09:40:02 -04:00
Oliver Walters 48893ab2b1 Fixed UNDO behaviour
- Undo actions are pushed to the appropriate sheet(s)
- Each sheet's actions are grouped together
2017-05-02 09:39:56 -04:00
Oliver Walters 47ee2773d2 Reworked field association
- Allow duplicate components to access same field data
2017-05-02 09:39:51 -04:00
Oliver Walters d792e36151 Reworked UI
- Buttons are enabled/disabled within wxUpdateUI events
- Save/Cancel dialog used to close window and apply (or reject) changes
2017-05-02 09:39:40 -04:00
Oliver Walters 59470c3b5e Fixed display of references for duplicate sheets
Display part reference rather than REFERENCE field value
2017-05-02 09:39:34 -04:00
Oliver Walters 8dd4aca73b Mark schematic as dirty
Notify schematic of changes when window is closed
2017-05-02 09:39:24 -04:00
Oliver Walters 5126332c57 Fixed wxString::Format assert 2017-05-02 09:39:08 -04:00
Oliver a39856485c Added component table dialog
- Allows grouping of matched components
- Bulk edit of components in a spreadsheet window
- User can choose to save / undo changes
- All changes are pushed to the undo stack in a single operation
- Export table to HTML / CSV output
2017-05-02 09:39:01 -04:00
Dick Hollenbeck 50716c9015 Fix BOM generation bug for components with multiple units.
Sadly, each unit of a component can have its own unique fields. This
change finds the last non blank field and records it. Last guy wins
and the order of units occuring in a schematic hierarchy is variable.
Therefore user is best off setting fields into only one unit. But this
scavenger algorithm will find any non blank fields in all units and use
the last non-blank field for each unique field name.

Fixes lp:1471417

https://bugs.launchpad.net/kicad/+bug/1471417
2017-04-24 10:16:32 -04:00
Maciej Suminski 801e50450b Revert "Fix component chooser dialog crash if there are no FPs available"
This reverts commit 0a8a659ff7.
The patch is incorrect, as it removes the FP chooser drop-down list.
I cannot reproduce the crash with the patch reverted, so there must
have been something specific to my configuration at that time.
2017-04-13 10:58:10 +02:00
jean-pierre charras 02abf18046 Eeschema: speed up netlist creation. 2017-04-12 08:18:46 +02:00
Wayne Stambaugh 578f01bfd9 Fix debug build error in symbol remap dialog. 2017-04-05 08:43:05 -04:00
Wayne Stambaugh 36606ceeb7 Add symbol library table remapping dialog.
Create dialog and code to allow legacy schematic symbols to be remapped
from the old library path look up method to the new symbol library table
method by using the following steps:

  1) Create a project symbol library table containing all of the symbol
     libraries defined in the old library look up list not found in the
     global symbol library table.

  2) Map each symbol to the correct symbol in the symbol library table
     if possible.

Recreate library link to symbols so look up method can be converted to
symbol library table properly.

Add function to SCH_COMPONENT to link library symbols using the symbol
library table.
2017-04-04 18:31:28 -04:00
jean-pierre charras 1f3fe6fefb Fix Eeschema: Part library editor "save current library as" crash if no current library selected.
Fixes: lp:1678698
https://bugs.launchpad.net/kicad/+bug/1678698
2017-04-03 07:58:34 +02:00
jean-pierre charras 2f9be81b19 Very minor change in 2 strings to help I18n translations. 2017-04-02 11:51:40 +02:00
Wayne Stambaugh 9c2ebf32f1 Initial symbol library table implementation prep work.
Add loading symbol library table code to schematic PROJECT object.

Fix minor issues with loading global symbol library table.

Add default symbol library path environment variable to the environment
variable list and change the variable name to KICAD_SYMBOL_DIR.

Add code to SCH_SCREENS to test if all library nicknames of the symbol
library IDs are empty.

Remove unnecessary KICAD_USE_SCH_IO_MANAGER build option.
2017-03-31 16:29:34 -04:00
Fabrizio Tappero dcaa0559de Minor edit component properties dialog improvements. 2017-03-31 15:30:00 -04:00
Maciej Suminski 0a8a659ff7 Fix component chooser dialog crash if there are no FPs available 2017-03-31 17:15:09 +02:00
Chris Pavlina 3234087dc9 Move wxDataViewCtrl manipulators out of dialog_choose_component.cpp
Fixes: lp:1677925
* https://bugs.launchpad.net/kicad/+bug/1677925
2017-03-30 21:47:14 -04:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Wayne Stambaugh 40f60c9871 Fix netlist generation bug cause when component unit is set to zero.
Fix if statement logic to ensure the unit number is never set to zero.

Add logic to the legacy schematic plugin to automatically convert any
schematic files that have components with a unit setting of zero.  Set
the schematic modified flag so that the user will be notified of a
changed schematic.

Add a user warning when the schematic parser fixes the bug and sets
the file modified flag.

Fixes lp:1677282

https://bugs.launchpad.net/kicad/+bug/1677282
2017-03-30 15:44:47 -04:00
Chris Pavlina feba091594 Highlight the first choice in rescue dialog
Fixes: lp:1455970
* https://bugs.launchpad.net/kicad/+bug/1455970
2017-03-27 08:45:05 -04:00
Chris Pavlina a9afb872d5 libedit: fix crash on Delete Component with no selection
This bug was actually here before the new component chooser this time;
I'm not sure what the purpose of this error message was since it is
being displayed in a non-error state. Maybe a copy/paste bug from when
Delete Component was changed to use the main component chooser?
2017-03-27 08:07:30 -04:00
Chris Pavlina d2b0a4b358 Component chooser: show aliases better
- In the listing, display alias names in italics
- In the info panel, display per-alias description correctly, as well as
  root description

Fixes: lp:1676190
* https://bugs.launchpad.net/kicad/+bug/1676190
2017-03-27 07:55:26 -04:00
jean-pierre charras cfac7bd31c Eeschema: fix a crash when closing the choose component dialog by OK button, if no component selected. 2017-03-27 08:53:19 +02:00
Chris Pavlina 4011ed4e31 Convert UTF8 to/from wxString correctly around LIB_ID
Fixes: lp:1675942
* https://bugs.launchpad.net/kicad/+bug/1675942
2017-03-24 21:38:00 -04:00
Chris Pavlina 849b3c2a4b Add footprint select dropdown to component chooser, serious refactoring
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
    - FOOTPRINT_ASYNC_LOADER to load without freezing UI
    - Rewrite loader threads as queue-driven thread pool
    - Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
2017-03-24 09:20:27 -04:00
Maciej Suminski b47a6e415b Fixed a memleak in DIALOG_CHOOSE_COMPONENT 2017-03-23 16:52:33 +01:00
John Beard e98ae3e463 Move executable name constants to own file
The executable name constants are only used by two files, they do not
have to be in common.h.

Also converted to const wxString for better type-safety and removed
old-style wxT macros.
2017-03-23 09:23:45 -04:00
Chris Pavlina 72cfd38979 De-templatify CMP_TREE_MODEL_ADAPTER::FindAndExpand
std::function lets this be a plain method instead of a template; this
cleans up the header a bit and possibly reduces a bit of bloat
2017-03-21 22:45:36 -04:00
Chris Pavlina b2f1d22bbf Fix preselect in CMP_TREE_MODEL_ADAPTER 2017-03-21 22:45:17 -04:00
Chris Pavlina ef12f0bcbc Fix warning: shadowed wxWindow::IsShown in sim_plot_panel.h 2017-03-19 09:18:28 -04:00
Chris Pavlina bfa22c6ce8 Fix warning: uninitialized constant in sim_plot_panel.h 2017-03-19 09:18:23 -04:00
Wayne Stambaugh 9ddb4fe67e Fix uncaught exception in footprint and symbol library table parsers.
Fixes Coverity CID 154580
Fixes Coverity CID 154581
Fixes Coverity CID 154582
Fixes Coverity CID 154583
Fixes Coverity CID 154584
Fixes Coverity CID 154585
2017-03-17 07:56:47 -04:00
jean-pierre charras ccfad8306b eeschema: fix an annoying issue created by commit fdb53f28e6b666f242c3d24dfbfb0e4050bfa2ad: enter a label size starting by 0 (like 0.3) was not possible. 2017-03-14 20:40:21 +01:00
Oliver fdb53f28e6 Improvement for label edit dialog in eeschema:
- Added wxTE_RICH property to label text controls (allows ctrl+backspace in Windows)
- Added numeric validator to text size
2017-03-14 13:08:36 -04:00
Oliver 3fc62d5fcd Improve right-click menu entry for doc
- Changed "doc" to "Open Documentation"
2017-03-13 09:58:05 -04:00
jean-pierre charras 8f3fc7b858 Optimization in class_library.cpp: speed up power component list creation. 2017-03-13 12:49:24 +01:00
jean-pierre charras 28a6ca1e23 Eeschema: fix wrong position of symbol fields when adding a symbol in a schematic
Fixes: lp:1665718
https://bugs.launchpad.net/kicad/+bug/1665718
2017-03-12 17:04:42 +01:00
Chris Pavlina 5e5259b59c CMP_TREE_MODEL*: fix uninitialized members
Coverity CID 157141
Coverity CID 157136
2017-03-11 19:27:44 -05:00
Chris Pavlina bbaa29fbc4 Refactor FOOTPRINT_PREVIEW_PANEL
- Pull out compound widget bits into FOOTPRINT_PREVIEW_WIDGET
- Move all pcbnew-specific bits *inside* pcbnew; implementation should
  be private for users
- Make a few class members and inner types private
2017-03-10 23:26:45 -05:00
jean-pierre charras de30dc9f5d Speed up schematic libraries loading. 2017-03-10 21:17:56 +01:00
Chris Pavlina a72d32d3fd Test for dangling pins after symbol is edited
Fixes: lp:1562897
* https://bugs.launchpad.net/kicad/+bug/1562897
2017-03-10 12:01:12 -05:00
Wayne Stambaugh 9636086f52 Fix build bug for const incorrectness. 2017-03-10 10:09:55 -05:00
Wayne Stambaugh cc64c6af1d Fix broken symbol link in schematic after editing.
The save current symbol command had a different code path then save current
library so the schematic symbol was not being refresh after is was modified
in symbol editor.

Split out the save current symbol command from Process_Special_Functions()
to help reduce function growth hormone imbalance syndrome.

Some coding policy fixes and wxT() macro removal.

Fixes lp:1671456

https://bugs.launchpad.net/kicad/+bug/1671456
2017-03-10 08:39:29 -05:00
Chris Pavlina 7bf4c90be5 Component chooser: properly normalize description/keywords
Fixes: lp:1671814
* https://bugs.launchpad.net/kicad/+bug/1671814
2017-03-10 08:34:20 -05:00
jean-pierre charras 0be56451b1 More optimization in project rescue. 2017-03-10 10:31:50 +01:00
jean-pierre charras 4605cae588 Displays the number of instances to modify in rescue dialog. 2017-03-09 19:16:24 +01:00
jean-pierre charras ae7e3f725b Speed up project rescue calculations, by optimizing the number of searches in libs. 2017-03-09 18:13:03 +01:00
jean-pierre charras 2a91d7bc21 Speed up SCH_COMPONENT::ResolveAll(). 2017-03-09 15:46:12 +01:00
Chris Pavlina 82f587f4ff Show the busy cursor while loading component chooser 2017-03-08 15:34:11 -05:00
Chris Pavlina 2e4e0a9a05 Minor cleanup in cmp_tree_model_adapter.h 2017-03-08 14:49:00 -05:00
Chris Pavlina 7ee0adabd7 Optimize component chooser startup time more
- Stop wx from sorting the items. We've already sorted them, and
  profiling shows our sort is faster than theirs.

- Go back to using strings as cache keys, because using pointers means
  the cache doesn't survive from one invocation to the next. Switch to
  wxHashMap because it can use wxString keys in an unordered (faster)
  map.
2017-03-08 14:41:34 -05:00
Chris Pavlina 28848373ce CMP_TREE_MODEL: add the correct number of units
Fixes: lp:1671174
* https://bugs.launchpad.net/kicad/+bug/1671174
2017-03-08 12:39:44 -05:00
Chris Pavlina 3bddc14dc6 CMP_TREE_MODEL_ADAPTER: use more suitable cache type
Fixes: lp:1671086
* https://bugs.launchpad.net/kicad/+bug/1671086
2017-03-08 12:34:11 -05:00
Chris Pavlina 2232edfb87 Rewrite DIALOG_CHOOSE_COMPONENT without wxFormBuilder
This will allow near-future use of controls not supported by
wxFormBuilder with minimal hackery.
2017-03-08 12:00:49 -05:00
Chris Pavlina 36e400ec5b Avoid collapsing component chooser column widths to zero
Fixes: lp:1670762
* https://bugs.launchpad.net/kicad/+bug/1670762
2017-03-07 14:59:51 -05:00
Chris Pavlina 2bb234d3f5 Fix assert in DIALOG_EESCHEMA_CONFIG when removing many libs at once 2017-03-06 17:24:12 -05:00
Simon Richter 12c1339296 Remove false "override" comments. 2017-03-06 16:34:56 -05:00
jean-pierre charras 0b3e5952b7 Eeschema: fix a crash if a schematic project was not loaded due to a incorrect file format error (Linux only)
Fixes: lp:1670322
https://bugs.launchpad.net/kicad/+bug/1670322
2017-03-06 21:41:43 +01:00
Chris Pavlina f8415633bd Switch component chooser to wxDataViewCtrl, refactor
This refactors COMPONENT_TREE_SEARCH_CONTAINER into a Model-View-Adapter
architecture comprising:

- eeschema/cmp_tree_model.h
    - CMP_TREE_NODE: Base class representing a searchable library
        set with scoring and sorting

        - CMP_TREE_NODE_UNIT
        - CMP_TREE_NODE_ALIAS
        - CMP_TREE_NODE_LIB
        - CMP_TREE_NODE_ROOT

- eeschema/cmp_tree_model_adapter.h
    - CMP_TREE_MODEL_ADAPTER: mediator between wxDataViewCtrl (via
        wxDataViewModel) and CMP_TREE_NODE*

                   +---+                      +------------------+
 +---+  Generates  | A |                      |       VIEW       |
 | M |  from libs  | D |   wxDataViewModel    |------------------|
 | O | <---------- | A | <------------------> |  wxDataViewCtrl  |
 | D |             | P |                      |------------------|
 | E | <---------> | T | <------------------- |    wxTextCtrl    |
 | L | UpdateScore | E | UpdateSearchString() |------------------|
 +---+             | R |                      |                  |
                   +---+                      +------------------+

Representing the data with a proper model allows the wxDataViewCtrl to
be updated in bulk, which is significantly faster than the old method of
populating it one item at a time. This also adds flexibility if more
data is to be added in the future (which may come in handy with the
upcoming .sweet format, as that adds more ways components can be related
to each other).

Replacing the wxTreeListCtrl with a wxDataViewCtrl also significantly
reduces the general GUI quirkiness, as wxDataViewCtrl is much more well
behaved.
2017-03-06 09:50:48 -05:00
Wayne Stambaugh d9260d42c8 Fix broken schematic symbol library links in sub-sheets.
Only the root sheet symbol library links were being updated when the
schematic was loaded so changed call to update all sheets.

Fixes lp:1670079

https://bugs.launchpad.net/kicad/+bug/1670079
2017-03-05 13:18:26 -05:00
Wayne Stambaugh f181961866 Remove excessive schematic symbol library re-linking.
For some reason, the schematic symbol library link was being regenerated
every time the schematic was redrawn in SCH_SCREEN::Draw().  Remove the
re-link call from the Draw() and Plot() functions.

Add function the SCH_SCREENS to update the links in all of the schematic
sheets.

Update all schematic sheet symbol library links whenever the symbol
library list is modified or any library in the library list is modified.
That should cover all cases where the symbol library links could be
broken.

Refresh schematic window after applying library changes to update any
possible symbol changes.

Add KIWAY message to update the schematic when symbol library changes
could change the schematic.  The KIWAY mail was used because the schematic
frame is not a parent of the symbol library editor so wxEvents cannot be
used.
2017-03-04 16:02:33 -05:00
Wayne Stambaugh 84835ed4e1 Use component library symbol when looking for a pin in the schematic.
For some reason, rather than using the LIB_PART object reference by an
SCH_COMPONENT to check if a pin was at a given position in the schematic,
a LIB_PART search was performed for every component in a schematic.  This
made absolutely no sense and was changed to use the LIB_PART referenced
by the SCH_COMPONENT object.  This should significantly speed up any
operations that call SCH_SCREEN functions, IsTerminalPoint(),
MarkConnections(), and IsJunctionNeeded().

Add function to SCH_COMPONENT to access PART_REF object.
2017-03-04 15:16:44 -05:00
Chris Pavlina 551b2b2312 Component chooser: fix ugly border on macOS 2017-03-04 12:29:49 -05:00
jean-pierre charras 5b3d7962bb Fix questionable code and memory leak. 2017-03-04 17:35:34 +01:00
Chris Pavlina 4618e6c7f8 Component chooser: event and focus cleanup 2017-03-04 11:14:04 -05:00
Simon Richter 1502e27695 Remove debug code matching on specific component names 2017-03-03 08:30:48 -05:00
jean-pierre charras 4eeed8d04f Icons options menu: code rework 2017-03-03 14:18:25 +01:00
Kristoffer Ödmark dda51ab550 CrossProbes Schematics from eeschema to pcbnew
Adds a similar crossprobe as modules has in pcbnew. When clicking a
sheet in eeschema, the items that are exclusive in that scheet will be
selected in pcbnew if using the GAL canvas.
2017-03-03 07:25:32 -05:00
jean-pierre charras e7e972804a Make show/hide icons in menus a run time option, instead of compil option. 2017-03-02 15:45:54 +01:00
Maciej Suminski d7e1152aa3 Correct way of freeing memory in NGSPICE class
Strings created with strdup() should be deleted using free(), not
delete.
2017-03-01 13:56:24 +01:00
Martin Stoilov fc0814caef More flexible node mapping in Spice netlist exporter
Allows to map nodes to pins for Spice models that have more pins than
corresponding schematic symbol. An example is a MOSFET model containing
gate, source, drain & body, whereas schematic symbol part has only gate,
source & drain with body and source connected inside the part.
2017-03-01 13:51:21 +01:00
Maciej Suminski 7034ea0c95 Added missing PROPERTIES parameter to function calls in PART_LIB 2017-02-28 15:19:03 +01:00
Maciej Suminski 8b8de76aa5 Store information about buffering & caching in properties
PROPERTIES object has been recreated every time it was needed, using
two fields in PART_LIB class. Now the buffering & caching settings are
stored directly in a PROPERTIES object.
2017-02-28 15:18:58 +01:00
jean-pierre charras be10de8d28 Eeschema: Fix crash when reading a library if a symbol having aliases generates a parse error after its ALIAS list definition 2017-02-28 12:52:37 +01:00
jean-pierre charras 94037f4d3d Fix eeschema crashes when a library has a component where the name under "DEF" does not agree with the name under "F1"
(now "F1" is forced to name given by "DEF", like in stable version)
Fix also an incorrect parsing of .dcm file, if  a component was not found in corresponding symbol lib.
(Can happen for not updated .dcm files)
2017-02-28 11:48:01 +01:00
jean-pierre charras 64d6c3f91c eeschema segfault when a library "T" command is missing Halign Valign values
Fixes: lp:1668082
https://bugs.launchpad.net/kicad/+bug/1668082
2017-02-27 17:22:06 +01:00
jean-pierre charras f35cb6cd6a Fix: if a part description has a problem in a library, Eeschema crashes due to a double deletion. 2017-02-27 16:13:16 +01:00
jean-pierre charras 6b431b4791 Fix transaltion issue.
Rebuild dialog_display_options_base with a recent wxFormbuilder version.
2017-02-26 13:03:38 +01:00
Chris Pavlina e6de99cc86 No more wxSearchCtrl in DIALOG_CHOOSE_COMPONENT
It is buggy on several platforms
- macOS: eats Esc key
- Windows: poor text alignment
2017-02-24 16:01:58 -05:00
jean-pierre charras 6bd2110449 Remove a printf clearly for debug, certainly a very old bug 2017-02-24 20:51:50 +01:00
jean-pierre charras 6ae7c15d89 Rework on pcbnew menubar: make code more easy to read and modify. 2017-02-24 20:51:49 +01:00
Chris Pavlina 23d4da9e49 Optimize TWO_COLUMN_TREE_LIST column sizing
This was particularly slow for very long lists on macOS.
2017-02-24 12:51:53 -05:00
Chris Pavlina 9effcb80e7 Optimize SCH_PLUGIN enumeration for populating the component chooser 2017-02-24 11:47:27 -05:00
Chris Pavlina d3cb23b7d7 Remove unneeded state member in DIALOG_CHOOSE_COMPONENT 2017-02-23 20:59:15 -05:00
Chris Pavlina 2683af26c0 Fix DIALOG_CHOOSE_COMPONENT enter and double-click events 2017-02-23 20:51:29 -05:00
jean-pierre charras 039910cb21 Fix incorrect initialization of a color parameter, which make the drawings in black in libedit 2017-02-23 17:55:55 +01:00
jean-pierre charras 11dcb76fc9 Add -Wshadow compil option, if exists to warn about shadowed variables.
Swig auto generated .cxx file has a lot of shadowed variables, so this option cannot be used to compil all files.
2017-02-23 13:17:23 +01:00
Joseph Y. Chen ed16beb5cd Rearranged Part Editor Icon Positions
The changes were made to rearrange the positions of the first 5
icons in the part editor so that they are consistent with footprint
editor.

Signed-off-by: Joseph Y. Chen <joseph.chen59@yahoo.com>
2017-02-22 13:24:49 -05:00
Maciej Suminski d7bf44eee0 Removed a few more headers from base_struct.h 2017-02-22 17:54:01 +01:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans 3ec8941ffc Revert from wxColourPickerCtrl to wxBitmapButton
wxColourPickerCtrl apparently looks bad on Windows 10
2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
Chris Pavlina 35a8d78921 Fix component selector segfault on MacOS
Fixes: lp:1666081
* https://bugs.launchpad.net/kicad/+bug/1666081
2017-02-21 18:37:37 -05:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Chris Pavlina ca7f1d5a08 Remove accidentally committed diodes.lib 2017-02-20 14:57:45 -05:00
Chris Pavlina 57de6ec0af Remove SetFocus hack after changing to wxSearchBox 2017-02-20 14:41:21 -05:00
Joseph Y. Chen cc11c269e3 Swapped part editor icon order to be consistant with footprint editor
Signed-off-by: Joseph Y. Chen <joseph.chen59@yahoo.com>
2017-02-20 13:38:32 -05:00
Chris Pavlina a416f3a4e4 Remove unnecessary TRANSFORM::operator=
The default assignment operator is significantly more efficient - often
inlined, and has no branches...
2017-02-19 22:13:50 -05:00
Chris Pavlina 0182e454c5 Adjust component chooser GUI slightly 2017-02-19 19:31:53 -05:00
Wayne Stambaugh 1672d37782 Fix bug in legacy schematic I/O plugin.
When part definition contained in line comments, the next line was not
being loaded causing and infinite loop.

Fixes lp:1666024

https://bugs.launchpad.net/kicad/+bug/1666024
2017-02-19 17:44:53 -05:00
Chris Pavlina 70301a6244 Component chooser: display correct unit in reference field 2017-02-19 15:11:35 -05:00
Chris Pavlina 69165aa0a0 Do not show hidden fields in the component selector
This is not necessary anymore, as they are displayed in the info box.
2017-02-19 13:43:50 -05:00
Chris Pavlina a61be7e00e Move LIB_PART::Draw drawing options into a struct
This makes configuring the options clearer, avoiding the long list of
non-self-explanatory arguments at the small cost of requiring a few more
lines.
2017-02-19 13:40:26 -05:00
Chris Pavlina 5dea5e2ada Component chooser: add missing info panel updates 2017-02-19 10:01:45 -05:00
Chris Pavlina b4f4ff9353 Clean up updateSelection() megafunction 2017-02-19 09:24:40 -05:00
Chris Pavlina 3d88cc2a36 Rename method for consistency with similar class
FOOTPRINT_PREVIEW_PANEL::AddToPanel -> InstallOnPanel
2017-02-19 07:53:02 -05:00
Chris Pavlina fb6bf0c861 Fix SetColumnWidth() assertion in TWO_COLUMN_TREE_LIST
Fixes: lp:1665982
* https://bugs.launchpad.net/kicad/+bug/1665982
2017-02-19 06:38:53 -05:00
Chris Pavlina 2632b1d1a0 Revamp component chooser and add footprint preview
This commit brings several changes:

- Add a footprint preview pane to the eeschema component selector
- Upgrade component list to wxTreeListCtrl
- Factor out wxTreeListCtrl subclass TWO_COLUMN_TREE_LIST which
  patches a column size bug
- Linkify datasheet URL in info pane
2017-02-18 21:39:55 -05:00
Wayne Stambaugh 0898b6c94d Prevent symbol libraries from being unnecessarily reloaded.
When Eeschema is relaunched from KiCad, the symbol libraries were always
reloaded which isn't necessary as they are maintained by the kiface project
object until the project is changed.

Fix minor title capitalization in symbol library progress dialog.
2017-02-17 19:31:47 -05:00
Wayne Stambaugh ccbdb41186 Remove conversion from wxString using FROM_UTF8() when loading symbols.
A conversion from wxString using FROM_UTF8() was inadvertently used when
loading and enumerating symbols from the legacy plugin.  This conversion
would break any non-ascii characters in the symbol name.

Fixes lp:1664642

https://bugs.launchpad.net/kicad/+bug/1664642
2017-02-16 14:03:19 -05:00
Wayne Stambaugh 9375e18fb6 Fix broken symbol library alias root symbol links.
Check to see if the root symbol alias already exists before adding it to
the symbol library alias list in the legacy schematic I/O plugin.  There
currently about six different ways that the root alias can be changed in
the root symbol which causes issues.  This really needs to be cleaned up.

Use buffering when updating a symbol in a library to prevent the library
file from being written before it is backed up.

Update the alias and unit selection menubar drop down lists.

Delete the output formatter so the file is closed so that reading the
file time stamp can be performed to prevent unnecessary cache reloads.

Fixes lp:1664834

https://bugs.launchpad.net/kicad/+bug/1664834
2017-02-15 20:28:36 -05:00
Wayne Stambaugh 58ed5466b4 Fix legacy schematic I/O symbol library parser bug.
Apparently symbol definition blocks can have a '0' character in the lock
position which is typically defined as 'L' or 'F'.  This must have been
a oversight at some point since both versions of the DEF parameters
exist in library version 2.3 files.

Disable the symbol library cache buffering after saving.
2017-02-14 14:49:22 -05:00
Jon Evans 92a2b2b684 Correctly filter copyable objects for copy hotkey (Fixes lp:1571316) 2017-02-14 09:48:28 -05:00
Wayne Stambaugh 175d68fbb1 Fix schematic cache library broken by schematic I/O plugin changes.
Check for existence of cache library when before attempting to rebuild
the cache.  Create a new cache library object if no cache library was
loaded.

Add missing buffering and cache properties to LIB_PART::FindAlias() to
prevent the plugin from reloading the cache library that may not exist.

Add method to find library by full path and file name.

Revert the check for a symbol in the cache library remove from last
patch.

Add checks for plugin cache file name validity and existence of a the
file before attempting to verify the file modification time to prevent
wxWidgets from raising an assertion in debug builds.

Clear modified flag when saving buffered and/or cached library.
2017-02-13 13:47:46 -05:00
jean-pierre charras 010c10853c Libedit: add "create new lib" in file menu (was only available from the main toolbar)
Make also "Save Lib" shortcut modifiable by user, like other shortcuts.
2017-02-13 09:53:47 +01:00
Wayne Stambaugh d5bf465dc6 Fix library save bug in legacy schematic I/O plugin.
Add the ability to save empty symbol library file for caching and empty
schematic.

Remove check for existing symbol in cache populating routine.  Just perform
a complete rebuild of the cache library and overwrite the existing one.

Fixes lp:1663871

https://bugs.launchpad.net/kicad/+bug/1663871
2017-02-12 18:40:53 -05:00
Wayne Stambaugh e8cf4f0724 Fix bug in legacy schematic I/O plugin.
Move adding LIB_PART to library until the part is fully parse.  The problem
was unique_ptr was cleaning up the part when an exception was thrown during
parsing causing a double free when the cache was deleted.

Add missing try/catch block when loading the cache library during an append
schematic operation.

Fixes lp:1663869

https://bugs.launchpad.net/kicad/+bug/1663869
2017-02-11 20:19:52 -05:00
Wayne Stambaugh eb06b35852 Eeschema: fix schematic I/O plugin symbol name issue.
LIB_ID was changing the symbol name due to the parser dropping everything
past the first '/' character which is interpreted by LIB_ID as the item
version.  Add flag to ignore this in LIB_ID::SetLibItemName() and add a
new ctor so the library nickname, item name, and revision can be set as
required to prevent the standard LIB_ID parsing.

Fix a few places where PART_LIBS functions FindLibraryAlias() and
FindLibPar() were translating wxString symbol names to LIB_IDs where the
LIB_ID parser was truncating the symbol name.
2017-02-11 13:44:17 -05:00
Wayne Stambaugh 7ccdca5ced Use library ID to store library symbol information in the schematic symbol.
Use LIB_ID instead of wxString for storing the library symbol information
in the schematic symbol in preparation for the upcoming symbol library table
implementation.

Change the FindLibAlias and FindLibPart functions in the PART_LIBS object
instead of wxString.  Please note that only the library ID name is used to
search the list of libraries.  The library nickname is ignored.  Once the
symbol library table is implemented and full LIB_IDs are defined, the
library search code will no longer be used and will only be kept to load
older schematics that have not been converted.

Move SCH_LEGACY_PLUGIN_CACHE definition so that the legacy plugin knows
how to properly delete the cache object.
2017-02-10 08:36:59 -05:00
Wayne Stambaugh ebfbbcc1f5 Fix missing part library broken by schematic I/O plugin changes.
The LIB_PART object stores a pointer to the PART_LIB that it belongs to.
Now that the PART_LIB is no long responsible for loading the library, add
the PART_LIB pointer after the library is loaded by the plugin.
2017-02-10 08:36:58 -05:00
Wayne Stambaugh fda677eecc Prevent schematic I/O plugin from setting the library cache to null.
Don't call init() when performing library functions as it was always
setting the m_cache variable to null which cause the library to be
reloaded every time a library command was performed as well as a
memory leak.

Delete cache object when the plugin is destroyed.
2017-02-10 08:36:58 -05:00
Wayne Stambaugh 73bbc35c3e Make the schematic I/O plugin the only option.
Add SCH_PLUGIN object to PART_LIB object.

Convert all PART_LIB I/O to use SCH_PLUGIN.

Remove library caching from PART_LIB and use caching provided by SCH_PLUGIN.

Add support to use PROPERTIES for buffering and document file write control
instead of adding code the SCH_PLUGIN object in the SCH_LEGACY_PLUGIN that
will not be required when the new file formats are implemented.

Add buffering to SCH_LEGACY_PLUGIN to prevent cache from writing file on
every change to library.  This is to prevent the cache library from being
written every time a new symbol is added.

Add option to not save library document file when saving library.  This is
primarily used by the cache library write code.

Move symbol library write code out of LIB_PART and into SCH_LEGACY_PLUGIN.

Add exception handling where LIB_PART caught the exception and returned
an error status.

Remove KICAD_SCH_IO_MANAGER build option as it is no longer optional.
2017-02-10 08:36:57 -05:00
Chris Pavlina 9bb1b33e89 libedit: menu bar UI compliance tweaks 2017-02-07 16:38:23 -05:00
Chris Pavlina 93a90926c2 eeschema: menu bar UI compliance tweaks 2017-02-07 16:38:18 -05:00
Chris Pavlina bca74853d1 Display more information in component selector 2017-02-07 15:01:20 -05:00
Oliver a5dcc192dc Fix for bug where rotating / editing a selected item would remove it from screen
- Added test to see if there was a currently-editing item

Fixes: lp:1661866

https://bugs.launchpad.net/kicad/+bug/1661866
2017-02-07 09:12:38 -05:00
Chris Pavlina 431abcff0c libedit: no units in the new Delete Part dialog 2017-02-05 09:08:07 -05:00
Oliver 4cd7514c8e libedit: Improved selection process for DeleteComponent
- Reused SelectComponent dialog
- Reduced selection to current library only
- Ability to filter component for deletion
- Automatically pre-select the current component
2017-02-05 08:50:22 -05:00
jean-pierre charras 7dddb1d1c1 When editing a label property it always goes to right orientation by itself
Fixes: lp:1661264
https://bugs.launchpad.net/kicad/+bug/1661264
2017-02-02 16:50:49 +01:00
Chris Pavlina 1ab1d8e7e6 Revert "libedit: Improved selection process for DeleteComponent"
This reverts commit 4ba0fef8c1.

This was accidentally merged before review due to clumsiness, and has a
bug.
2017-02-02 06:28:56 -05:00
Oliver 4ba0fef8c1 libedit: Improved selection process for DeleteComponent
- Reused SelectComponent dialog
- Reduced selection to current library only
- Ability to filter component for deletion
2017-02-02 06:14:32 -05:00
Oliver 702795f4a9 Added progress dialogs for library loading
- Modal wxProgressDialog when loading symbol libraries (eeschema / libedit)
2017-02-02 06:14:32 -05:00
Wayne Stambaugh 9319ef034d Fix rotate bug in symbol library editor.
The rotate hotkey was rotating individual items when a block was selected
which is invalid behavior.  Add check for block mode and disable rotating
items when block mode is active.

Fixes: lp:1660875

https://bugs.launchpad.net/kicad/+bug/1660875
2017-02-01 13:07:20 -05:00
Chris Pavlina e03fef3266 Reorder eeschema toolbar slightly
- Put the output generation steps (annotation through pcbnew) in the
  correct order as expected by the user running through them.

- Add a Plot button to match pcbnew
2017-01-31 16:06:27 -05:00
Diogo Condeco 8033c6fa9a Eeschema one field dialog text selection.
This patch selects the text in the dialog_one_field.
For annotated symbols the number is selected. For unannotated symbols the ? is selected.
All other cases the entire text is selected, including references in library editor.
2017-01-31 16:01:08 -05:00
Chris Pavlina 49f881375b libedit: add hotkey for Load Component 2017-01-31 16:01:08 -05:00
Chris Pavlina 1d83e23927 libedit: preselect active component when switching 2017-01-31 16:01:08 -05:00
Diogo Condeco 75ffcbcef5 MACOS Setfocus and CancelButtonIssue moved into dialog_shim.
Setfocus now works on macos dialogs by setting DLGSHIM_USE_SETFOCUS.
This option is only enabled __WXMAC__ is defined.

FixOSXCancelButtonIssue() is now called inside DIALOG_SHIM::SHOW.
All other calls from within the dialogs were removed.
2017-01-29 23:51:35 +01:00
Dick Hollenbeck d0c46a81d9 SCH_TEXT::SwapData() was not swapping m_shape, causing abandoned drag to distort pinsheet.
Fixes: lp:1659683
* https://bugs.launchpad.net/kicad/+bug/1659683
2017-01-27 16:44:24 -05:00
Wayne Stambaugh 8e7fe9dab2 Fix spice simulator build error due to EDA_TEXT changes. 2017-01-25 09:25:05 -05:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.

Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.

Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
2017-01-25 08:03:32 -05:00
diogocondeco 1a05c8a5a8 eeschema/add_component setfocus moved into OnInitDialog
SetFocus executed by OnInitDialog wxInitDialogEvent handler
2017-01-23 12:31:00 -05:00
Robbert Lagerweij 550a1ea4d6 eeschema: set title of plotted pdf to sheet title
Fixes: lp:1656956
https://bugs.launchpad.net/kicad/+bug/1656956
2017-01-20 17:11:12 -05:00
Simon Richter fbace8e513 Fixed two hidden overloaded function warnings.
Correct way of writing commit c4db8bf4.
2017-01-18 17:24:50 +01:00
Maciej Suminski c4db8bf45f Revert "Removed Pin{Shape,Type}ComboBox::SetSelection()."
Enforcing the appropriate type is a good thing, though it results in
build warnings. For the moment we stay with the latter.

This reverts commit 6dd47119fe.
2017-01-18 16:58:20 +01:00
Maciej Suminski 6dd47119fe Removed Pin{Shape,Type}ComboBox::SetSelection().
These methods were hiding an overloaded method, which was called anyway.
2017-01-18 14:20:39 +01:00
Frank Villaro-Dixon c2fb3368f3 Change default symbol pin length to match KiCad Library Convention (KLC). 2017-01-09 16:27:26 -05:00
Wayne Stambaugh 50a388fe56 Page setting menu entry consistency fixes.
Move the page setting menu entry from the edit menu to the file menu in
Eeschema so it is consistent with Pcbnew.

Change the page setting menu entry tooltip in Pcbnew so it is the same as
Eeschema.
2017-01-04 15:24:45 -05:00
jean-pierre charras 655f54bea5 Fixes: lp:1652353 (pspice netlist export: library include path is always empty)
https://bugs.launchpad.net/kicad/+bug/1652353
2016-12-30 15:32:45 +01:00
jean-pierre charras dec2d6e8cc Fix a few Coverity warnings. A bit of clean code in export_vrml.cpp. 2016-12-30 12:40:05 +01:00
jean-pierre charras a5178c70db sch legacy plugin: fix a compatibility issue with old schematic files 2016-12-29 19:38:48 +01:00
Wayne Stambaugh 88df496168 Eeschema: implement loading of global symbol table.
Add global symbol library storage and access to SYMBOL_LIB_TABLE object.

Add code to Eeschema to load global symbol table on start up.
2016-12-10 10:23:09 -05:00
jean-pierre charras 54c5f6bbb0 Simulator frame: fix a min size for panels, and now stores in config the position and size of the frame and panels 2016-12-02 15:34:23 +01:00
Marco Inacio c6cbc9ec95 Fixes: lp:1646224 (Simulation: small tune field)
https://bugs.launchpad.net/kicad/+bug/1646224
2016-12-02 08:58:01 +01:00
jean-pierre charras 9a535d4c70 Fixes: lp:1645430 (CSV BOM generation using bom2csv.xsl script with custom entries has wrong format)
https://bugs.launchpad.net/kicad/+bug/1645430
2016-11-29 13:07:20 +01:00
jean-pierre charras ccdfabc866 Add tool tips to autosave widget in dialogs (pcbnew and eeschema) 2016-11-22 11:26:32 +01:00
jean-pierre charras 308dc0e46a sch legacy plugin: fix compatibility with old and very old library and symbol files 2016-11-21 09:57:07 +01:00
Wayne Stambaugh 64c892ee23 Make footprint ID into a generic library ID.
Rename FPID to LIB_ID as is now used as a generic library identifier and
is no longer specific to footprints.

Remove all mention of footprint from the new LIB_ID doxygen comments and
code.

Rename files fpid.h and fpid.cpp to lib_id.h and lib_id.cpp.

Rename fp_lib_table.keywords file to lib_table.keywords and adjust CMake
build dependencies accordingly.

Update all source files effected by the code and file name changes.

Update .gitignore for file name changes.
2016-11-20 18:35:08 -05:00
Wayne Stambaugh 4d018039aa Eeschema: lay the groundwork for symbol library tables.
Create SYM_LIB_TABLE and SYMBOL_LIB_TABLE_ROW objects derived from LIB_TABLE
and LIB_TABLE_ROW respectively for supporting symbol library tables.

Add FPID member to LIB_PART for associating a symbol to a specific library
nickname.  Please note, this is not used in any way at this time and will be
implemented when the symbol library table is actually implemented.

Add sym_lib_table keyword to keywords file.  This is a temporary measure
until a more elegant method for parsing and formatting library tables can
be implemented.

Build FPID support in the common library instead of the pcbcommon library
for use in Eeschema.
2016-11-20 13:38:20 -05:00
jean-pierre charras 430a09a5a0 sch legacy plugin: fix compatibility issues with old library 2.2 version 2016-11-20 15:19:06 +01:00
jean-pierre charras de46873dfe Eeschema, main menu (menubar.cpp): better code and fix outdated command and tool tip texts 2016-11-20 12:57:16 +01:00
jean-pierre charras 6cf8ff9ca6 Fix message. 2016-11-20 07:21:19 +01:00
jean-pierre charras 07e2ccdb59 Eeschema: cosmetic enhancement. 2016-11-19 09:05:58 +01:00
Aylons Hazzud 5dc43a1d77 Gray out "Units are not interchangeable" if 1 unit
Fixes: lp:1503921
* https://bugs.launchpad.net/kicad/+bug/1503921
2016-11-18 11:42:42 +01:00
jean-pierre charras 682c15ed62 Add connection highlight to eeschema, step 2: Fixes, refinements, add hot key, cleanup code. 2016-11-16 13:09:34 +01:00
Nox_firegalaxy 44b8533d4d Add connection highlight to eeschema, step 1. 2016-11-16 11:07:02 +01:00
jean-pierre charras d3af42d5de Fixes: lp:1641456 (Linux specific: Unable to load Eeschema libraries that have an absolute path, due to an incorrect initialization of a wxFileName variable)
https://bugs.launchpad.net/kicad/+bug/1641456
2016-11-14 13:12:33 +01:00
jean-pierre charras e246a61a72 Eeschema: fix compil warning on 64 bits machines. 2016-11-13 08:43:24 +01:00
jean-pierre charras 318429590e Eeschema: Fix an issue with new schematic plugin: it expects absolute paths for libraries, but if a library is in the current working dir, its filename was not absolute, and the lib was silently ignored. Now, filenames are always absolute. 2016-11-10 17:47:53 +01:00
Jean-Noel Avila 58af5bc3a4 Eeschema: Fix off-by-one in saving bitmaps 2016-11-09 09:46:35 +01:00
jean-pierre charras 3af551cef8 Fixes: lp:1639330 (Assertion failure opening libedit from eeschema in debug mode)
https://bugs.launchpad.net/kicad/+bug/1639330
2016-11-05 11:39:22 +01:00
jean-pierre charras c7fcb2695c Add a specific bitmap for show electrical type option (component editor and component viewer) 2016-11-04 13:59:45 +01:00
jean-pierre charras f15a59f0ad Component Editor and Component viewer: add option to show the electrical pin type. 2016-11-04 12:13:22 +01:00
jean-pierre charras 9a09b0cb3c Remove a test file committed by mistake (I am guessing) 2016-11-02 19:48:42 +01:00
jean-pierre charras 3bb3f31c7a schematic legacy plugin: fix compatibility with old files, and with doc. 2016-11-02 19:47:38 +01:00
Wayne Stambaugh d470ac9c24 Eeschema: minor LIB_PART object changes.
Replace LIB_PART::Conflicts() with an external test to for alias name
conflicts.  This was only use in one place so don't clutter the library
API.

Change LIB_PART::AddPart() return type from bool to void since it's not
checked by any callers and differs from the equivalent schematic I/O
plugin function.
2016-10-26 18:37:28 -04:00
Wayne Stambaugh 4ee0b3827e Eeschema: more schematic I/O plugin prep work.
Add code to schematic I/O plugin for updating library modification
hashes.

Remove unused RemoveLibrary() method from PART_LIBS object.

Purge wxT() macros from modified files.
2016-10-25 18:45:33 -04:00
jean-pierre charras 1840c3c4c7 Eeschema/Pcbnew: Update PCB From Schematics tool: ensure the netlist is reliable: warn user if a component is not annotated before exporting the netlist to Pcbnew (like in netlist creation dialog). 2016-10-22 20:02:15 +02:00
jean-pierre charras 3bf1717002 Fix a minor cosmetic issue in dialog edit libentry fields 2016-10-22 18:43:12 +02:00
Kevin Cozens 31f583f949 Fix compile error 2016-10-21 13:51:22 -04:00
Wayne Stambaugh 1e752ba164 Eeschema: symbol library viewer improvements.
Select the first library in the list and the first symbol in the first
library if they exist the first time the symbol viewer is opened.

Prevent clicking on the next or previous toolbar buttons from wrapping
past the end of the symbol list to mimic the behavior of the up and down
arrow key strokes.opens a select
library dialog.

Use incriminating or decrementing the current symbol selection when using
the next and previous symbol toolbar buttons rather looking up the next
symbol in the library.  Just use the next or previous symbol name in the
list.

Replace the select library and select symbol from library list dialogs
which where redundant with the symbol search dialog used in place symbol
tool in the schematic editor.  This gives the user type ahead search and
selects the library and symbol in one dialog.

Move updating toolbar buttons from the ReCreateHToolbar() function into
dedicated wxUpdateUIEvents.

Break Process_Special_Functions() into individual event handlers.

Remove PART_LIB::GetNextEntry() and PART_LIB::GetPreviousEntry() as they
are no longer required due to the changes to the symbol library viewer.

Purge wxT() macros from all modified source files.
2016-10-21 08:39:18 -04:00
jean-pierre charras 1924478558 Eeschema: editors: show the pin position (when clicking on it) in message panel.
Pin properties dialog: show pin position ( and allow editon ).
2016-10-18 18:59:26 +02:00
Michele Renda 64bb1ca924 Fix infinite loop when schema file contains a comment or an empty line 2016-10-17 08:35:20 -04:00
Maciej Suminski af3d5befa7 Solve codemodel libraries loading problem in ngspice
Fixes: lp:1630675
* https://bugs.launchpad.net/kicad/+bug/1630675
2016-10-17 10:11:27 +02:00
jean-pierre charras d1e4399a29 dialog edit libentry fields in lib: Add button to edit spice parameters, and therefore to add spice parameters in lib components. 2016-10-15 20:05:03 +02:00
Wayne Stambaugh fc07716aed Eeschema: schematic I/O plugin preparation work.
Rename PART_LIB GetEntryNames() and RemoveEntry() to GetAliasNames() and
RemoveAlias() respectively for improved readability.

Rename PART_LIBS FindLibraryEntry() to FindLibraryAlias() improved
readability.

Remove commented out PART_LIBS::FindLibraryEntries().

Remove PART_LIB::GetFirstEntry() and update all effect code accordingly.

Remove unused PART_LIB::SetFileName() method.

Remove unused PART_LIBS::RemoveAllLibraries() method.
2016-10-14 19:29:24 -04:00
Cirilo Bernardo 48ed9f080e Add Help Menu item to open browser at kicad-pcb.org/contribute 2016-10-10 19:01:45 -04:00
Fabrizio Tappero 194bd1d617 Minor menu text consistency improvements. 2016-10-10 18:54:58 -04:00
Simon Richter b0f9864bc4 Clean up warnings from exception handlers
The exception objects caught are either not referenced at all, or only in
debug builds. This avoids the warnings for the unused variables.
2016-10-10 11:08:49 -04:00
Wayne Stambaugh 213ceaa280 Eeschema: add delete symbol library code to schematic legacy plugin. 2016-10-09 08:29:44 -04:00
Maciej Suminski 26ee676278 Handle Spice_Netlist_Enabled attribute in Spice netlist exporter
Fixes: lp:1630502
* https://bugs.launchpad.net/kicad/+bug/1630502
2016-10-07 16:50:47 +02:00
Maciej Suminski efdfaebf62 Support subdirectories in relative paths in Spice model dialog 2016-10-07 16:07:38 +02:00
Wayne Stambaugh 4f0c2ad083 Eeschema: add create symbol library to legacy schematic I/O plugin. 2016-10-07 09:18:15 -04:00
Chris Pavlina 9547dd4e52 Fix GetBoundingBox hiding overloaded virtual 2016-09-30 22:32:24 -04:00
Wayne Stambaugh 9d258ba921 Eeschema: fix parsing bug in legacy schematic I/O plugin.
Yet another quirk parsing LIB_TEXT object was found.  Apparently even in
library version 2.3, the text properties can be dropped so a check for
end of line was added to prevent the parser from choking on a valid text
line.

Fixes lp:1628160

https://bugs.launchpad.net/kicad/+bug/1628160
2016-09-30 10:01:50 -04:00
Wayne Stambaugh aa5e979b8a Eeschema: add delete symbol method to schematic I/O plugin. 2016-09-29 18:34:31 -04:00
Wayne Stambaugh 92216b7351 Eeschema: fix assertion on delete node hot key while busy.
Performing a delete node hot key operation while Eeschema is busy performing
another operation causes an assertion in the delete node command event
handler in debug builds.  It also causes the operation in progress to be
cleared if the assertion is ignored or in release builds.

Fix a similar issue when the leave current sheet hot key is called while
busing performing another operation which causes rather interesting behavior
in the sheet that was exited.

Fixes lp:1627434

https://bugs.launchpad.net/kicad/+bug/1627434
2016-09-27 20:40:59 -04:00
jean-pierre charras 673b094b2b Fix a few missing override qualifiers and shadowed vars. 2016-09-27 10:58:05 +02:00
Chris Pavlina 52aa4ecdf4 Unify window title formats
Most window titles are now of the format "Application — file [info]",
with adaptations as necessary. Version information has been removed from
titles.
2016-09-26 17:28:25 -04:00
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
John Beard 360794b3a4 On a failure to cache a symbol lib, don't skip subsequent libs
By rethrowing the exception here, the entire caching process is
curtailed if there is an IO_ERROR while parsing a lib. This means any
libs up to the one before the bad one will be cached, but ones after it
wil not be.

Change to wxLogError to gather the errors to present to the user at the
end of the process.
2016-09-24 12:08:12 -04:00
Wayne Stambaugh 58abb29827 Eeschema: add delete alias from library to I/O manager.
Modify base I/O manager class to delete alias from a symbol library.

Add delete alias from legacy symbol library plugin.
2016-09-23 13:29:17 -04:00
Maciej Suminski 9e587a1ea2 Fixed an assertion in SIM_PLOT_FRAME
wxListCtrl cannot have wxLC_REPORT and wxLC_SMALL_ICON enabled at the same time (Windows)
2016-09-22 18:27:56 +02:00
Dick Hollenbeck 964b5a1830 Split IO_ERROR out of richio.* and store Problem() and Where() separately 2016-09-20 11:56:23 -04:00
Dick Hollenbeck 9ad49dc2d1 Split IO_ERROR out of richio.* and store Problem() and Where() separately 2016-09-20 11:56:18 -04:00
jean-pierre charras 3f104448df Rename libedit_icon to icon_libedit, bo be consistent with other icon names. 2016-09-20 13:23:17 +02:00
jean-pierre charras 1051732580 DIALOG_SPICE_MODEL_BASE: cosmetic enhancements (mainly better look of spice units table in Passive notebook page) 2016-09-19 18:48:07 +02:00
Wayne Stambaugh 679eef1c43 Eeschema: fix build errors and warnings.
Fix build error when KICAD_USE_SCH_IO_MANAGER=OFF due to const issues with
LIB_PART ctor.

Fix unused variable build warning in legacy schematic plugin.
2016-09-17 20:18:03 -04:00
Wayne Stambaugh 3ae240ea46 Eeschema: add save code to legacy symbol library plugin.
Make LIB_PART copy constructor take a const LIB_PART reference.

Add SaveSymbol to legacy symbol library plugin.

Add removeAlias to legacy symbol library cache.

Add AddSymbol to legacy symbol library cache.
2016-09-17 14:45:01 -04:00
jean-pierre charras 0719f8d214 Fixes: lp:1624659 (fix some issues in countries which are not using a point as decimal separator)
https://bugs.launchpad.net/kicad/+bug/1624659
Small enhancement in dialog_spice_model_base.cpp: add comments about spice values notation.
2016-09-17 18:34:44 +02:00
jean-pierre charras f3d4f7322b Simulator dialogs: Fix incorrect handling of Validate(), which was called for all widgets by the default wxID_OK button handler. It is now called only for the active page of these dialogs (as wanted in code), therefore only for used widgets.
Note: strangely, this issue was noticed only on Windows, not on Linux.
2016-09-17 14:38:34 +02:00
jean-pierre charras 48f916bd63 Kicad manger: add .cir netlist files to the list of files to show in project tree.
Simulator: open/save worbook file dialog: the dialog opens the current project folder by default.
2016-09-17 09:34:16 +02:00
jean-pierre charras cd94da7972 Spice simulator and netlist generation: use only netnames (outdated option "use net numbers as net names removed" removed)
netlist generation: remove option "replace IC and U ref by X" (broken option).
All component refs are now prefixed by the Spice_Primitive field value.
Therefore the netlist used by Kicad ngsipce simulator and the spice netlist generated from dialog are the same.
(note: like previously, forbidden chars like ( and ) are replaced by _ in netnames)
2016-09-16 20:36:19 +02:00
jp-charras 1b62fdae92 Fixes: lp:1623060 (EEschema page orientation is not retrieved when compiled with KICAD_USE_SCH_IO_MANAGER=ON)
https://bugs.launchpad.net/kicad/+bug/1623060
2016-09-13 19:48:43 +02:00
Maciej Suminski b5bfa14057 Removed unused EDA_ITEM::m_Image field. 2016-09-12 11:50:06 +02:00
Chris Pavlina 21b76d0837 eeschema: short-circuit disambiguation for {sheet pin, sheet} 2016-09-08 08:31:09 -04:00
Nick Østergaard caafcde585 Add KICAD_ prefix to build switches
KICAD_ prefix was added to the USE_OCE and USE_SCH_IO_MANAGER build
switches together with a small description to the devdocs from
compiling.md.
2016-09-05 08:46:01 -04:00
jp-charras b63f2f81b7 Fixes: lp:1619436
https://bugs.launchpad.net/kicad/+bug/1619436
Eeschema crashes when selecting a text editor from the REC dialog. (Linux Only)
It happens only if a text editor was never selected in Kicad.
2016-09-05 09:02:15 +02:00
Wayne Stambaugh 24f6c4be21 Eeschema: add code to plugin manager to load a symbol from a library. 2016-09-03 14:28:17 -04:00
Wayne Stambaugh f477cc958c Eeschema: PART_LIB object clean up.
* Rename redundant function PART_LIB::GetEntry() to PART_LIB::GetAlias() which
  is more descriptive and move the GetAlias() function which was nothing more
  than a call to GetEntry().
2016-09-02 19:40:18 -04:00
Maciej Suminski fcedef836a Revert "Do not use double component primitives in Spice netlist exporter"
This commit creates more issues than resolves. It could happen that
there are components with different reference types (e.g. U1 and IC1)
that would be later converted to X1, causing a conflict.
2016-08-31 11:51:17 +02:00
Wayne Stambaugh 9287b42648 Revert commit 67230ac8e7. 2016-08-30 09:04:25 -04:00
Maciej Suminski 81e015036e Fixes for drawing color labels in simulator's signal list 2016-08-30 14:25:59 +02:00
Maciej Suminski f954abae4e Comments for NETLIST_EXPORTER_PSPICE 2016-08-30 14:25:59 +02:00
Maciej Suminski 67573f15be Do not use double component primitives in Spice netlist exporter
Fixes: lp:1617768
* https://bugs.launchpad.net/kicad/+bug/1617768
2016-08-30 14:25:56 +02:00
Johannes Maibaum b87bac22c7 Simulator: Fix probe and tune cursors on OSX. 2016-08-30 10:48:40 +02:00
jp-charras 69e4231303 Sch editor and Simulator: close the simulator frame when the schematic editor is closed, to avoid crash, due to the fact the simulator can try to access to a no more existing frame.. 2016-08-29 19:47:08 +02:00
jp-charras 26b1c732de Simulator: add simulator icon, and colored icons to identify more easily traces in trace list and cursor list. 2016-08-29 11:39:54 +02:00
Niki Guldbrand 67230ac8e7 Keep Source tree clean
* Move all generated files to the build tree during build so the source
  tree is kept clean.

Signed-off-by: Niki Guldbrand <niki.guldbrand@gmail.com>
2016-08-26 17:25:12 -04:00
jean-pierre charras 7e3aedda82 Slightly modify the way DIALOG_SIM_SETTINGS m_settingsDlg is created in SIM_PLOT_FRAME frame: for an obscure reason, if it is created in ctor SIM_PLOT_FRAME, m_settingsDlg has an annoying issue on Windows: when shown, the parent SIM_PLOT_FRAME is sent to the background. When created outside the ctor, this issue is gone. 2016-08-20 19:51:33 +02:00
jean-pierre charras 2456db3817 Simulator: Make a few strings translatable. 2016-08-20 17:37:51 +02:00
jean-pierre charras 13cfe74956 Simulator dialogs: fix minimal sizes and best sizes. 2016-08-20 17:25:51 +02:00
jean-pierre charras c0b1e4cd38 Do not allow spaces in component name (value field) in component library editor, in dialogs (Edit field, Create component).
In component libraries, a space in name breaks the library, and is not allowed.
2016-08-19 18:42:39 +02:00
Maciej Suminski 7ea120c2a1 Spice model editor by default looks for libraries in the project directory when there is no library assigned 2016-08-19 17:33:26 +02:00
Maciej Suminski e1d20dd6e3 NETLIST_EXPORTER_PSPICE skips removed pins when processing a list of sorted pins.
NETLIST_EXPORTER marks removed duplicates by setting them to NULL in m_SortedComponentPinList vector.
2016-08-19 17:32:30 +02:00
jean-pierre charras ea59ce40e1 sch_legacy_plugin.cpp: fix compil warnings about incorrect return type. 2016-08-19 17:31:46 +02:00
Maciej Suminski 42f6cf33a1 Unbind REPORTER from NGSPICE before deleting 2016-08-19 16:39:46 +02:00
Maciej Suminski fe30985742 Do not delete the NGSPICE singleton 2016-08-19 16:33:31 +02:00
Maciej Suminski 2a6b8f153b NGSPICE as a singleton
One cannot call ngSpice_Init() twice without unloading the dll. When calling
ngSpice_Init, we pass a pointer to a NGSPICE instance and thus it cannot be changed.
When any of the callback function is called with a stale pointer everything crashes.
2016-08-19 15:51:19 +02:00
Wayne Stambaugh bcfce68daa Fix debug build warning due to improper debug macro. 2016-08-19 08:53:06 -04:00
Wayne Stambaugh eaa7f3f114 Eeschema: implement schematic I/O plugin symbol library parser.
* Write SCH_LEGACY_PLUGIN_CACHE object for handling the legacy symbol library
  file format.

* Write legacy symbol library file parser.

* Write code to transfer cache to PART_LIB object so existing library save
  code can be used for round trip testing.  This is temporary until Eeschema
  is updated to use the plugin for library management rather than PART_LIB.

* Add LIB_XXXX object helper functions where there was no way to set the member
  variables of an object.

* Give the cache object friend status to some object where there are incredibly
  byzantine ways of setting text in LIB_XXXX objects.
2016-08-18 19:23:10 -04:00
Maciej Suminski cac571c056 Initialize ngspice only once 2016-08-18 18:10:00 +02:00
Maciej Suminski ad3c2ac4ea NGSPICE_NETLIST_EXPORTER: Display a message if there is a missing library. Wrap library file names in quotes. 2016-08-18 18:06:26 +02:00
Simon Richter bfb6e0bbb2 Convert remaining occurences of stri[n]cmp to str[n]casecmp.
This also reverses the substitution logic if strcasecmp is missing (config.h.cmake)
2016-08-16 10:27:09 +02:00
jean-pierre charras 01d3c72dda Cosmetic enhancement: add a dismiss icon to clarification menu "title" (the "title" is also the close menu command) 2016-08-15 20:22:54 +02:00
Maciej Suminski 41b75f0105 Added a missing header in netlist_exporter_spice.h 2016-08-15 17:16:54 +02:00
Maciej Suminski 43d93682a2 Fix locale in NGSPICE methods using LOCALE_IO instead of setlocale.
More information: https://lists.launchpad.net/kicad-developers/msg25763.html
2016-08-15 15:52:07 +02:00
Maciej Suminski 75f8b20493 libngspice is linked at compile time 2016-08-15 13:52:13 +02:00
jean-pierre charras 5ed19b6e82 Dialogs for simulator: cosmetic enhancements, make them translatable and resizable. Remove 2 printf used in debug. 2016-08-15 09:53:15 +02:00
Maciej Suminski 497b2a9442 CMake module for libngspice 2016-08-12 15:56:51 +02:00
jean-pierre charras 6e5628ceaf Avoid simulator crash if the simulation was not run, when using most of main menu commands, due to a null pointer not tested. 2016-08-12 15:36:43 +02:00
jean-pierre charras dd395a6854 Fix deprecated and shadowed var compil warnings 2016-08-12 11:00:58 +02:00
Maciej Suminski 18e99fa30f Fixed a crash with certain shared library versions 2016-08-11 14:42:21 +02:00
Maciej Suminski 6b3584ce9b fxup system ngspice.h 2016-08-11 14:42:19 +02:00
Maciej Suminski 6bfdfd5226 Look for libraries in the project path 2016-08-11 14:42:19 +02:00
Maciej Suminski 0cb1e80e00 Activate eeschema on tune/probe 2016-08-11 14:42:19 +02:00
Maciej Suminski dfb5c6bfdd Do not update values if simulation is rerun Otherwise sometimes the signal list might be cleared and a new list is not yet available, resulting in loss of signals and cursors. 2016-08-11 14:42:19 +02:00
Maciej Suminski d15eef06f9 Removed redundant debugging info 2016-08-11 14:42:18 +02:00
Maciej Suminski 2c29133c57 Use system ngspice.h file 2016-08-11 14:42:18 +02:00
Maciej Suminski 0667b7ba63 Fixed ngspice freeze when there is an error in the simulated netlist Does not work with current ngspice head, it has to be compiled from the official master branch. 2016-08-11 14:42:18 +02:00
Maciej Suminski 8227cd6d80 Do not recreate the simulator every time simulation is run 2016-08-11 14:42:17 +02:00
Maciej Suminski eeeb3e0a9a Simulator code formatting and clean up 2016-08-11 14:42:17 +02:00
Maciej Suminski 957c6ec417 Removed hard limit for ngspice netlist 2016-08-11 14:42:17 +02:00
Maciej Suminski 0a6390701d NGSPICE uses a more convenient function to generate DLL name 2016-08-11 14:42:16 +02:00
Maciej Suminski 46ecfd8139 Resized simulator dialogs 2016-08-11 14:42:16 +02:00
Johannes Maibaum c78462c4f5 sim: Modifications to compile the simulator on OSX. 2016-08-11 14:42:15 +02:00
Maciej Suminski c9a1b45666 Fixed probe & tune cursors under Windows. 2016-08-11 14:42:15 +02:00
Tomasz Wlostowski 80d8dd7205 sim: default to decade frequency sweep for ac analysis 2016-08-11 14:42:15 +02:00
Tomasz Wlostowski 1930cd4d66 sim: display labels on current scale when only currents are added to transient plot 2016-08-11 14:42:14 +02:00
Maciej Suminski e452992a6c Cursor centering fix 2016-08-11 14:42:14 +02:00
Maciej Suminski 2b041425e5 Resized Spice model dialog 2016-08-11 14:42:14 +02:00
Maciej Suminski ca36f15fee Temporary disable cursor centering 2016-08-11 14:42:14 +02:00
Maciej Suminski 6d7a7a3233 KICAD_SPICE CMake flag 2016-08-11 14:42:13 +02:00
Maciej Suminski 2c576afdf3 Fixed menu entries 2016-08-11 14:42:13 +02:00
Maciej Suminski ca13dc93b1 Support for simulation workbooks 2016-08-11 14:42:12 +02:00