Commit Graph

1102 Commits

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