Commit Graph

1588 Commits

Author SHA1 Message Date
Wayne Stambaugh ae54f34392 Eeschema: fix corrupted schematic and symbol library files.
Prevent user from pasting text with carriage return and/or line feed
characters in field value edit control in the schematic symbol and symbol
library properties dialogs.

Make all objects derived from GRID_CELL_TEXT_BUTTON use validators
correctly.

Add validators to FIELDS_GRID_TABLE object for field values other than
the mandatory fields.

Create a validator to check that a string is a valid LIB_ID.

Fixes lp:1828214

https://bugs.launchpad.net/kicad/+bug/1828214
2019-05-10 08:21:37 -04:00
Jeff Young 469231ae15 Move Pin, Symbol Text and Symbol Anchor to modern toolset. 2019-05-07 20:39:46 +01:00
Jeff Young f87d371b8b Move to shared COLLECTORS for sch and lib. 2019-05-06 15:31:23 +01:00
Jeff Young bcdc3ad90a Set IS_NEW flag on new images. And a bunch of cleanup of dead code. 2019-05-05 17:14:30 +01:00
Jeff Young 58ba573038 Handle cascading selections in placement.
See https://forum.kicad.info/t/call-for-testers-eemodern/16663/32
2019-05-05 17:14:29 +01:00
Jeff Young da988428cf Add modern toolset cut/copy/paste. They now use the system clipboard. 2019-05-05 17:12:59 +01:00
Wayne Stambaugh 7d803437e2 Eeschema: fix broken symbol library links.
Force the symbol library links whenever the symbol library table has been
modified.  This will use the cache as a fallback when a library has been
removed that contains links in the schematic rather than display.

Fix the SCH_COMPONENT symbol resolver when falling back to the cache.  The
resolver was using the LIB_ID ':' notation which was failing.  Replacing
':' with '_' fixed this issue.  This was also an issue when generating the
symbol message panel information.

Convert wxLogDebug to wxLogTrace in symbol resolver code path.  Add new
trace type KICAD_SYM_RESOLVE.

Fixes lp:1821606

https://bugs.launchpad.net/kicad/+bug/1821606
2019-04-30 13:05:27 -04:00
John Beard eccadd92fb Eeschema: fix resizing of pin table and edit symbol dialog
These dialogs had logic to avoid a table re-adjustment unless
the width changed. This was done to avoid spurious resizing
calls under GTK+3. This was commit
13249b723b, fixing bug lp:1817810.

However, by only calling event.Skip() when the width changed,
redraws were inhibited when only the height changed.

Placing the Skip() outside the width-change check fixes this,
and does not re-introduce the lp:1817810 bug (it is the column
adjust call that causes that).

Fixes: lp:1826615
* https://bugs.launchpad.net/kicad/+bug/1826615
2019-04-27 14:01:05 +01:00
Jeff Young a461eae8b9 Fix 100s of usages of GetFlags() which conflated != 0 with being edited.
While this was true long ago, many flags have been added since which
have nothing to do with editing (HIGHLIGHTED, BEGIN_ONPAD, etc.)
2019-04-22 09:58:06 +01:00
jean-pierre charras 6e8dd598c0 Minor fixes in translatable strings. Fix also a minor compil warning. 2019-04-22 09:34:28 +02:00
Jon Evans e2c12d8c25 Overhaul connectivity neighbor and global connection processing 2019-04-21 19:10:44 -04:00
Jon Evans eca9cc35c6 Update all labels on a migrated bus 2019-04-19 22:10:30 -04:00
Jeff Young 460909ea9a Move click-to-place tools to modern toolset. 2019-04-16 16:20:52 +01:00
Jeff Young 32c86a4ca4 Move place symbol to modern toolset. 2019-04-16 16:20:51 +01:00
Jon Evans 895d4c9e1a Hide simulator settings tabs that aren't implemented yet
Calling Hide() is apparently not enough in Windows
2019-04-15 23:11:39 -04:00
Seth Hillbrand 1437e56b72 eeschema: Prevent invalid '0' element in components
In the component, an m_unit/m_convert element is 1-indexed as opposed to
the library where they are 0-indexed.  The 0-index in the library is
reserved for those elements that are shared across all conversion/unit
whereas it is invalid for the component.

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

(cherry picked from commit c4be74a9d0)
2019-04-15 12:40:59 -07:00
Jon Evans 77706a7ea6 Fix ngspice nested DC sweep command
Fixes: lp:1824336
* https://bugs.launchpad.net/kicad/+bug/1824336

(cherry picked from commit c29274e760)
2019-04-13 16:39:00 -04:00
Jon Evans 734e61d4c2 Properly initialize sheets when loading them from ERC dialog
When displaying a sheet from this path, it's possible the sheet will
not have been initialized yet.  Call DisplayCurrentSheet() to make sure
it is initialized, and then call RedrawScreen to update the zoom level.

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

(cherry picked from commit 1c235a5c89)
2019-04-13 12:30:24 -04:00
jean-pierre charras 68c2f06074 Eeschema: fix crash when exporting a netlist, if the schematic netlist cannot be built.
It happens when a symbol is not annotated, and if the user closes the opened annotate dialog without making the annotation
2019-04-13 17:54:33 +02:00
jean-pierre charras 0fae86b1ba Pcbnew: suppress incorrect wx alert when opening the plot dialog from File/Plot menu 2019-04-11 17:36:51 +02:00
Jeff Young e90452d0e2 When checking for duplicate aliases look in the dialog not the symbol.
Fixes: lp:1821543
* https://bugs.launchpad.net/kicad/+bug/1821543
2019-04-10 21:21:00 +01:00
Jeff Young fe1c2310e4 Readjust Edit Symbol Properties when symbol references changes.
The new reference may contain different numbers of units and/or
different deMorgan conversion settings.

Fixes: lp:1822316
* https://bugs.launchpad.net/kicad/+bug/1822316
2019-04-09 17:06:27 +01:00
Jeff Young 684bb62fd8 Escape slashes in labels and netnames.
Also re-allows spaces, as they can already come in through sheet
names.

Fixes: lp:1798621
* https://bugs.launchpad.net/kicad/+bug/1798621
2019-04-07 00:24:10 +01:00
Wayne Stambaugh 615c49315f Minor symbol library rescue dialog fixes.
Adjust the sizer proportions slightly to eliminate the reported bug.
This may not be the ideal way to do this and there could be some issues
on other platforms but it does resolve the issue on gtk3.

Fixes lp:1820084

https://bugs.launchpad.net/kicad/+bug/1820084
2019-04-06 08:15:44 -04:00
Jeff Young d928aa9780 Infer pin properties from last pin and default pin pitch.
Fixes: lp:1822183
* https://bugs.launchpad.net/kicad/+bug/1822183
2019-04-05 18:52:51 +01:00
Jeff Young 2aad4a5e57 Remove dead code from removal of eeschema legacy canvas. 2019-04-05 15:54:31 +01:00
Jeff Young 3a1b412fbf Use a bigger hammer when refreshing fields in table.
Fixes: lp:1823050
* https://bugs.launchpad.net/kicad/+bug/1823050
2019-04-04 12:26:29 +01:00
Jeff Young 3ace73fbdd Fold various SCH pin shadow data structures into SCH_PIN. 2019-04-03 10:18:11 +01:00
Jeff Young b9a8680735 Disable alias controls when no alias is selected.
Fixes: lp:1821698
* https://bugs.launchpad.net/kicad/+bug/1821698
2019-04-01 13:23:37 +01:00
Jon Evans 05ed906aea Restore ERC checks that were accidentally removed 2019-03-31 19:57:12 -04:00
Jon Evans 5cf82f1a9e Begin refactoring netlist creation 2019-03-31 19:55:12 -04:00
Jon Evans 83c7e7fc65 New connectivity algorithm and bus upgrades
Bus upgrades: core new connectivity code

Bus upgrades: eeschema integration and modifications

Bus upgrades: eeschema dialogs

Bus upgrades: netlist export

Bus upgrades: file format changes
2019-03-31 19:53:41 -04:00
jean-pierre charras b00413b7d6 Symbol editor, DIALOG_LIB_EDIT_PIN_TABLE: fix crash when trying to delete a pin when the table is empty.
Fixes: lp:1822406
https://bugs.launchpad.net/kicad/+bug/1822406
2019-03-30 09:29:38 +01:00
John Beard edd94ce2d6 Eeschema: internal tidying of field editor ApplyData
Make a few things const (specficially the reference into
m_fieldStore - we should commit to not modifying that in this
function.

Also avoid a couple of needless string copies.

Also explicitly dereference the into a (non-const) reference at the outset.
For the whole if this function, comp is the same object and may not
be null (as it is used unchecked).
2019-03-27 10:22:21 +00:00
Baranovskiy Konstantin 11f03c8551 Eeschema: place new field near parent component
For now fields created in Fields Editor are placed at
position (0, 0).
Every new field must be placed at the origin of
the parent component.
2019-03-27 10:22:21 +00:00
Wayne Stambaugh a7c8df5666 Symbol editor: improve tooltip in symbol properties dialog.
Make the "Define as power symbol" checkbox tooltip more descriptive so
the user has a better understanding of enabling this option.

Fixes lp:1804932

https://bugs.launchpad.net/kicad/+bug/1804932
2019-03-20 15:54:30 -04:00
Wayne Stambaugh 07c61be7f0 Symbol editor: fix superfluous dialog display.
Call base object TransferDataFromWindow() to prevent Validate() from
being called twice.  Validation is handled completely under the hood
so there is no need to call Validate() directly.

Fixes lp:1820301

https://bugs.launchpad.net/kicad/+bug/1820301
2019-03-18 11:44:44 -04:00
Seth Hillbrand 0943c176a3 libedit: Don't move the field below the last item
There needs to be at least one item below the one we want to move down
in order to allow the action.

Fixes: lp:1820532
* https://bugs.launchpad.net/kicad/+bug/1820532
2019-03-17 20:20:17 -07:00
Seth Hillbrand 9bfce26ce7 Move env var substitution into GetAssociatedDocument
We always want the documents to have their variables replaced when
opening the associated file.

Fixes: lp:1819309
* https://bugs.launchpad.net/kicad/+bug/1819309
2019-03-10 08:39:36 -07:00
Jeff Young 69f003ba4a Remove previous cell selection fixes in favour of slow-click hack.
wxWidgets has several bugs that result in cell editors being closed
right after they're opened.  There are two wxWidgets hacks to
partially address this: the SetInSetFocus() hack, and a slow-click
hack.  We used to try and work-around these bugs ourselves for
single-click access, but this changelist moves those over to
wxWidget's slow-click hack.

Fixes: lp:1817965
* https://bugs.launchpad.net/kicad/+bug/1817965
2019-03-04 11:09:33 +00:00
jean-pierre charras a128ffdea6 DIALOG_LIB_NEW_COMPONENT_BASE: fix minor issues.
Fixes: lp:1818471
https://bugs.launchpad.net/kicad/+bug/1818471
2019-03-04 08:27:00 +01:00
Seth Hillbrand 38be0fccb7 Symlib table: Need button handler for files
The folder button handler works will for footprint libraries but we
needed a specific class for the schematic libraries as well.

Fixes: lp:1818346
* https://bugs.launchpad.net/kicad/+bug/1818346
2019-03-02 20:05:28 -08:00
Seth Hillbrand 84a1772e66 libedit: Control resize requests
Another GTK3 dialog with excessive resize requests.  Control the number
for re-draws based on grid size.

Fixes: lp:1818325
* https://bugs.launchpad.net/kicad/+bug/1818325
2019-03-02 05:49:18 -08:00
jean-pierre charras c2a7e5536e Eeschema: fix regression: set the max number of units per package to 64.
64 is the max number of units per package in 5.0.x

Fixes: lp:1818061
https://bugs.launchpad.net/kicad/+bug/1818061
2019-03-01 16:47:31 +01:00
Seth Hillbrand 13249b723b Handle excessive resize requests
For unknown reasons, GTK3 may send resize events when editing grid
fields.  This can cause the grid editor to exit, losing the focus and
overwritting the characters at the next input.

We avoid this by filtering the size events when the size doesn't change.

Fixes: lp:1817810
* https://bugs.launchpad.net/kicad/+bug/1817810
2019-02-27 11:32:30 -08:00
Jeff Young f494a24404 Resync lib_tree after editing aliases.
This also fixes an unrelated bug where the current part highlighting
would get lost after a rename.

Fixes: lp:1817639
* https://bugs.launchpad.net/kicad/+bug/1817639
2019-02-27 18:13:49 +00:00
John Beard 82734e7116 Adjust tab ordering in some dialogs
Introduce a shortcut method to set tab ordering and use it in
the dialogs that override the tab traversal orders:

* Eeschema sheet properties
* Pcbnew Move exact
* Pcbnew Move relative

Also set some initial focus fields in the same dialogs.

Tidy a few includes.

Fixes: lp:1816009
* https://bugs.launchpad.net/kicad/+bug/1816009
2019-02-23 14:49:38 +00:00
John Beard 29c8f92c27 Eeschema: move EDIT_COMPONENT_IN_SCHEMATIC to own header
Move the class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC to its own
header, and move the SCH_EDIT_FRAME::EditComponent out of the
dialog implementation file. Thus, users of the dialog are
coupled only by the dialog header, as usual.

Also tidy some includes and comments.
2019-02-21 10:04:29 +00:00
John Beard 75406e2742 Libedit: Fix cancel button in symbol edit dialog
In DIALOG_EDIT_COMPONENT_IN_SCHEMATIC, the Cancel button is
connected to a dedicated handler to deal with the footprint
browser widget. DIALOG_EDIT_COMPONENT_IN_LIBRARY should have
the same logic.

Fixes: lp:1816636
* https://bugs.launchpad.net/kicad/+bug/1816636
2019-02-20 23:00:22 +00:00
Seth Hillbrand f40dfa2765 eeschema: Refresh canvas when the options change
Windows doesn't appear to properly re-paint after an options change.
This forces the repaint when setting options

Fixes: lp:1816506
* https://bugs.launchpad.net/kicad/+bug/1816506
2019-02-19 17:04:51 -08:00
Seth Hillbrand b4c0af021e eeschema: Handle Windows click ordering
Click to add/edit footprint filters under MSW requires handling the
listbox double click first before the item is handled.

Fixes: lp:1816182
* https://bugs.launchpad.net/kicad/+bug/1816182
2019-02-19 12:51:40 -08:00
Seth Hillbrand d1c9dd67ac eeschema: Clean up last RefreshRect
Unimplemented call in GAL canvas.
2019-02-19 10:52:38 -08:00
Jeff Young d751fecd8a Tooltip and error message improvements. 2019-02-17 10:20:29 +00:00
Seth Hillbrand 813578eba6 Fix a few coverity errors 2019-02-15 20:15:04 -08:00
Seth Hillbrand 6de8997624 libedit: Connect click actions to add/edit
Connects standard add/edit actions to mouse events in the footprint
filter listbox

Fixes: lp:1816182
* https://bugs.launchpad.net/kicad/+bug/1816182
2019-02-15 16:52:28 -08:00
Seth Hillbrand c37aac56e6 libedit: Set initial pin properties when editing
This allows the invisible pins to be drawn as grey

Fixes: lp:1816178
* https://bugs.launchpad.net/kicad/+bug/1816178
2019-02-15 16:00:39 -08:00
Seth Hillbrand 6a4d700dc8 eeschema: Show ERC buttons in all pages
This places the Delete markers/Run/Close buttons at the bottom of the
form rather that inside the panel.  Allows the user to access the
functions even when on a different panel.

Fixes: lp:1815102
* https://bugs.launchpad.net/kicad/+bug/1815102
2019-02-09 19:17:53 -08:00
Wayne Stambaugh 7789ec4bf1 Eeschema: fix highlight hierarchical pin name in properties dialog.
Fixes lp:1785840

https://bugs.launchpad.net/kicad/+bug/1785840
2019-02-07 13:03:38 -05:00
Wayne Stambaugh 44cb979e91 Decouple SCH_EDIT_FRAME from symbol rescue and remap dialogs.
Do not keep pointer to SCH_EDIT_FRAME in the rescuer object to prevent
it from creating dialogs with itself as the parent when call from the
rescue dialog which is itself a grandchild of the frame window.
2019-02-05 12:43:46 -05:00
John Beard 0c6ec7dbb3 LIB_TABLE_BASE: Const and unsigned fixes
* Make LIB_TABLE_BASE::GetCount() return unsigned. This is more
  consistent with the behaviour of STL containers (especially the
  boost::ptr_vector this is really accessing). Sadly
  wxGridTableBase() forces an int, so a cast is still required
  at the WX interface.
* Make LIB_TABLE_BASE::At() return a reference. First, this is more
  consistent with normal STL indexing operator[]'s, and secondly, it
  allows an idiomatic const index method (so you can access const
  LIB_TABLE_ROWs from a const LIB_TABLE_BASE).

The motivation is to allow use of this class and LIB_TABLE_ROW
in a test program, where the LIB_TABLE_BASE is const.
2019-02-05 08:49:52 -08:00
Jeff Young 8ca76177c0 Prevent hiding of reference column.
Using the quantity column for the collapse/expand controls feels too odd
when you expand and everything under the parent is a '1'.

Fixes: lp:1780847
* https://bugs.launchpad.net/kicad/+bug/1780847
2019-02-03 23:38:02 +00:00
Seth Hillbrand c08736e245 Assign stack pointer to lib table
When creating new lib table rows, the pointer becomes managed by the new
table through the boost::ptr_vector.  The row is non-copyable, however,
so we lose the reference as soon as it goes out of scope. Creating a
clone provides a new pointer that is moved into the table on creation.

Fixes: lp:1792456
* https://bugs.launchpad.net/kicad/+bug/1792456
2019-02-03 05:20:50 +01:00
Seth Hillbrand 5c3f6f2abf eeschema: Fix grid assignment error
Assignment of columns was offset based on the quantity column.  This
cleans the implementation as well as setting the correct width

Fixes: lp:1814380
* https://bugs.launchpad.net/kicad/+bug/1814380
2019-02-02 18:42:51 +01:00
Jeff Young a375edf9ac Perform cancel action by hand.
Fixes: lp:1814138
* https://bugs.launchpad.net/kicad/+bug/1814138
2019-01-31 19:07:07 +00:00
Jeff Young ba7b970817 Add pre-select architecture to grid helper icon-text-buttons.
Fixes: lp:1813973
* https://bugs.launchpad.net/kicad/+bug/1813973
2019-01-31 01:09:03 +00:00
John Beard 88f9f6f072 Break out ref-des-centric functions to own header
This breaks the following functions out to a general-purposed refdes utils
header:

* MODULE::GetReferencePrefix()
* kicad_string.h RefDesStringCompare()

This acheives:

* Slimming of MODULE interface
* Placement of refdes code in common rather than pcbnew
** Testing of this code in qa_common
* Tighter and smaller includes for code that only needed refdes functions

Note: there are failing tests commited (as expected failures). These
are the cause of lp:1813669 and will be fixed as a follow-up commit.
2019-01-30 15:41:36 -08:00
Jeff Young 19c9ae7ecb Use updated value when checking for empty.
Fixes: lp:1813640
* https://bugs.launchpad.net/kicad/+bug/1813640
2019-01-30 16:29:21 +00:00
Seth Hillbrand 872f0eb44c eeschema: Set grid editor to use qty as the drop-down
Symbol fields uses a custom expander control.  This should be tied to a
column that cannot be hidden in order to ensure the ability to view sub
elements remains intact, like the standard control.

Fixes: lp:1780847
* https://bugs.launchpad.net/kicad/+bug/1780847
2019-01-29 17:10:58 -08:00
jean-pierre charras b8cfabd22e Fix some issues in I10n strings
Fix typo and missing I10n identifier for 2 strings
2019-01-26 09:25:12 +01:00
jean-pierre charras 4cd41e3941 Eeschema: avoid using a incorrect background color the first time a SCH_DRAW_PANEL is displayed
When starting Eeschema, or a frame/dialog using a SCH_DRAW_PANEL, the bg color was initialized too late,
thus creating a flicker or an annoying draw artifact (in SYMBOL_PREVIEW_WIDGET for instance) if a Paint event
is fired before the right bg color is initialized.
Initializing the bg color earlier fix this issue.

Fixes: lp:1797203
https://bugs.launchpad.net/kicad/+bug/1797203
2019-01-25 20:32:46 +01:00
Wayne Stambaugh 2dcba4723d Lay groundwork for loading the initial global footprint library table.
Factor out common dialog code from global symbol library table dialog for
loading initial library table.

Update global symbol library table code to user factored out common dialog
code.
2019-01-20 13:09:49 -05:00
Baranovskiy Konstantin 8400ee41c0 Grid tricks: cell selection fixes.
CHANGED: First click sets a cursor to the specified cell, second click
activates editor (current realization, where first click activates cell
editor, is very buggy especially with cells selection).

Set cursor on cell of reference on mouse left click in Fields editor of
Eeschema.
2019-01-19 14:54:37 -05:00
Baranovskiy Konstantin 4ea08d477d Clear comp highlighting before highlight new one.
On clicking a reference cell in the field editor of Eeschema a
corresponding component is highlighted in Eeschema. But previously
highlighted components are staying highlighted.

With current patch all highlightings are cleared before highlighting
selected component.
2019-01-19 14:54:29 -05:00
Seth Hillbrand c3a295df1a Fix segfaults from not checking index
Return value of wxArrayString.Index() always needs to be check for
existence.
2019-01-17 10:23:25 -08:00
jean-pierre charras e7fa02a9f0 DIALOG_BOM: fix a few issues. Mainly an annoying issue when a plugin file was not found
Previously, all the dialog setup was lost.
2019-01-14 13:14:13 +01:00
Seth Hillbrand a0a4e5e18d libedit: Small edit component cleanup
Initialize local variables and ensure that the SPICE edit button is not
shown in compiles that do not support it.
2019-01-12 06:58:40 -08:00
Seth Hillbrand 634d02bd04 libedit: Check proper field grid type
Fixes segfault where pointers are not zeroed

Fixes: lp:1811519
* https://bugs.launchpad.net/kicad/+bug/1811519
2019-01-12 06:51:09 -08:00
Jeff Young 81a0ab4d7e Don't return wxID_OK from a cancel.
Also fixes the Save icon not getting enabled/disabled.

Fixes: lp:1810116
* https://bugs.launchpad.net/kicad/+bug/1810116
2019-01-10 17:41:33 +00:00
Jeff Young 15af0cc43d Don't inherit previously-selected alias properties when deleting.
Fixes: lp:1810768
* https://bugs.launchpad.net/kicad/+bug/1810768
2019-01-10 17:41:33 +00:00
Seth Hillbrand 170ff66cbb libedit: Allow SPICE parameter editing
This fixes a regression to allow SPICE parameters to be added to the
symbol in libedit.

Fixes: lp:1793062
* https://bugs.launchpad.net/kicad/+bug/1793062
2019-01-09 21:43:23 -08:00
Wayne Stambaugh 906161dcf8 Fix configuration dialog layout issues on GTK. 2019-01-09 17:35:12 -05:00
John Beard 658cc8fd96 Wildcards: unify handling of all files wildcards
Use the AddFileExtListToFilter() to also generate the
wildcard for "all files". This is because:

* Users can use AddFileExtListToFilter for the all files WC
  with the same interface as for any other extensions.
* Users do not need to worry about wxGetTranslation, as the
  _() is applied in the same way as the other *Wildcard() helpers,
  and it is a function just like the others, so it is consistent
* There is a testable interface to document the expected result.
  The test is added.
2019-01-09 08:57:42 -05:00
jean-pierre charras 1ca3b2c768 Eeschema: DIALOG_FIELDS_EDITOR_GLOBAL: fix missing clearing old highlight when highlighting a new symbol or exiting the dialog 2019-01-09 14:38:44 +01:00
Seth Hillbrand 31ab4e6c9a eeschema: Simplify netlist dialog
The default filename textbox confusingly could not be edited and the
checkbox for "Use default filename" would also use a default location.
As the netlist export is no longer required in the workflow, we can
simplify the layout to always show the user the file save dialog
allowing them to choose the location and name of the exported netlist
file.
2019-01-08 09:26:36 -08:00
Seth Hillbrand 3b54a44540 wildcard strings update
Replace a few other cases where we used Windows-only or *nix specific
wildcard strings
2019-01-05 20:26:45 -08:00
Seth Hillbrand 02a1bf1de6 eeschema: Use system-dependent default wildcard
wxWidgets provides a system-dependent string for "*" or "*.*" depending
on the system.  Unfortunately, wxFormBuilder does not use this and
instead defaults to the Windows-only "*.*".  This is an ugly work
around.

Fixes: lp:1810221
* https://bugs.launchpad.net/kicad/+bug/1810221
2019-01-05 20:18:59 -08:00
Seth Hillbrand 37967eb685 eeschema: init pin table local var
Explicitly set modified to false when instantiating
2019-01-02 19:41:18 -08:00
Jeff Young ad0d9f8df0 Save user-defined nicknames.
While name and path fields would make more sense, this commit
encodes the nickname as an "opts" field so that older versions will
still read the preferences file.
2018-12-28 20:34:06 +00:00
Jeff Young 2c53ab3d8c Fix debug assert. 2018-12-11 17:56:41 +00:00
jean-pierre charras a40cff18d3 PANEL_EESCHEMA_SETTINGS_BASE: very minor cosmetic enhancement. 2018-12-07 11:30:52 +01:00
jean-pierre charras f1c1c5db3f Fix a minor compil warning 2018-12-07 11:22:03 +01:00
Jeff Young ff6a3482ec Remove on-kill-focus-validation.
Fixes: lp:1805361
* https://bugs.launchpad.net/kicad/+bug/1805361
2018-11-29 19:00:21 +00:00
Maciej Suminski 6d8ca311f8 Fix a crash after clicking 'delete' button with empty Template Field Names grid 2018-11-29 14:09:07 +01:00
Jeff Young 6bf0e17036 Fix typo which was keeping rename from working.
(Renaming the dialog window instead of the libentry doesn't really
do the trick.)
2018-11-25 01:51:45 +00:00
Jeff Young 239482ec98 Add tooltips to Symbol Properties dialogs.
Fixes: lp:1804931
* https://bugs.launchpad.net/kicad/+bug/1804931
2018-11-24 15:06:21 +00:00
Jeff Young 2e1920abad Add tooltips to library manager dialogs.
Fixes: lp:1804930
* https://bugs.launchpad.net/kicad/+bug/1804930
2018-11-24 15:06:21 +00:00
Jeff Young b2db49f4ac Add browse buttons to Library Manager dialogs.
Fixes: lp:1804924
* https://bugs.launchpad.net/kicad/+bug/1804924
2018-11-24 15:06:21 +00:00
jean-pierre charras db7deff21b DIALOG_SPICE_MODEL_BASE: fix minor wxWidgets alerts. 2018-11-23 10:21:57 +01:00
Jeff Young ed6c68a1e3 Clean up handling of component fields.
In particular the datasheet field and how its handled with aliases,
but also cleaning up duplicated functionality around aliases and
libids.
2018-11-22 21:31:45 +00:00
jean-pierre charras 8522baf4a7 bom_plugins.cpp: fix incorrect command line for python scripts on Windows.
* On Windows, a python command line must be python <script_path>/script.py
and not python <script_path>\script.py
* Fix also a incorrect warning message when a script is not found.
2018-11-19 17:50:38 +01:00
Maciej Suminski 2ee2d9014a Populate BOM plugins list if the list is empty
Fixes: lp:1464893
* https://bugs.launchpad.net/kicad/+bug/1464893
2018-11-19 16:17:53 +01:00
Maciej Suminski 15772e4b0b BOM plugins refactor
Extended BOM_PLUGIN to a class and moved the plugin construction related code there.
2018-11-19 15:59:08 +01:00
jean-pierre charras b35b1bb644 Fix a few minor I18n issues.
Especially remove trailing and leading spaces in sentences, always annoying in translations, and never useful in sources.
2018-11-16 18:12:01 +01:00
Maciej Suminski e3bcd31bff Added a dialog to confirm discarding unsaved changes in Pin Table dialog. 2018-11-16 16:10:53 +01:00
Jeff Young 4050991d28 Move ERC marker focusing to GAL architecture.
Fixes: lp:1802537
* https://bugs.launchpad.net/kicad/+bug/1802537
2018-11-16 10:38:44 +00:00
jean-pierre charras 1f3d5cee0e Fix a few minor I18n issues. 2018-11-15 09:34:29 +01:00
Maciej Suminski 298a033b9d Fixed a crash on moving down the last field in the Symbol Properties dialog 2018-11-13 14:14:08 +01:00
Maciej Suminski 44424dcbb3 Fixed a crash in Symbol Properties dialog
Fixes: lp:1802641
* https://bugs.launchpad.net/kicad/+bug/1802641
2018-11-13 14:02:16 +01:00
jean-pierre charras 436f80a0bb eeschema/dialogs/dialog_lib_edit_pin_base.cpp: fix a minor wxWidgets alert 2018-11-13 13:03:38 +01:00
jean-pierre charras f7cf40f2f4 Fix a few Coverity warnings.
Sometimes a dynamic_cast was used without testing the returned value.
Some are replaced by static_cast, when the dynamic_cast was useless.
2018-11-11 08:28:58 +01:00
Maciej Suminski 02f81d7419 Handle 'show page limits' in eeschema 2018-11-08 09:57:16 +01:00
Jeff Young c4cd81a906 Remove side-effect of LIB_FIELD::SetText().
Fixes: lp:1800545
* https://bugs.launchpad.net/kicad/+bug/1800545
2018-10-31 12:57:23 +00:00
jean-pierre charras c49917c5a8 Dialog edit component in lib: Fix a few minor wxWidgets alerts. 2018-10-28 18:42:16 +01:00
Wayne Stambaugh ce34a713b4 Eeschema, make BOM tool add file dialog remember last used path.
Fixes lp:1797679

https://bugs.launchpad.net/kicad/+bug/1797679
2018-10-25 10:33:19 -04:00
Michael Kavanagh 3248c270ee Update Eeschema BOM dialog html help text
Now links to relevant section in stable eeschema docs.

Fixes: lp:1798248
https://bugs.launchpad.net/kicad/+bug/1798248
2018-10-22 13:19:15 -04:00
jean-pierre charras 1116acd74b Libedit: Fix broken handling of "common to all bodu style" property of lib draw items.
Fix a minor wxWidgets assert.
2018-10-20 12:38:36 +02:00
Jeff Young baa4019448 Draw pin previews with the correct schematic background color.
Fixes: lp:1798447
* https://bugs.launchpad.net/kicad/+bug/1798447
2018-10-18 13:27:41 +01:00
Jeff Young 8a54b1b3b7 Add view refresh calls for edit operations.
Note that the bug referenced in the "fixes" section is only one
of many addressed by this commit.

Fixes: lp:1798449
* https://bugs.launchpad.net/kicad/+bug/1798449
2018-10-18 12:12:48 +01:00
Jeff Young e9a80a5d7f Some minor dialog layout fixups. 2018-10-17 11:23:02 +01:00
Jeff Young 1114b5cfa9 Refresh item when its dangling state changes.
Fixes: lp:1797996
* https://bugs.launchpad.net/kicad/+bug/1797996
2018-10-16 17:07:59 +01:00
Jeff Young 0bd0558833 Auto-select reference numbers in PcbNew like we do in Eeschema. 2018-10-14 00:06:41 +01:00
Tomasz Włostowski e988cd9c25 Fixed crash in footprint chooser in eeschema triggering in standalone/no-pcbnew mode
Fixes: lp:1797644
* https://bugs.launchpad.net/kicad/+bug/1797644
2018-10-12 23:43:08 +02:00
Jeff Young 779ef044b7 Fix wxGrid column dragging bugs.
Close an open editor when dragging (as wxWidgets won't move it).

Make sure native column headers aren't in use where we need dragging:
their interaction with wxWidgets' dragging is buggy.

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

Fixes: lp:1796396
* https://bugs.launchpad.net/kicad/+bug/1796396
2018-10-09 21:33:43 +01:00
Jeff Young 55c1ca1191 Handle pin sorting properly for values.
The pin number sorter doesn't handle units at all, and seems to
stumble on negative numbers.

Fixes: lp:1796869
* https://bugs.launchpad.net/kicad/+bug/1796869
2018-10-09 14:56:29 +01:00
jean-pierre charras 88cdce8d62 Make SYMBOL_PREVIEW_WIDGET working, and using the canvas type of the caller. Fix an issue with F3 zoom key in libedit. 2018-10-09 11:08:56 +01:00
Jeff Young 96724af2c4 Ensure junctions and no-connects are visible even on fat wires.
Also adds a preference for junction size.

Fixes: lp:1545422
* https://bugs.launchpad.net/kicad/+bug/1545422
2018-10-09 11:08:56 +01:00
Jeff Young 37cfa3fed9 Cleanup unused and redundant stuff. 2018-10-09 11:08:56 +01:00
Jeff Young 5fd20ee786 Implementation of ERC markers. 2018-10-09 11:08:55 +01:00
Jeff Young 47189034aa Grid settings for LibEdit. 2018-10-09 11:08:55 +01:00
Jeff Young afeebc8944 Grid settings for Eeschema GAL.
Split antialiasing options out from display options.  Move
antialiasing to common.  Duplicate the rest of display options
for Eeschema.

Implement OnSelectGrid and hookup GAL canvas refresh to
SetPresetGrid.

Add Grid Settings... to View menu and move Show Grid from
preferences to View Menu to match Pcbnew.
2018-10-09 11:08:55 +01:00
Jeff Young 1c52824913 Rewrite unit/convert handling so it also works for LibEdit. 2018-10-09 11:08:55 +01:00
Jeff Young 6eafb9a2fd Convert Rescue Symbols dialog previews to GAL. 2018-10-09 11:08:55 +01:00
Jeff Young 538a5d49ee Fix up GAL version of Symbol Viewer.
Also includes some preliminary work for supporting hidden pins,
pin electrical names, and other preferences.
2018-10-09 11:08:55 +01:00
Jeff Young 7cbfa08ddd Move symbol chooser dialog preview to GAL. 2018-10-09 11:08:55 +01:00
Tomasz Wlostowski 90c7c60471 eeschema-gal: initial GALified version. Lots of stuff still to do! 2018-10-09 11:08:52 +01:00
Jeff Young 90df7a8b22 Sort references before removing duplicates.
std::unique only works within consecutive blocks, so the list must
be sorted first.  (We need it sorted in the end anyway, so no
big deal.)
2018-10-08 00:14:07 +01:00
Jeff Young 8015334683 Don't resize hidden columns.
wxGrid columns are hidden by setting their width to 0.  Resizing
them will "unhide" them.

Fixes: lp:1796150
* https://bugs.launchpad.net/kicad/+bug/1796150
2018-10-05 14:17:58 +01:00
Jeff Young 3c2aafd7b7 Move Edit Symbol References to standard text/button control. 2018-09-29 22:07:31 +01:00
jean-pierre charras 094f340359 Eeschema: Opening "Edit Symbol Fields" dialog crashes Eeschema
Fixes: lp:1795088
https://bugs.launchpad.net/kicad/+bug/1795088
2018-09-29 10:08:29 +02:00
Jeff Young 6fdfd0932e Use newer wxWidgets calls (old ones aren't available on MSW). 2018-09-27 18:53:46 +01:00
Jeff Young 5703060d87 Turn off escaping names for now.
Fixes: lp:1794816
* https://bugs.launchpad.net/kicad/+bug/1794816
2018-09-27 17:21:49 +01:00
Jeff Young e456ecd0a1 Calculate column widths based on all data, not just shown data.
Also caps the calculated width at 1/3 of the default dialog width.

Fixes: lp:1794625
* https://bugs.launchpad.net/kicad/+bug/1794625
2018-09-27 16:57:25 +01:00
Jeff Young 521183a587 Work in progress to allow arbitrary chars in references, etc. 2018-09-27 11:56:51 +01:00
Simon Richter 1253020a8b Add missing header 2018-09-24 10:47:15 -04:00
jean-pierre charras b70d0f43b6 Fix minor compil warnings. 2018-09-24 13:12:47 +02:00
Maciej Suminski e6f2c49eae Spice model editor: support for JFET models 2018-09-22 19:05:01 +02:00
Maciej Suminski f2f6dffd16 Refactored logic in Spice model editor dialog
- Removed redundant enums
- Stored Spice model description in an array
- Made code generic by using the model description array
2018-09-22 19:04:54 +02:00
Jeff Young 5974899fa5 Clean up file locations and names. 2018-09-22 16:23:13 +01:00
Jeff Young 618182dcd6 Use pin number sorting algorithm in pin table.
Fixes: lp:1793180
* https://bugs.launchpad.net/kicad/+bug/1793180
2018-09-19 22:23:18 +01:00
Jeff Young e5e1a315f1 Keep name & value in sync for library items.
Also fixes library reference highlighting from board footprints.

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

Fixes: lp:1792256
* https://bugs.launchpad.net/kicad/+bug/1792256
2018-09-13 16:41:23 +01:00
Jeff Young 806b1fc63d Fix bugs to enable read-only grid cells to be copied.
Fixes: lp:1791129
* https://bugs.launchpad.net/kicad/+bug/1791129
2018-09-12 14:01:36 +01:00
jean-pierre charras bfb0fac015 Minor fixes related to I18n 2018-09-05 13:59:20 +02:00
Jeff Young 95a08d0dbc Follow file naming conventions. 2018-09-01 14:05:16 +01:00
Jeff Young 270f81f03d Make fill colour terminology more consistent.
Fixes: lp:1789855
* https://bugs.launchpad.net/kicad/+bug/1789855
2018-09-01 14:05:16 +01:00
Jeff Young c90a3efea2 Change KIDIALOG hashing algorithm to __FILE__ + __LINE__.
Using Title + Message wasn't working for all the dialogs which
did substitutions in the message (which was a lot of them).

Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
2018-08-29 23:38:23 +01:00
Jeff Young 946f4a217d Fix grid sizing for symbol aliases. 2018-08-29 20:08:01 +01:00
Jeff Young 00b2c21820 Missed a HIG destructive button separation. 2018-08-29 20:08:00 +01:00
Jeff Young a9c8a7b69c Remove unused warp mouse parameter. 2018-08-29 19:59:02 +01:00
Jeff Young 45bc1b1aff Add single-click editing to grid cells. (Experimental.) 2018-08-29 19:59:02 +01:00
Jeff Young b90a261d5c More safety fixes for uncommitted grid changes. 2018-08-29 19:59:01 +01:00
Wayne Stambaugh 089f27f485 Remove more dialog control borders. 2018-08-27 15:11:27 -04:00
jean-pierre charras c756fc318e Fix a few wxWidgets minor alerts in DIALOG_EDIT_COMPONENTS_LIBID_BASE. 2018-08-22 17:14:30 +02:00
Jeff Young 779398891d Follow HIG guidelines for destructive button separation. 2018-08-21 10:34:41 +01:00
Jeff Young 65f62f93ef Fix MSW spacing issues. 2018-08-21 10:34:41 +01:00
Jeff Young afacb6e7cb Improve safety around un-committed grid changes. 2018-08-21 10:34:41 +01:00
jean-pierre charras 8fd686e8f4 Eeschema: Fix 2 minor compil warnings. Pcbnew, very minor fix: avoid using fixed scaling factor in code. Use internal units conversion instead. 2018-08-15 13:39:25 +02:00
Jeff Young d72fdaed29 Rewrite Library Symbol Properties dialog.
Fix the user-model issues around aliases and alias selection.
Fold Library Symbol Fields into Library Symbol Properties.
Update to the new look.

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

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

Fixes: lp:1786339
* https://bugs.launchpad.net/kicad/+bug/1786339
2018-08-14 13:54:04 +01:00
Jeff Young 4b1a31ffad Regularize save-changes dialogs. 2018-08-12 00:02:37 +01:00
Jeff Young e932eed738 Allow TemplateFieldNames to specify URL-behaviour.
Fixes: lp:1785879
* https://bugs.launchpad.net/kicad/+bug/1785879
2018-08-11 17:14:27 +01:00
jean-pierre charras d2eb9e0735 Eeschema, Dialog annotate: fix incorrect management that creates a crash when try to open it a second time.
Fixes: lp:1786618
https://bugs.launchpad.net/kicad/+bug/1786618
2018-08-11 17:19:24 +02:00
Jeff Young bea98d8265 Reimplement close for Annotation dialog.
wxWidgets auto-dialog-handling for modeless dialogs just hides
them.

Fixes: lp:1785526
* https://bugs.launchpad.net/kicad/+bug/1785526
2018-08-07 17:01:44 +01:00
Jeff Young 9aa043ef48 Reinstate close/cancel handling for ERC dialog.
It needs it because it's a modeless dialog.

Fixes: lp:1785655
* https://bugs.launchpad.net/kicad/+bug/1785655
2018-08-06 21:31:53 +01:00
Jeff Young d788c9d479 Move library table dialogs from PLAYER to KIFACE interface.
Spooling up a full PLAYER in the background takes too long.

This also fixes bugs around how the tables are saved, although
that was just missing code rather than anything architectural.

Fixes: lp:1785436
* https://bugs.launchpad.net/kicad/+bug/1785436
2018-08-06 21:31:53 +01:00
Jeff Young 9e84c3fc3b Use a white background for "No symbol selected" message. 2018-08-06 13:48:17 +01:00
Jeff Young 0fbe702043 Layout adjustments to Choose Symbol and Choose Footprint. 2018-08-06 13:48:17 +01:00
jean-pierre charras e556cb8c91 Fix a minor wxWidgets debug alert. 2018-08-03 21:28:44 +02:00
Wayne Stambaugh 8e7d6063fd Minor dialog and frame window improvements.
Drop all uses of wxRAISED_BORDER and wxSUNKEN_BORDER from dialogs and
panels used in main frame windows.

Drop use of wxSP_3DSASH options on all wxSplitterWindow definitions.

Minor dialog alignment and spacing fixes.
2018-08-02 13:00:41 -04:00
jean-pierre charras ce3760438c Fix a few wxWidgets minor asserts. Fix also a missing bitmap button initialization.
Fixes: lp:1783703
https://bugs.launchpad.net/kicad/+bug/1783703
2018-08-02 13:22:11 +02:00
Jeff Young d8d4f75fa1 Fix button order and genralize Exit dialog so it can be shared more.
This also fixes a bunch of bugs where an error during save would
still close the window (rather than cancelling the close action).

Fixes: lp:1785034
* https://bugs.launchpad.net/kicad/+bug/1785034
2018-08-02 11:01:03 +01:00
Maciej Suminski 53236a3838 Removed redundant 'v' in noise simulation command
Fixes: lp:1784282
* https://bugs.launchpad.net/kicad/+bug/1784282
2018-08-01 17:28:55 +02:00
Jeff Young 196bdc05db Delete empty fields from Symbol Fields editor.
Fixes: lp:1784718
* https://bugs.launchpad.net/kicad/+bug/1784718
2018-08-01 09:35:46 +01:00
Jeff Young 97f7bd4cb9 Push component tree down into common.
Precondition to reusing component tree for footprints.
2018-08-01 09:35:45 +01:00
Wayne Stambaugh 61b68e2476 Eeschema: fix print dialog button sizer layout issue. 2018-07-31 10:34:30 -04:00
jean-pierre charras e750382e75 Fix a few wxWidgets minor asserts 2018-07-29 17:27:11 +02:00
jean-pierre charras f5e23e4f1a Fix a few wxWidgets minor asserts 2018-07-29 12:54:36 +02:00
Jeff Young 421204ae80 Improve Reset to Defaults button lable.
Also updates action buttons to a sdbSizer so the order is correct
on OSX.

Fixes: lp:1783584
* https://bugs.launchpad.net/kicad/+bug/1783584
2018-07-27 14:58:19 +01:00
Jeff Young 3c2c5c38ad Make icon buttons slightly wider for MSW.
Fixes: lp:1783703
* https://bugs.launchpad.net/kicad/+bug/1783703
2018-07-27 14:58:19 +01:00
Jeff Young cd3d4b106a Add event.Skip() call so someone else handles the focus.
DIALOG_EDIT_ONE_FIELD::OnSetFocusText() is only for setting the
selection correctly, not doing the actual focus.

Fixes: lp:1783615
* https://bugs.launchpad.net/kicad/+bug/1783615
2018-07-26 15:43:53 +01:00
Jeff Young cb61525394 Handle separate parsing rules for ID_SCH and ID_PCB.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.

Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
2018-07-26 15:43:53 +01:00
Jeff Young b5634b1d08 Dialog spacing cleanup. 2018-07-26 15:43:53 +01:00
jean-pierre charras f13a546c9b Fix a few wxWidgets asserts or alerts. 2018-07-25 20:26:55 +02:00
Jeff Young 05b2060e12 Replace missing growable-row spec.
Fixes: lp:1783545
* https://bugs.launchpad.net/kicad/+bug/1783545
2018-07-25 14:41:20 +01:00
Jeff Young 83a56263d0 Strip returns, tabs and linefeeds from SCH fields.
Fixes: lp:1783285
* https://bugs.launchpad.net/kicad/+bug/1783285
2018-07-24 16:41:19 +01:00
Jeff Young 4d3aeb3339 Make sure cur_lib_table is initialized.
The panel doesn't get Show() events so do it in the constructor.
2018-07-23 23:50:13 +01:00
jean-pierre charras 306729f3b7 DIALOG_ANNOTATE: fix a minor cosmetic issue, and make translation of 2 texts more easy. 2018-07-23 15:48:28 +02:00
Jeff Young 9ca9225977 Add elipsis to Page Setup button. 2018-07-22 23:39:18 +01:00
Jeff Young 2a9856ba34 Refresh eeschema print dialog.
Use standard button layout and remove extraneous heading.
Move to TransferDataTo/FromWindow.
Close dialog after printing.

Fixes: lp:1763319
* https://bugs.launchpad.net/kicad/+bug/1763319
2018-07-22 23:29:07 +01:00
Jeff Young 7f64f41242 Fix layout issues in Global Label dialog.
Fixes: lp:1782904
* https://bugs.launchpad.net/kicad/+bug/1782904
2018-07-22 16:21:51 +01:00
Jeff Young 07a665f4fd Improve validation of symbol fields editor.
Don't beep when inserting character from focused grid cell (but
before editor is opened).

Handle reference validation separately from name validation and
separately from user field value validation.  The old way of setting
the fieldId on the validator wasn't working because the validator
gets copied.

Run validation when leaving cell.  Don't just check for empty
(particularly for fields that CAN be empty).

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

(cherry picked from commit 79e04de)
2018-07-21 21:28:13 +01:00
Jeff Young b6934bf547 Remove duplicate labels from global label popup.
Fixes: lp:1782895
* https://bugs.launchpad.net/kicad/+bug/1782895
2018-07-21 14:51:35 +01:00
Jeff Young 6d2dfbb5c3 Add Select Footprint and Show Datasheet to Symbol Fields Editor.
Fixes: lp:1782848
* https://bugs.launchpad.net/kicad/+bug/1782848
2018-07-20 23:27:50 +01:00
Jeff Young c1df78d531 Finish project frame library table editing.
Fixes: lp:1782761
* https://bugs.launchpad.net/kicad/+bug/1782761
2018-07-20 18:48:06 +01:00
Jeff Young bd90341e91 Add Footprint & Datasheet buttons to Edit Symbol dialog. 2018-07-20 18:48:06 +01:00
Baranovskiy Konstantin c08ef3e8f9 Fix untranslatable label.
Column label "Qty" of the symbol fields editor is translatable now.

(cherry picked from commit e7b9b0e)
2018-07-19 23:09:41 +01:00
Jeff Young ba0c823673 Fix flicking issues on non-double-buffered platforms. 2018-07-19 21:46:41 +01:00
Jeff Young 3a67300001 Fix reference text smart selection for Windows and Linux.
Fixes: lp:1782382
* https://bugs.launchpad.net/kicad/+bug/1782382
2018-07-19 21:46:41 +01:00
Jeff Young 829ba27206 Another round of dialog spacing/font adjustments for Windows. 2018-07-18 17:59:05 +01:00
Jeff Young 879ffa4d1c Adjust dialog spacing for Windows. 2018-07-17 22:18:27 +01:00
Jeff Young 977f27f3c4 Adjust spacing on preference panels.
Giving them the correct parent changed the spacing.

(cherry picked from commit 7f602f3)

(cherry picked from commit 718db46)
2018-07-17 15:14:25 +01:00
Jeff Young 68e7a49b53 Add position to Eeschema's edit text dialogs.
Fixes: lp:1627467
* https://bugs.launchpad.net/kicad/+bug/1627467

(cherry picked from commit 07c7828)
2018-07-17 15:13:41 +01:00
Jeff Young 1bca706115 Move search status messages to Find/Replace dialog.
Fixes: lp:1777699
* https://bugs.launchpad.net/kicad/+bug/1777699

(cherry picked from commit 1ae8a2b)
2018-07-17 15:13:37 +01:00
Jeff Young 7c3a67191b Freshen the BOM dialog.
Layout freshened to include standard button layout.
Fall-behind Add Plugin dialog also fixed.

(cherry picked from commit 30dac89)
2018-07-17 15:13:22 +01:00
Jeff Young 420c2020fb Overhaul Symbol Library References dialog.
Fixes some layout issues and standardizes the action buttons.
Also works around a wxWidgets bug in row sizing.

(cherry picked from commit 7abc922)
2018-07-17 15:12:58 +01:00
Jeff Young f72842405a Add existing label popup to properties dialog.
Fixes: lp:1639719
* https://bugs.launchpad.net/kicad/+bug/1639719

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

(cherry picked from commit 14ebff6)
2018-07-17 15:12:45 +01:00
Jeff Young 5db4a85430 Fix Update Fields to use alias values.
Fixes: lp:1778826
* https://bugs.launchpad.net/kicad/+bug/1778826

(cherry picked from commit 1de2a80)
2018-07-17 15:12:41 +01:00
Jeff Young d5e88f574f Clean up units infrastructure after g_UserUnit removal.
Fixes: lp:1538239
* https://bugs.launchpad.net/kicad/+bug/1538239

(cherry picked from commit 96d7178)
2018-07-17 15:12:36 +01:00
Jeff Young 5f3ee1e7ce More g_UserUnit erradication.
(cherry picked from commit 3f08780)
2018-07-17 15:12:31 +01:00
Jeff Young 0358aee89e UNIT_BINDERize print and plot dialogs.
Fixes: lp:1778560
* https://bugs.launchpad.net/kicad/+bug/1778560

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

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

(cherry picked from commit 9df9743)
2018-07-17 15:12:29 +01:00
Jeff Young ef3e045a9b Eradicate g_UserUnit from ERC/DRC.
(cherry picked from commit 98b8cd4)
2018-07-17 15:12:16 +01:00
Jeff Young 3e062867de Move all the grid workarounds into our own WX_GRID class.
(cherry picked from commit 08b4463)
2018-07-17 15:11:38 +01:00
Jeff Young 06bf958bf1 UNIT_BINDERize eeschema's plot and text edit dialogs.
(cherry picked from commit 298ea70)
2018-07-17 15:11:26 +01:00
Jeff Young e4d9366fe4 UNIT_BINDERize Pin Properties dialog.
(cherry picked from commit c609087)
2018-07-17 15:11:24 +01:00
Jeff Young 52271d3195 Add an Add Field button to global Field Editor.
Fixes: lp:1747602
* https://bugs.launchpad.net/kicad/+bug/1747602

(cherry picked from commit 1e5b1b0)
2018-07-17 15:11:22 +01:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +01:00
Jeff Young 99fb938b8f Add updating of visiblity, position, etc. to fields.
Fixes: lp:1752752
* https://bugs.launchpad.net/kicad/+bug/1752752

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

(cherry picked from commit 9f60005)
2018-07-17 15:10:50 +01:00
Jeff Young 23189f8e1b Move annotation confirmation dialogs to KIDIALOG.
(cherry picked from commit 05e04e8)
2018-07-17 15:10:45 +01:00
Jeff Young 31aebe6920 UI infrastructure enhancements and bug fixes.
Work around wxWidgets failure to send first key through validator.

Unify treatment of INDETERMINATE values (such as for multiple
selections with mixed values).

(cherry picked from commit 7308729)
2018-07-17 15:10:15 +01:00
Jeff Young c8b02674dc Direct editing of LIB_FIELDs and SCH_FIELDs in dialogs.
Fixes: lp:1676178
* https://bugs.launchpad.net/kicad/+bug/1676178

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

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

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

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

(cherry picked from commit b6aee79)
2018-07-17 15:10:08 +01:00
Jeff Young bcd9a7745d Make the pin table editable.
Also adds generic icon + text grid renderer and grid editor.

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

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

(cherry picked from commit 067f777)
2018-07-17 15:10:06 +01:00
Jeff Young 7be85deb32 GRID_TRICKS improvements.
Allow copy of a single cell demarcated by the grid cursor.

Paste of lib_table s-expressions should always start at 0,0.

Let caller or specialized sub-class do auto-sizing; don’t
do it from within the base GRID_TRICKS.

Don’t start GRID_TRICKS menu IDs at -1; wxWidgets doesn’t
like it when you get to 0.

Add column visibility menu.

(cherry picked from commit e5071ed)
2018-07-17 15:10:03 +01:00
Jeff Young 0f78f97232 Get rid of 5.0 dialog focus hacks.
It's time to fix the focus issues.  This adds a new SetInitialFocus()
routine to DIALOG_SHIM which will need to be called from a lot of
dialogs.

(cherry picked from commit 6d9647a)
2018-07-17 15:09:58 +01:00
Jeff Young a39fb03822 Remove some references to g_UserUnit
(cherry picked from commit 614d832)
2018-07-17 15:09:56 +01:00
Jeff Young 74acb76e7f Switch UNIT_BINDER and DIALOG_SHIM to local units.
The general idea is to support user-units inheritance.  The
UNIT_BINDER allows wrapped controls to inherit units from their
parent dialog, while KEYWAY_HOLDER and DIALOG_SHIM allow child
KEYWAY_HOLDERs or DIALOG_SHIMs to inherit units from their
parent.

The GetUserUnits() method signature has to move to KEYWAY_HOLDER
rather than KEYWAY_PLAYER (where it makes more sense) as it’s the
only common ancestor of KEYWAY_PLAYER and DIALOG_SHIM.

As long as we'll be using the UNIT_BINDER more widely, it also
makes sense to move evaluation and validation into it.

This commit also provides eeschema’s DIALOG_LABEL_EDITOR and
pcbnew’s DIALOG_TRACK_VIA_PROPERTIES and DIALOG_SET_GRID as
models of how to use the new user-units inheritance, eval, and
validation.

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

(cherry picked from commit c8bc53e)
2018-07-17 15:09:53 +01:00
Jeff Young e9d877914d Dialog consistency and beautification.
Small icons for dialog browse, refresh, and row operations.
Icons in B&W so they don't over-emphasize with respect to other
controls in the dialog.

Layout cleanup for consistency.  Removal of the blank space to
left of the fields list in the Global Fields Editor, and addition
of column-sizing-to-list-width.

More even spacing for buttons in html report panel.

Honor platform conventions for action button order and layout.

Move netlist importer to update-pcb-from-schematic algorithm
(display messages and then update instead of "dry run" checkbox)

(cherry picked from commit b21e19d)
2018-07-17 15:09:01 +01:00
Jeff Young 01c5bdfb8f Fix bug with duplicate columns in Edit Symbol Fields. 2018-07-16 09:03:27 +01:00
Maciej Suminski 14ce518208 Speed-up Spice model library loading
Thanks to Jeff Wheeler for determining the slow down cause.

Fixes: lp:1779566
* https://bugs.launchpad.net/kicad/+bug/1779566
2018-07-10 20:55:37 +02:00
jean-pierre charras 3df27430c7 Fix eeschema crash when updating fields from libraries, and when a symbol in schematic is not found in libs
Fixes: lp:1779722
https://bugs.launchpad.net/kicad/+bug/1779722
2018-07-02 21:02:27 +02:00
Maciej Suminski 47c44b4d83 Unselect 'copy default sym-lib-table' when unavailable
It used to be selected as the primary choice even though the option was
disabled.
2018-06-29 09:19:41 +02:00
jean-pierre charras f785d27498 Eeschema, label editor dialog: fix a very minor cosmetic issue when resizing the dialog. 2018-06-23 17:53:29 +02:00
Wayne Stambaugh 8394e2b71e Fix broken LIB_ID library nickname illegal character tests.
During the symbol library table implementation, the legal character
tests for the footprint library table were changed and the forward
slash '/' character became illegal.  This change broke editing some
users footprint library tables that already had '/' in library table
nicknames.  This change split the library nickname and library item
name illegal character tests.
2018-06-20 14:36:40 -04:00
jean-pierre charras 5411b951ae Minor compil warning (signed/unsigned compare) fix 2018-06-13 08:05:10 +02:00
Jeff Young 660aed71b4 Make sure initially loaded footprint is rendered.
Also sets the initial footprint to the current footprint when
doing a Choose Footprint from the Eeschema Edit Property
dialog.

Fixes: lp:1776126
* https://bugs.launchpad.net/kicad/+bug/1776126
2018-06-12 13:41:53 +01:00
Seth Hillbrand 4186626069 Fix overzealous checking in 2798035f8
Checking for NULL fields prevents a useful dialog from being displayed
now that the exception is handled.
2018-06-11 20:49:13 -07:00
Seth Hillbrand 2798035f85 eeschema: Catch parameter errors in SPICE sim
Any errors in the dialog should be handled and, at worst, allowed to
redo.  SPICE_VALUE throws KI_PARAM_ERROR, so we catch that explicitly.

Fixes: lp:1776051
* https://bugs.launchpad.net/kicad/+bug/1776051
2018-06-11 18:02:20 -07:00
Jeff Young 5c65881fde Allow Global Fields Editor to Cancel with no changes. 2018-06-11 12:10:19 +01:00
Ben Gamari da61285a29 field editor: Save checkbox states
This refactors the symbol field editor's checkbox state-saving code to
deal with multiple projects with disjoint field sets more consistently.

For instance, imagine I have a two projects

 * Proj1 has fields A, B, C
 * Proj2 has fields A, B, D

Under the old scheme, when I switch from one project to the other the
state of fields C and D will be forgotten. With the new approach,
however, they are retained.

Not to mention, the implementation is considerably simpler.  Fixes
2018-06-11 12:08:59 +01:00
Ben Gamari 3f783d2318 field editor: Find components when reference field is clicked
This makes it significantly easier to find a particular component when
using the field editor, as I often do for part selection.

Fixes: lp:1772169
* https://bugs.launchpad.net/kicad/+bug/1772169
2018-06-11 10:27:49 +02:00
Jeff Young b9874da3a6 Remove background fp loading from Choose Symbol dlg.
There are a bunch of problems with event processing and closing
documents, etc., when enabled.  See the bug report for more
info.

Fixes: lp:1774777
* https://bugs.launchpad.net/kicad/+bug/1774777
2018-06-09 00:51:39 +01:00
Seth Hillbrand a5c213c23d Set footprint splitter window canvas to transient
The splitter window can not be the parent to any additional windows.
If it acquires a child that persists past the lifetime of the splitter
window, we get a segfault.
2018-06-06 10:03:00 -07:00
Damien Espitallier 5263558eaa Fix crash when delete button of footprint filter is clicked and no footprint is selected
Fixes: lp:1775296
* https://bugs.launchpad.net/kicad/+bug/1775296
2018-06-06 00:01:47 +01:00
Jeff Young aaf47bbe71 Replace "unsaved changes" dialog to Global Fields Editor. 2018-06-06 00:01:47 +01:00
Wayne Stambaugh 7343e78347 Fix some Coverity uninitialized field warnings.
Fixes Coverity CIDs:

- 175824
- 169337
- 163191
- 175827
- 175440
- 175438
- 157136
2018-06-04 13:48:57 -04:00
Jeff Young d03e92a3a2 Field Name Template (aka Default Fields) fixes.
Move from a "default" fields model to a "seed" fields model.  See
discussion on devlist:
https://lists.launchpad.net/kicad-developers/msg35823.html.
2018-05-30 09:46:52 +01:00
Maciej Suminski 8c63dac0c3 Component Chooser: do not create FP list when the FP preview is disabled 2018-05-30 09:53:58 +02:00
Marco Ciampa 2cb65f9c19 Make the Simulator error strings translatable 2018-05-28 14:51:10 +02:00
Jeff Young 8f5cb32598 Don't write empty fields from Global Edit Fields dialog. 2018-05-23 21:35:23 +01:00
jean-pierre charras 3893c43eb0 Fix compil issues. 2018-05-23 11:31:13 +02:00
Seth Hillbrand 8c5037a48b Optionally sort reporter messages
It can be useful to have similar class messages grouped together so that
error messages in a larger report don't get lost among the
warning/info/action messages.

This patch allows sorting of messages for dialogs that benefit from
organization.  Default behavior of reporter messages remains
unchanged by this patch.

Fixes: lp:1772090
* https://bugs.launchpad.net/kicad/+bug/1772090
2018-05-22 13:55:02 -07:00
Jeff Young c4b447f3f9 Initialize field visibility checkboxes in Fields Editor. 2018-05-22 19:24:37 +01:00
Jeff Young e3c4a96f5c Default field bug fixes.
1) Commit in-progress edits before closing preferences.
2) Handle default fields in Symbol Fields Editor.
3) Save state of checkboxes in Symbol Fields Editor.
2018-05-22 12:55:39 +01:00
Seth Hillbrand d62b4f36a6 Save hotkeys to combined app-based file
Unifies the different sections of hotkeys so that we are not storing two
[eeschema] or [pcbnew] sections in two different files.

Previous hotkey definitions are loaded at start if they exist but are
overwritten by the new format, if it exists.  Changes to hotkeys save
only in the combined format.

Hotkey editor for each application only shows the hotkeys relevant to
that application.

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

Fixes: lp:1668799
* https://bugs.launchpad.net/kicad/+bug/1668799
2018-05-18 12:57:38 -07:00
Jeff Young df495b1d65 Fix typo in loading of preferences Reference ID Notation menu.
Fixes: lp:1771898
* https://bugs.launchpad.net/kicad/+bug/1771898
2018-05-17 23:46:32 +01:00
jean-pierre charras afc28ef5db fix a minor compil warning 2018-05-16 18:14:06 +02:00
Jeff Young 1a6e8d4713 Fix typo. 2018-05-13 21:48:13 +01:00
Jeff Young c30dd24cc1 Fixup sorting for expanded component groups.
Also adds shorthand notation for groups with adjacent components.
2018-05-13 12:21:55 +01:00
jean-pierre charras 54766bac40 fix minor compil warning (signed/unsigned compar) 2018-05-13 08:56:17 +02:00
Jeff Young 9311393016 Add expand/collapse to grouped rows in Fields Editor.
Fixes: lp:1767746
* https://bugs.launchpad.net/kicad/+bug/1767746
2018-05-12 23:05:04 +01:00
Jeff Young e91e88bfa1 Make sure read-only attr sticks when grid table rebuilt. 2018-05-11 12:33:53 +01:00
Jeff Young 6e83f99c72 Relax fully-annotated constraint for BOM editor.
Also fixes a bug where unannotated components would get references
of the form R-1 (because their reference number was -1).

Fixes: lp:1768814
* https://bugs.launchpad.net/kicad/+bug/1768814
2018-05-11 12:33:44 +01:00
Jeff Young aa7da5dfcd Treat ${...} and $(...) envvar references uniformly.
Fixes: lp:1769282
* https://bugs.launchpad.net/kicad/+bug/1769282
2018-05-05 23:40:40 +01:00
Jeff Young c23b263e39 Fix display issues in Layers list in Keepout Zone Properties. 2018-05-04 23:55:03 +01:00
Maciej Suminski 8411ef04d0 Size fields list correctly in symbol properties editor
This patch prevents fields with long text values from unreasonable
dialog resizing. It is basically commit f4eb63f8 applied to a
corresponding field editor dialog in the Symbol Editor.
2018-05-03 12:20:40 +02:00
Maciej Suminski 70cd27314b Autocompletion for Spice model selector 2018-05-03 11:58:13 +02:00
Jeff Young af739f5b00 Check for duplicates when adding libraries.
This is particularly important when bulk adding (by director, etc.)
as otherwise the user might end up having to click OK to many
many error dialogs.

Fixes: lp:1764057
* https://bugs.launchpad.net/kicad/+bug/1764057
2018-05-02 21:49:57 +01:00
jean-pierre charras b636aaddf6 Eeschema: fix incorrect UI messages in dialogs due to using UTF8 strings instead of wxStrings (unicode) to build them.
(Added a explicit to build a Unicode string in UI messages to avoid mistakes)
2018-04-30 11:46:23 +02:00
Jeff Young 7b734551d3 Make sure pin-caches are up-to-date before testing dangling ends.
Fixes: lp:1767745
* https://bugs.launchpad.net/kicad/+bug/1767745
2018-04-29 16:55:24 +01:00
Maciej Suminski 5a051358b7 Removed an obsolete comment 2018-04-28 01:19:42 +02:00
Maciej Suminski 9960416e32 Spice simulator: plot currents in DC sweep simulation
Fixes: lp:1767457
* https://bugs.launchpad.net/kicad/+bug/1767457
2018-04-28 01:14:00 +02:00
Maciej Suminski 4d6947b56a Spice simulator: do not display V(0) in the signals list 2018-04-28 01:14:00 +02:00
Maciej Suminski 539d12b08f Spice simulator: more elegant approach to generating Spice device names
Code fixing Spice device names (prefixing reference with a character
corresponding to the assigned device model type) that was duplicated in
a few places has been moved to a function (NETLIST_EXPORTER_PSPICE::GetSpiceDevice()).
2018-04-28 01:14:00 +02:00
Maciej Suminski 095112a902 Spice simulator: add device prefix only when necessary for DC sweep (missing in bc67d1ad) 2018-04-27 23:09:58 +02:00
Jeff Young 5e5e80d392 Don't allow panel to overwrite values set in Spice Model editor.
Fixes: lp:1766920
* https://bugs.launchpad.net/kicad/+bug/1766920
2018-04-26 19:13:19 +01:00
Jeff Young 6ccc8577ad Hand-code calculation of field names column width.
Fixes: lp:1737361
* https://bugs.launchpad.net/kicad/+bug/1737361
2018-04-26 19:13:19 +01:00
Jeff Young 888c434776 Treat Mac as special case rather than GTK.
(Windows also needs the padding we use for GTK.)
2018-04-26 15:51:34 +01:00
Jeff Young dcf02f5f67 Use a single calc-column-width-impl for Fields Editor.
Also adds calculation of the initial splitter position based on
the widths of the fields in the list.

Fixes: lp:1737361
* https://bugs.launchpad.net/kicad/+bug/1737361
2018-04-26 11:10:58 +01:00
jean-pierre charras 528a67b27c Fix incorrect sizing of 2 columns in dialog, on GTK (issue perhaps depending on GTK/wxWidget version) 2018-04-25 12:07:43 +02:00
Jeff Young 4b3772cf07 Update value field when changing power symbol reference.
Fixes: lp:1765932
* https://bugs.launchpad.net/kicad/+bug/1765932
2018-04-25 00:36:08 +01:00
Jeff Young 7e29ff0bc4 Conditional compilation for global fields editor listbox. 2018-04-24 23:45:44 +01:00
Seth Hillbrand 2694a76785 Standardize colons in symbol library dialog 2018-04-23 12:33:21 -07:00
Seth Hillbrand 3e652f2d40 Standardize colons and units in spice model dialog 2018-04-23 12:31:23 -07:00
Seth Hillbrand 2baca1d650 Standardize colons and units in spice sim settings dialog 2018-04-23 12:31:17 -07:00
Seth Hillbrand 445c0e66fb Align search field 2018-04-23 11:55:28 -07:00
Seth Hillbrand 722886c9c7 Standardize colons in schematic plot dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 805c38ffc5 Standardize colons in new component dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 60abff1c02 Standardize colons in library text dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 424fe8acd4 Standardize colons in libedit pin dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 2c1f14fce5 Standardize colons in draw item dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand c55cb8c557 Standardize colons in ERC dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand f451ffb877 Standardize colons in schematic editor options dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 83319f74c3 Standardize colons in line style dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 2da575d539 Standardize wording and colons in libentry fields dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 617d9288ab Standardize colons in edit label dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 32bb6064d7 Standardize colons in edit schematic component dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 07281d78ad Standardize colons in edit component dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 8c2a7138d1 Standardize colons in BOM dialog 2018-04-23 11:53:18 -07:00
Seth Hillbrand 4640a656a2 Standardize colons in annotate dialog 2018-04-23 11:53:18 -07:00
Jeff Young aa71d41a59 Calculate column widths based on actual text & fontsize.
Fixes: lp:1737361
* https://bugs.launchpad.net/kicad/+bug/1737361
2018-04-23 18:24:10 +01:00
Maciej Suminski cfa9916836 Prevent issuing a print command before the previous one is finished
Fixes: lp:1765965
* https://bugs.launchpad.net/kicad/+bug/1765965
2018-04-23 11:25:28 +02:00
jean-pierre charras 4202bb6af6 DIALOG_EDIT_COMPONENTS_LIBID: fix the minimal size (previous code to fix this size was not working) 2018-04-21 17:53:54 +02:00
Wayne Stambaugh d776eaca83 Fix button sizer padding on symbol field edit dialog. 2018-04-20 19:19:13 -04:00
Jeff Young 4302394990 Consistency between dialog titles and menu items.
... and between eeschema and pcbnew.

Also moved the Symbol & Footprint library table tabs to the top
so it's more clear what "by Scope" means.

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

Fixes: lp:1765516
* https://bugs.launchpad.net/kicad/+bug/1765516
2018-04-20 15:33:46 +01:00
Jeff Young 5506efaee5 Add a SaveAndContinue button to the Fields Editor. 2018-04-19 23:13:19 +01:00
Jeff Young b9239d8728 Add defensive coding for column widths in Fields Editor. 2018-04-19 21:39:25 +01:00
Jeff Young 9201417c06 Handle new fields in global field editor.
Fixes: lp:1765443
* https://bugs.launchpad.net/kicad/+bug/1765443
2018-04-19 20:33:03 +01:00
Jeff Young 442d1169a8 Adjust min sizes of Global Fields editor for Windows.
Also gets rid of a slew of unnecessary sizers in the dialog.
2018-04-18 20:37:20 +01:00
Simon Richter 7e47ef7471 Fix warnings for unreferenced local variables 2018-04-18 15:08:37 -04:00
Jeff Young db2cda7271 Fix some merge issues. 2018-04-17 20:26:50 +01:00
jean-pierre charras 854cb70052 Fix compil issue with gcc 4.8 on Ubuntu 2018-04-17 19:35:26 +02:00
jean-pierre charras 0294e41cbc fix minor compil warnings (about signed/unsigned comparison) 2018-04-17 16:08:12 +02:00
Jeff Young 000457db7c Move Fields Editor to wxGrid.
Makes in-place editing much easier and fixes some other issues
(see bug reports).

Fixed sorting bugs in References and added better sorting for
Values.

Removed Description column as it wasn't editable and caused more
confusion than value.

Removed auto-column-width after initial render.

Re-implemented undo/redo.

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

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

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

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

Fixes: lp:1761378
* https://bugs.launchpad.net/kicad/+bug/1761378
2018-04-17 11:39:44 +01:00
Jeff Young 12ec56bc15 Prevent reentrancy in footprint loading.
Also removes parallel implementation in favour of using the
normal one (with a new wxGauge-backed PROGRESS_REPORTER).

Fixes: lp:1764196
* https://bugs.launchpad.net/kicad/+bug/1764196
2018-04-16 23:19:08 +01:00
Maciej Suminski 0e151687e3 Fixed a typo 2018-04-13 14:24:57 +02:00
Maciej Suminski a41b2d6803 Fix names of added aliases 2018-04-13 14:24:57 +02:00
Maciej Suminski b907fb856d Fix names of libraries added to symbol/footprint library tables 2018-04-13 14:24:57 +02:00
Maciej Suminski 3f734eb1b5 Improved validation of library and entry names
Symbol/footprint library and entry have the same set of forbidden
characters with a single exception, space character. To accommodate for
this difference, LIB_ID validation and fix methods have been extended to
specify the LIB_ID type that is checked (schematic/board).

LIB_ID::HasIllegalChars() and LIB_ID::FixIllegalChars() had two different
sets of characters treated as invalid in LIB_IDs. The set has been
factored out to another function to avoid duplication.
2018-04-13 14:24:57 +02:00
Maciej Suminski 862fb430e7 eeschema: Fixed setting unit condition in the component properties dialog 2018-04-13 14:24:57 +02:00
Carsten Schoenert a11714b1a4 fix misspelled 'an other' -> 'another' 2018-04-08 13:24:37 -04:00
Carsten Schoenert 1f32f7c55b fix misspelled 'allows to' -> 'allows one to' 2018-04-08 13:24:18 -04:00
Jeff Young 591a303777 Make ERC options dialog clearer.
Fixes: lp:1667600
* https://bugs.launchpad.net/kicad/+bug/1667600
2018-04-06 14:51:09 +01:00
Maciej Suminski dd56f16776 Fix symbol editor crash when modifying fields while a field is selected
Field Editor dialog calls LIB_EDIT::SetFields() that deletes the old
LIB_FIELD objects and creates new ones. If any of the old LIB_FIELD
objects had been selected before invoking the dialog, then one of the
update UI event handlers will crash trying to access the object.
2018-04-02 17:51:11 +02:00
Jeff Young ba49bd0386 Allow XLS netlist exporters to specify a file extension.
Fixes: lp:1591779
* https://bugs.launchpad.net/kicad/+bug/1591779
2018-03-26 00:51:54 +01:00
Jeff Young f4ce8766e3 Implement shared FOOTPRINT_LIST.
While we already cache the loaded footprint files, parsing said files
into the list is also time-intensive.  Since the FOOTPRINT_LIST is
already hash-stamped against the current timestamps of the files that
make up the list, sharing a single copy of the list is quite
straight-forward.
2018-03-25 19:21:28 +01:00
Jon Evans bfe9eff878 Don't use wxTE_RICH in label editing dialog
Fixes: lp:1742296
* https://bugs.launchpad.net/kicad/+bug/1742296
2018-03-24 22:31:34 -04:00
Jeff Young d2d0660647 Open viewer even when FPID is invalid.
Just show an empty viewer.
2018-03-23 12:46:17 +00:00
Jeff Young a0364a1137 Don't make user click twice to toggle checkbox in wxGrid. 2018-03-23 12:46:17 +00:00
Maciej Suminski 97f8a3361e Renamed ERC rule: "Test unique global labels" to "Test single instances of global labels" 2018-03-22 18:20:02 +01:00
Maciej Suminski e1c8822b9e Component Properties dialog: catch IO_ERRORs when showing footprint viewer 2018-03-22 11:44:13 +01:00
Jeff Young 79fe134495 Init Footprint Viewer with current FPID.
Fixes: lp:1757421
* https://bugs.launchpad.net/kicad/+bug/1757421
2018-03-21 23:11:55 +00:00
Jeff Young 1a845bc4ad Safer way to commit in-progress changes in wxGrid.
In some cases the wxGrid would attempt to close the editor in
the middle of the d'tor, resulting in segfaults.
2018-03-19 12:13:28 +00:00
Jeff Young df924a5e68 Follow standard FBP naming conventions. 2018-03-18 22:17:27 +00:00
Jon Evans 0a81782b5d Add ERC check that a pin appears in only one net
Fixes: lp:1680638
* https://bugs.launchpad.net/kicad/+bug/1680638
2018-03-15 11:11:43 -04:00
Jon Evans 935a5cada8 Fix typo in conditional check
Fixes: lp:1755265
* https://bugs.launchpad.net/kicad/+bug/1755265
2018-03-12 22:15:27 -04:00
Jeff Young f32f14dc8f Add WX_TEXT_ENTRY_DIALOG which inherits from DIALOG_SHIM.
Fixes: lp:1754977
* https://bugs.launchpad.net/kicad/+bug/1754977
2018-03-12 22:45:51 +00:00
hauptmech eeeed88425 Use fixed width on first Symbol Table column
Autosize when the reference field is a list of all components was too long.

Fixes: lp:1753330
* https://bugs.launchpad.net/kicad/+bug/1753330
2018-03-08 20:59:46 -05:00
Jeff Young 4693fd6200 Resolve env vars when looking up documentation files.
Fixes: lp:1729276
* https://bugs.launchpad.net/kicad/+bug/1729276
2018-03-08 23:51:10 +00:00
Seth Hillbrand 33423fe88d Standardize capitalization
Messages should start with capitalized letter
2018-03-08 12:33:32 -08:00
Seth Hillbrand 3cbf5f4942 Spelling indentifier -> identifier 2018-03-08 12:33:32 -08:00
Seth Hillbrand 9c44d67f3b Eeschema: Simplify transformation representation
Fixes: lp:1752745
* https://bugs.launchpad.net/kicad/+bug/1752745
2018-03-05 01:05:21 +00:00
Jeff Young f4eb63f871 Size fields list correctly in symbol edit.
Fixes: lp:1753323
* https://bugs.launchpad.net/kicad/+bug/1753323
2018-03-05 00:07:50 +00:00
Wayne Stambaugh ce1bd4c6b7 Eeschema: fix remapping backup project with schematics in subfolders.
The backup code was designed for a project with all of the schematics
in the project folder which is not always the case.  Fix the schematic
backup to keep the schematic folder structure in tact during backups.

Fixes lp:1751662

https://bugs.launchpad.net/kicad/+bug/1751662
2018-02-28 11:42:05 -05:00
jean-pierre charras 9a462d9414 dialog_bom: modify the way a command line is created (python scripts on windows only) to call python scripts
For some reason, when calling python and giving a full filename script, the last separator in the filename
must be '/', not '\'.
Otherwise the import command inside the script does not find files to import in the same folder as the script.

We cannot replace blindly '\' to '/' in command line because it does not work for file on a server (name starting by \\server_name\).
So the fix is just replacing one '\' in python script full filename.
This is not perfect, but at least it works for newly created plugin commands.
2018-02-23 09:50:15 +01:00
Jeff Young c47821a689 Stop nagging me about annotating.
Adds a checkbox to turn off confirmation dialogs.
2018-02-20 19:12:59 -05:00
jean-pierre charras 0e493a3f91 Disallow '/' in labels, Step 2: disallow not allowed chars in all labels (local, global, hierarchical, and sheet pin)
Currently, if a old label already containing a '/' (or a space) is edited, it is accepted,
but no new not allowed char can be added to the label.
(Previously, a sheet pin label was not filtered)
2018-02-19 18:15:53 +01:00
Jeff Young 04d1d503ee Disallow '/' in labels.
Fixes: lp:1749232
* https://bugs.launchpad.net/kicad/+bug/1749232
2018-02-19 18:08:09 +01:00
Jeff Young 447fd1bf02 Add a start number to annotate.
This also makes the dialog modeless so that one switch between
sheets while annotating to choose the base numbers for each
sheet (assuming they don't like the base number we pick because
of the order of the sheets).

Fixes: lp:1154131
* https://bugs.launchpad.net/kicad/+bug/1154131
2018-02-19 09:32:54 -05:00
Jeff Young b3884669cf Proper error reporting for Annotate dialog.
Also fixes:
- forcing the annotation scope to "full schematic" when run
  as a prerequisite to Generate Netlist.

- a long-standing bug where displaying extra items in a dialog
  would mess up the height of the HTML_REPORT_PANEL (becasue
  we were setting the html window's height rather than its
  parent flexgrid.

- initializing the annotation radio buttons to safe values
  (full schematic and keep existing)

Fixes: lp:1750062
* https://bugs.launchpad.net/kicad/+bug/1750062
2018-02-18 15:08:24 -05:00
Jeff Young e7d98f89a1 Fix display of datasheet URLs and shorten them if necessary.
Fixes: lp:1676174
* https://bugs.launchpad.net/kicad/+bug/1676174
2018-02-15 22:01:35 +01:00
jean-pierre charras 4012aa70da Fix a few minor Coverity warnings 2018-02-15 10:16:17 +01:00
Jeff Young ac09cfaef4 Wire up <return> for eeschema find dialog.
Fixes: lp:1749026
* https://bugs.launchpad.net/kicad/+bug/1749026
2018-02-12 19:41:34 -05:00
Jeff Young 0bbf961881 Clean up Cancel vs Close buttons in dialogs.
Many had already been fixed but weren't working on Mac because
of the DIALOG_SHIM hack (now fixed).  Others hadn't been updated
yet.  Also includes some cleanup for elipses in buttons and
layout.

Fixes: lp:1748506
* https://bugs.launchpad.net/kicad/+bug/1748506
2018-02-10 17:53:12 -05:00
jean-pierre charras dba198e576 Fix code after renaming files
Change class names according to the new name of the main dialog
2018-02-09 17:36:54 +01:00
jean-pierre charras 35a0688bf7 rename dialog_bom_editor* files to dialog_fields_editor_global*
rename also associated files
2018-02-09 17:36:52 +01:00
jean-pierre charras 07fff6ed35 Eeschema, choose component dialog: remember the relative size of the component tree and the symbol viewer canvas during a session 2018-02-09 08:08:14 +01:00
Michael Geselbracht b04b1dcfb5 Update fields: Add option to omit empty fields
Fixes lp:1747405

https://bugs.launchpad.net/kicad/+bug/1747405
2018-02-08 21:05:10 -05:00
Jeff Young 6c61a46721 Rationalize label orientations for dialog display.
Fixes: lp:593795
* https://bugs.launchpad.net/kicad/+bug/593795
2018-02-08 20:16:26 -05:00
Chris Pavlina d1a45d1476 Remove icon scaling diagnostic from eeschema 2018-02-05 19:49:07 -07:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
jean-pierre charras 795a36c9fe Fix code after renaming files, and a bit of code cleanup (remove useless includes and multiple includes of the same files) 2018-01-30 09:57:25 +01:00
jean-pierre charras d0754acf00 Fix code after renaming files 2018-01-29 11:37:29 +01:00
jean-pierre charras 4c5bd01887 Rename a few files 2018-01-28 22:02:31 +01:00
jean-pierre charras e499d337d8 rename files: update filenames in sources 2018-01-28 19:12:26 +01:00
Jeff Young f88c4ccb02 Add an Edit button to the Symbol Properties aliases list
Fixes: lp:1248451
* https://bugs.launchpad.net/kicad/+bug/1248451
2018-01-27 18:57:33 -05:00
jean-pierre charras 54ebd45749 DIALOG_EDIT_COMPONENT_IN_SCHEMATIC: ensure mandatory field names are always correctly translated after changing the locale. 2018-01-26 20:21:12 +01:00
Tomasz Włostowski 7a6e3bf3ed eeschema: remember last browsed directory in the Symbol Lib Table dialog 2018-01-26 18:39:09 +01:00
jean-pierre charras d54418c14a Fix minor compil warnings 2018-01-26 09:35:22 +01:00
Maciej Suminski 8e18aea11d New ERC rule verifying if all units of a component use the same footprint 2018-01-25 12:19:41 +01:00
jean-pierre charras 270a63daac DRAWSEGMENT, S_POLYGON shape: remove useless copies or conversion to std::vector<wxPoint> of SHPE_POLY_SET polygon shape.
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)

Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
2018-01-24 14:22:43 +01:00
Jeff Young c6d0075076 Keep value, footprint and datasheet in sync in multi-unit parts
Fixes: lp:1731743
* https://bugs.launchpad.net/kicad/+bug/1731743
2018-01-23 11:46:27 -05:00
Jeff Young 76885169c4 Fix delete issues in symbol aliases list in libedit.
The alias list now displays the user model (multiple aliases *of*
a root part, rather than a collection of names *including* the
root part).  This simplified the error detection logic, fixing
the first bug in the bug report.

Updating the part in the library is now done uniformly on OK
(which was the second bug in the bug report).

Fixes: lp:1744656
* https://bugs.launchpad.net/kicad/+bug/1744656
2018-01-23 14:49:20 +01:00
Jeff Young 6b9866de8b Sort pins in pin-table.
Fixes: lp:1744509
* https://bugs.launchpad.net/kicad/+bug/1744509
2018-01-21 08:47:26 +01:00
jean-pierre charras 448dbf476c Dialog symbol lib table editor: fix incorrect tool tips
Fixes: lp:1744416
https://bugs.launchpad.net/kicad/+bug/1744416
2018-01-20 10:47:19 +01:00
jean-pierre charras d4dbdcd638 Symbol editor, Pin table editor: always display a icon in Pin Type column
At least on Linux, if a null icon is used as icon in Pin Type column, other icons are not
displayed. So the workaround is to use a neutral icon when a specific icon cannot be used
(i.e. when pins are grouped)

Fixes: lp:1559542
https://bugs.launchpad.net/kicad/+bug/1559542
2018-01-20 09:59:15 +01:00
Jon Evans 10b635ffe2 Clear autoplaced flag when modifiying field orientation/justification
Fixes: lp:1743893
* https://bugs.launchpad.net/kicad/+bug/1743893
2018-01-19 10:09:00 +01:00
Maciej Suminski 60963fe2fc Fixes for 590cac9d
The original patch did properly recognize the case when all transient
source definition fields are empty, which is perfectly valid.
2018-01-17 10:37:57 +01:00
Dan Weatherill 590cac9d55 Fix transient SPICE source field check logic
Fixes: lp:1743486
https://bugs.launchpad.net/kicad/+bug/1743486
2018-01-17 10:36:35 +01:00
Maciej Suminski ac1771a9f0 Handle block selection removal of libraries in SYMBOL_LIB_TABLE dialog
Fixes: lp:1741543
* https://bugs.launchpad.net/kicad/+bug/1741543
2018-01-17 09:59:48 +01:00
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
Maciej Suminski 12041551a1 Removed unnecessary debug messages 2018-01-10 12:03:53 +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
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 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
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
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 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
Chris Pavlina 57fe3739ca Symbol chooser: base default size on font for DPI flexibility 2018-01-05 22:02:05 -07: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 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
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 09cff5d8ed Eeschema: minor UI string spelling and coding policy fixes. 2017-12-29 10:44:33 -05:00
Wayne Stambaugh 1175d50486 Eeschema: fix default ERC dialog tab. 2017-12-28 14:17:47 -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 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
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
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
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
Bernhard Stegmaier 1e88695001 Fix initial sizing of 'Fields' table columns in component table view. 2017-12-06 07:30:44 -05:00
jean-pierre charras c0a539959e Fix a few Coverity warnings 2017-12-04 12:46:11 +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 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
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
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
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
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 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 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
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
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
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
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
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
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 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
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
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
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
Baranovskiy Konstantin 1412296398 Fix field align settings in dialogs of Eeschema. 2017-11-11 19:48:28 +01: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