Commit Graph

260 Commits

Author SHA1 Message Date
Jeff Young b429dbfb88 Fix bugs with ACTIONs not being "honest" singletons.
Delete the copy ctor and assignment operator to start with, but
even then the separate apps each have their own statically allocated
copy of the common actions.  So we need to update all of them, which
also means having the kicad manager frame's set of actions on hand).

This changelist also adds a Clear Hotkey Assignment function since
the hotkeys set is now likely to be sparse with respect to the
actions.
2019-06-14 16:54:46 +01:00
Jeff Young 2d29f76c49 Fix incorrect control-key map for hotkeys.
Fixes: lp:1832431
* https://bugs.launchpad.net/kicad/+bug/1832431
2019-06-12 10:08:23 +01:00
Jeff Young a3f3fb39de Convert 3DViewer to new hotkey architecture. 2019-06-10 23:46:01 +01:00
Jeff Young 620395608c Move Kicad Manager launch bar to ACTIONs.
Also fixes a bug where hotkeys weren't getting put in menus.
2019-06-10 23:46:01 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young 6025256e07 Push KIWAY_HOLDER down a level so we can move a bunch of stuff that doesn't belong there out. 2019-06-10 23:46:00 +01:00
Jeff Young e606587ff6 Move remaining Symbol Tree ctx menu cmds to ACTIONS.
Also moves the various Player instantiators down into COMMON_TOOLS
for better sharing.
2019-06-10 23:46:00 +01:00
Jon Evans 27a5ed1a9f Mathplot: properly set foreground color when saving screenshots
Fixes: lp:1810914
* https://bugs.launchpad.net/kicad/+bug/1810914
2019-06-05 22:43:50 -04:00
Jeff Young 2d40425e4d Move footprint & symbol tree context menus to tool infrastructure.
Fixes: lp:1831692
* https://bugs.launchpad.net/kicad/+bug/1831692
2019-06-05 20:16:48 +01:00
Jeff Young 296ec66796 Cosmetic cleanup in preference panels. 2019-06-01 16:29:12 +01:00
Jeff Young 7553cc2651 Clean up some dangling legacy odds and ends. 2019-06-01 01:17:46 +01:00
Jeff Young 9d9745b555 Remove more legacy editing code. 2019-05-27 18:47:20 +01:00
Jeff Young 6936effaa7 Implement undo for Page Settings in PlEditor, Eeschema and PCBNew.
Fixes: lp:1820059
* https://bugs.launchpad.net/kicad/+bug/1820059
2019-05-27 11:58:55 +01:00
Wayne Stambaugh f08d040c02 A better fix for commit d34433a1.
Replace INCREMENTAL_TEXT_CTRL with wxSpinCtrlDouble because it looks
and works better.

Remove INCREMENTAL_TEXT_CTRL header and source files because the only
place they were used was in GAL_OPTIONS_PANEL.
2019-05-15 18:18:01 -04:00
Wayne Stambaugh d34433a1df Fix GAL display options panel spin button layout on windows.
Fixes lp:1829224

https://bugs.launchpad.net/kicad/+bug/1829224
2019-05-15 14:59:14 -04:00
John Beard 18593d2dbb 3D viewer: decouple renderers from wxCursors
Provide a toolkit-agnostic interface for "busy indicators", which
allows the 3D viewer to show a busy cursor, without the canvases
having to to know how a wxCursore works.

The motivation here is to decouple the 3D renderers from the WX
GUI system, as they can then be used when when there is not an
active window (e.g. for offscreen rendering).

Otherwise, attempting to use a wxBusyCursor without a GUI
available is an instant segfault.
2019-05-12 14:19:39 +01:00
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
Seth Hillbrand f7c042a357 pcbnew: Allow curves in custom pads
Updates custom pad functions to permit adding arbitrary curves to the
primitives
2019-05-08 15:54:26 -07:00
John Beard 203019d959 Fix GAL option spin button layout
These need to not be wxEXPAND and to be vertically centred
to match the adjacent text controls.

Fixes: lp:1804461
* https://bugs.launchpad.net/kicad/+bug/1804461
2019-04-12 23:35:54 +01:00
Jeff Young 0021ecf51e Don't double-escape netnames.
Netnames in wxChoice or wxListBox are already in internal format
and don't need escaping again.

Fixes: lp:1823863
* https://bugs.launchpad.net/kicad/+bug/1823863
2019-04-12 00:28:58 +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
Seth Hillbrand c1c4a0925d sim: Prevent stepping
Introduced by 416e64a334.  The code
appears to have been stepped on purpose but this would be incorrect for
most applications.  There remains a good deal of cleanup in mathplot
available for the motivated dev.

Fixes: lp:1810311
* https://bugs.launchpad.net/kicad/+bug/1810311
2019-03-26 14:56:33 -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
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 30612ca62d grid: Set grid to use integer pixels
Each dot is an integer number of pixels wide, so supporting 0.5 width
steps no longer makes sense.  We round up the existing settings to the
nearest integer and only allow integers in the dialog.

Fixes: lp:1816748
* https://bugs.launchpad.net/kicad/+bug/1816748
2019-02-23 19:27:45 -08: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
jean-pierre charras 2dd653a327 WX_GRID: revert GetVisibleWidth() and add EnsureColLabelsVisible() to fix column label height of our wxGrid, for multiline column labels 2019-02-18 20:34:44 +01:00
jean-pierre charras 692fab2b73 WX_GRID::GetVisibleWidth(): fix column label height of our wxGrid, for multiline column labels 2019-02-18 20:02:00 +01:00
jean-pierre charras 3b97961ccb minor fixes (Coverity warnings and compil warning) 2019-02-17 15:33:20 +01:00
Jeff Young 076f07c683 Be more forgiving of large fonts in grids. 2019-02-17 10:38:06 +00:00
Seth Hillbrand 8b46c99c60 modedit: Fix footprint properties dialog
Checks for text in the dialog before setting width.  Also prevents
resizing beyond the width of the window (in the case of large fonts)
2019-02-14 22:02:34 -08:00
Seth Hillbrand a74aa3850a libtree: Update width automatically
When filtering, we update the width of the displayed column to ensure
the full text is visible to the user.  Check is rough, based on line
width (doesn't completely account for differing char widths) but is
sufficient for the approximate difference

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

Fixes: lp:1788495
* https://bugs.launchpad.net/kicad/+bug/1788495
2019-02-12 21:56:47 -08:00
jean-pierre charras a703c53312 Fixes in dialogs: mainly better sizes for grid columns, but more other minor fixes.
Fix wxGrid column minimal widths on Windows in dialogs (just fixing the size is not enough).
WX_GRID::GetVisibleWidth(): make width bigger for labels, because they usually use a bold font.
(However, the fix is just a workaround: a better code is welcome)
2019-02-10 16:40:47 +01:00
jean-pierre charras 8dc4077d58 Fix compatibility issues with wxWidgets 3.1.1 2019-02-10 07:59:27 +01:00
Seth Hillbrand 8ff764376a wx_grid: abstract visible column width
Cleanup code for checking visible extents of grid text.  Places single
routine to extract the current spacing from the grid in WX_GRID.
2019-02-09 15:31:31 -08:00
Seth Hillbrand 611c555eaf lib_tree: Ensure ON_CHAR events are passed 2019-02-03 06:01:21 +01: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 f85f10930a Break widget save/restore out to reusable class
The CONFIG_SAVE_RESTORE_WINDOW class does not need to be tied
to the array dialog, put it in common/widgets.

Also do a refactor and tidy-up of the the class, use a union for (slightly)
better type-safety and syntax (a variant would be better but that's C++17).

Also enable integral field save/restore from text boxes.
2019-01-30 15:41:35 -08:00
Seth Hillbrand 3ea766154b eeschema: Allow tree expand/collapse with +/- 2019-01-24 17:24:28 -08:00
Baranovskiy Konstantin 98a911dcb4 Custom grid editors: cancel changes on escape.
If user closes grid cell editor with Escape key any changes must be
canceled.
2019-01-19 14:54:58 -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
John Beard 73fb050b6d __WXWINDOWS__ does not mean __WXMSW__
Misuse of __WXWINDOWS__ for checking the presence of Windows. The correct
macro is __WINDOWS__ or __WXMSW__ in GUI programs.

__WXWINDOWS__ is always set, on all platforms.
2019-01-09 09:15:32 -05: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
Jeff Young 72f17ad7f0 Attempt to fix MSW Cancel-still-validates bug.
Fixes: lp:1805361
* https://bugs.launchpad.net/kicad/+bug/1805361
2018-11-27 17:09:09 +00:00
Jeff Young d2756bedf1 Keep state except when the filter changed.
(Used to be "except when filtering".)

Fixes: lp:1804293
* https://bugs.launchpad.net/kicad/+bug/1804293
2018-11-25 01:51:45 +00:00
Maciej Suminski 056114a15d Fix an outburst of error messages in UNIT_BINDER
Fixes: lp:1804834
* https://bugs.launchpad.net/kicad/+bug/1804834
2018-11-23 16:00:24 +01:00
Jeff Young 0de9cb345c Add shortcuts to setting dialogs for track widths, via sizes and grid sizes.
Fixes: lp:1803671
* https://bugs.launchpad.net/kicad/+bug/1803671
2018-11-17 00:35:06 +00:00
Jeff Young de971df4c6 Don't put up error dialogs after a Cancel of a dialog.
Fixes: lp:1800711
* https://bugs.launchpad.net/kicad/+bug/1800711
2018-10-30 23:13:32 +00:00
Jeff Young f660ec7cf8 Eval when needed, but only replace text when killing focus.
Fixes: lp:1800718
* https://bugs.launchpad.net/kicad/+bug/1800718

Fixes: lp:1800476
* https://bugs.launchpad.net/kicad/+bug/1800476
2018-10-30 22:58:22 +00:00