Commit Graph

11 Commits

Author SHA1 Message Date
John Beard 10900c918f Eeschema: Fix/circumvert GTK3 tree view bug
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
2019-04-28 17:12:12 +01:00
jean-pierre charras f364e81a91 Symbol editor: fix missing initialization in LIB_TREE_MODEL_ADAPTER::ColWidth().
The text size (in pixels) was never initialized (always 0) for the Column id 0.
2019-02-16 10:25:34 +01:00
Seth Hillbrand 409ad04ab3 libtree: Fixing indent size for MSW
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
2019-02-15 10:44:08 -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
Seth Hillbrand c0cd4c03fb pcbnew: Handle cancel action in fp load
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
2019-02-01 15:48:36 +01:00
Jeff Young e47351d1a6 Highlight only leaf nodes when filtering lib tree.
Fixes: lp:1787709
* https://bugs.launchpad.net/kicad/+bug/1787709
2018-08-19 17:59:32 +01:00
Jeff Young be1d6113d6 More performance enhancements.
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.
2018-08-06 13:49:27 +01:00
Jeff Young fd3e57d67f Layout adjustments and language-change-updating for modview. 2018-08-04 12:59:04 +01:00
Jeff Young 4e3c84e733 Score leaf nodes in LIB_TREEs, not just symbols & footprints.
Fixes: lp:1783251
* https://bugs.launchpad.net/kicad/+bug/1783251
2018-08-01 09:35:46 +01:00
Jeff Young f8a5e2c1c8 Performance enhancements in fp loading, string cmp, etc.
Knocks about 1/3 off the first footprint load, and more than 1/2
off subsequent loads.
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
Renamed from eeschema/cmp_tree_model_adapter_base.cpp (Browse further)