This freeze/thaw is different than the update locker freeze/thaw,
and is needed to prevent crashes due to accessing invalid (already
freed) data on GTK.
Fixes https://gitlab.com/kicad/code/kicad/issues/5289
The tree model adapter appears to have update issues when modifying the
scores while it _might_ get updated. This moves the lock higher and
removes the extraneous Freeze/Thaw call.
Unfortunately, this only exposes an additional issue in the tool handler
but this will hopefully be easier to debug.
Fixes https://gitlab.com/kicad/code/kicad/issues/5206
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
GTK only calculates new widths once the tree is displayed,
so calling Refresh after updating the tree but before display
will return a column width of 0. Instead, use saved column
widths if an invalid width was returned.
Fixes https://gitlab.com/kicad/code/kicad/issues/4837
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.
ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme
Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
* Move column width manipulation into the lib tree adapter
* Fix issue with GTK where if someone types too fast, the part
column gets 0 width.
Fixes: lp:1841584
* https://bugs.launchpad.net/kicad/+bug/1841584
There is a rendering bug in GTK3, which appears to be
an upstream GTK issue.
This can be worked around by, when filtering, ensuring the
*parent* item of the selected item is visible. This will
not cause the selected item to not be visible, as the selected
item will be the first shown child. So it will be visible, as long
as the list box is greater than a single row high, which it will be
in all practical scenarios.
This is done on all platforms, as it has a beneficial side-effect:
the parent library of the selection is naturally shown to the
user, so they don't need to scroll up to see what library their
current filter selection was in.
Fixes: lp:1804400
* https://bugs.launchpad.net/kicad/+bug/1804400
The indent size was estimated by the width of characters. But MSW
indent is substantially different from OSX and Linux. It also cuts off
the middle characters rather than the end leading to poor display if the
width does not fit. This uses the system setting for indent to account
for the indent spacing + 'M' to account for the arrow inset.
Fixes: lp:1815401
* https://bugs.launchpad.net/kicad/+bug/1815401
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
When the user cancels the footprint load, we should assume they are
canceling the placement of a new footprint. This also adds sanity check
when populating the list
Fixes: lp:1814181
* https://bugs.launchpad.net/kicad/+bug/1814181
Be more intelligent about sorting lib tree items. (Footprint
entries, for instance, come out of an already-sorted list.)
Don't recreate menus twice when laoding Footprint Editor.
More pervasive use of WX_FILENAME to avoid expensive calls to
wxFileName::SplitPath() and string concatenation.
For POSIX kernels do all the work on the file-system side so we
don't have to keep converting back and forth between encodings.