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)
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)
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
There are three related changes here to harden our handling of threads
in the footprint async loader.
1) Footprint async loader explicitly aborts any remaining loader threads
on exit.
2) We protect the thread join by a mutex
3) We do not pause during no-wait routines
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
Also update the rest of the symbol-chooser usage to current
specs, including examining the timestamp to see if the list
needs loading at all.
Partial fix to: lp:1760936
* https://bugs.launchpad.net/kicad/+bug/1760936
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.
Normal SetValue() call would temporarily change the displayed
value, but as soon as the text widget receives focus again, the original
expression (not evaluated) is restored.
To avoid this, the original expression is cleared in the associated
NumericEvaluator object.
Also adds indicators in layers palette for feedback.
Also generates sized images for all indicators instead of using
scaled bitmaps (which didn't look great).
Also fixes a completely unrelated typo in a UI string.
Includes some dialog changes to go with the menu update.
Includes promoting the Pcbnew graphics mode back to main menu.
Includes renaming Graphics modes to Toolsets.
Move sketch mode stuff from Display Settings to View menu.
Move Icons in Menus from View menu to General Preferences.
Move Icon Scaling from Display Settings to General Preferences.
Regroup some items in both dialogs for better comprehension.
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.
DIALOG_COMPONENT_CHOOSE displays footprint preview when pcbnew kiface
is available, but it crashed when it was not in the same directory
as the executable. Now it displays an error message that allows the
user to quickly identify the problem.
Fixes: lp:1695005
* https://bugs.launchpad.net/kicad/+bug/1695005
Fix incorrect frame deletion, only noticeable when eeschema is run in stand alone mode.
After selecting a footprint using the footprint viewer, the application cannot be closed.
Reason:
the footprint viewer ctor creates an instance (not shown) of a FRAME_PCB.
Unfortunately, this pcb frame was not deleted by Eeschema, in stand alone mode,
preventing the application to be closed because a frame was still active after closing the schematic editor frame.
Now the footprint viewer ctor delete this instance after use, if it was not previously existing.
After selecting a footprint using the footprint viewer, the application cannot be closed.
Reason:
the footprint viewer ctor creates an instance (not shown) of a FRAME_PCB.
Unfortunately, this pcb frame was not deleted by Eeschema, in stand alone mode,
preventing the application to be closed because a frame was still active after closing the schematic editor frame.
- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
- FOOTPRINT_ASYNC_LOADER to load without freezing UI
- Rewrite loader threads as queue-driven thread pool
- Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
The motivation here is to concentrate display options in the GAL display
settings, ready for removal of legacy canvases. Instead of having the
property as a member of the DRAW_FRAME, with the GAL canvas retreiving
it from there, it is now in the GAL_DISPLAY_OPTIONS struct, and both GAL
and legacy get it from there.
The options for setting cursor shape are then moved out of the general
options dialog, and into the GAL display options widget, where they can
be used in all GAL-aware programs.
GAL cursor shape works on GAL, but not legacy, so the option is now
available on OSX (but only affects GAL, and is labelled as such).
This gives a bit more space to the GAL options in the left panel
Also tidy up some code style and unnecessary default arguments in the
GAL display planel widget.
A new items is added to the GAL display options (and the dialog), and a
hotkey (Ctrl+Shift+x) is added to toggle it.
Fixes: lp:1673633
* https://bugs.launchpad.net/kicad/+bug/1673633
The primary motivation here is to allow other GAL canvas users (eg
Modedit, and soon Gerbview) to be able to easily modify GAL canvas
options.
For now, this doesn't change the display properties dialog in
appearance, but if more GAL options are added, it might need a bit of
tweak and maybe tabs or similar, like Eeschema preferences.
- Pull out compound widget bits into FOOTPRINT_PREVIEW_WIDGET
- Move all pcbnew-specific bits *inside* pcbnew; implementation should
be private for users
- Make a few class members and inner types private
Init'ing static wxBitmaps in the global scope happens before the GUI is
ready, which segfaults, at least on GTK+. This can happen in, for
example, the Python module. In normal use, the singletop/kicad
loader has initialised the GUI first, so it doesn't manifest there.
The introduces INDICATOR_ICON, which is a very simple class holding a
bitmap that can toggle on or off.
The ICON_PROVIDER class then provides icons to INDICATOR_ICONS, which
means the class can be used for more than just row indicators.
A default row icon provider is also provided for use in the standard row
selector.
This introduces COLOR_SWATCH, which is a reusable
widget that shows a color swatch and can invoke the colour picker
when duble/middle clicked.
It uses it's own wxCommandEvent to signal the change.
This makes the layer widget simpler internally, and also allows other
code to show identical swatches if needed.
This commit brings several changes:
- Add a footprint preview pane to the eeschema component selector
- Upgrade component list to wxTreeListCtrl
- Factor out wxTreeListCtrl subclass TWO_COLUMN_TREE_LIST which
patches a column size bug
- Linkify datasheet URL in info pane
The new (eeschema, so far) hotkeys editor uses the right-click menu for the
reset command, so the reset-to-default function that was added in 6652
(git:0cd7476) was not accessible from eeschema.