Apparently explicitly requesting a column to be sorted breaks component
filtering on Windows. Without SetSortOrder() call the list is sorted and
filtering still works as expected.
Fixes: lp:1739412
* https://bugs.launchpad.net/kicad/+bug/1739412
The reason the component tree widget was cleared on Windows is the fact
m_adapter->UpdateSearchString( m_query_ctrl->GetLineText( 0 ) ) is
called on any change of the symbol. But if m_query_ctrl is empty,
m_query_ctrl->GetLineText( 0 ) returns the "hint" (currently the word
"Search") not the actual value, so there is no "candidate" symbol in
list. Using m_query_ctrl->GetValue() returns the actual value and fixes
this issue.
Fixes: lp:1737132
* https://bugs.launchpad.net/kicad/+bug/1737132
COMPONENT_TREE::STATE used wxDataViewItem to store the selection, but it
will point to a deleted object if the selection was removed. Switched to
storing the selection using LIB_ID as it is much safer to use.
It turns out the fastest way to update wxDataViewCtrl is to nuke the
model and rebuild it from scratch rather than via
ItemAdded()/ItemDeleted() update notifications.
Fixes: lp:1734773
* https://bugs.launchpad.net/kicad/+bug/1734773
Change all of the component tree helper objects to use LIB_IDs instead of
LIB_ALIAS pointers. LIB_ALIAS pointers are dangerous to use because they
can be deleted in the symbol library editor while the component chooser
dialog has copies of them. With LIB_IDs, the LIB_ALIAS pointer is found
on demand and can be guaranteed to be valid.
Update the chooser dialog to load the symbol library table instead of the
libraries defined in the project file and return a LIB_ID instead of a
LIB_ALIAS pointer.
Modify SCH_BASE_FRAME::SelectComponentFromLibrary() to handle the LIB_IDs
returned from the component chooser dialog.
This was the behavior before the factoring out of COMPONENT_TREE. Moving
the history at the top just required inserting it at the right point;
fixing preselect involved wxEVT_INIT_DIALOG not propagating to the
panel. Simple solution was to move the parts of that event handler to
the constructor as they didn't have to be in an event handler anyway.
Fixes: lp:1707538
* https://bugs.launchpad.net/kicad/+bug/1707538
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas. When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
Enforcing the appropriate type is a good thing, though it results in
build warnings. For the moment we stay with the latter.
This reverts commit 6dd47119fe.
This commit creates more issues than resolves. It could happen that
there are components with different reference types (e.g. U1 and IC1)
that would be later converted to X1, causing a conflict.