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
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.
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
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
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
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.
* 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.
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
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
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
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.
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
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
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.
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.
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.
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.
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.
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
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.
* 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.
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.
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
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
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.
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
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
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
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)
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)
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)
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)
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)
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)
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.
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
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
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