Commit Graph

2949 Commits

Author SHA1 Message Date
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