Commit Graph

1171 Commits

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