Commit 392e3a0a authored by Henner Zeller's avatar Henner Zeller Committed by Wayne Stambaugh
Browse files

Eeschema component selection dialog improvements.

* Allow to select units in components that have more than one right in the
  component chooser dialog.
* Keep chosen unit in history.
* Show preview of current component unit as thumbnail image next to the
  description box.
* Fixes lp:1280567
parent 7da13137
Loading
Loading
Loading
Loading
+138 −101
Original line number Diff line number Diff line
@@ -44,14 +44,19 @@ static const unsigned kLowestDefaultScore = 1;

struct COMPONENT_TREE_SEARCH_CONTAINER::TREE_NODE
{
    TREE_NODE(TREE_NODE* aParent, CMP_LIBRARY* aOwningLib,
    // Levels of nodes.
    enum NODE_TYPE {
        TYPE_LIB,
        TYPE_ALIAS,
        TYPE_UNIT
    };

    TREE_NODE(NODE_TYPE aType, TREE_NODE* aParent, LIB_ALIAS* aAlias,
              const wxString& aName, const wxString& aDisplayInfo,
              const wxString& aSearchText,
              bool aNormallyExpanded = false)
        : Parent( aParent ),
          Lib( aOwningLib ),
          NormallyExpanded( aNormallyExpanded ),
          Name( aName ),
              const wxString& aSearchText )
        : Type( aType ),
          Parent( aParent ), Alias( aAlias ), Unit( 0 ),
          DisplayName( aName ),
          DisplayInfo( aDisplayInfo ),
          MatchName( aName.Lower() ),
          SearchText( aSearchText.Lower() ),
@@ -59,10 +64,11 @@ struct COMPONENT_TREE_SEARCH_CONTAINER::TREE_NODE
    {
    }

    TREE_NODE* const Parent;      ///< NULL if library, pointer to lib-node when component.
    CMP_LIBRARY* const Lib;       ///< Owning library of this component.
    const bool NormallyExpanded;  ///< If this is a parent node, should it be unfolded ?
    const wxString Name;          ///< Exact name as displayed to the user.
    const NODE_TYPE Type;         ///< Type of node in the hierarchy.
    TREE_NODE* const Parent;      ///< NULL if library, pointer to parent when component/alias.
    LIB_ALIAS* const Alias;       ///< Component alias associated with this entry.
    int Unit;                     ///< Part number; Assigned: >= 1; default = 0
    const wxString DisplayName;   ///< Exact name as displayed to the user.
    const wxString DisplayInfo;   ///< Additional info displayed in the tree (description..)

    const wxString MatchName;     ///< Preprocessed: lowercased display name.
@@ -75,27 +81,25 @@ struct COMPONENT_TREE_SEARCH_CONTAINER::TREE_NODE


// Sort tree nodes by reverse match-score (bigger is first), then alphabetically.
// Library nodes (i.e. the ones that don't have a parent) are always sorted before any
// leaf nodes.
// Library (i.e. the ones that don't have a parent) are always sorted before any
// leaf nodes. Component
bool COMPONENT_TREE_SEARCH_CONTAINER::scoreComparator( const TREE_NODE* a1, const TREE_NODE* a2 )
{
    if ( a1->Parent == NULL && a2->Parent != NULL )
        return true;

    if ( a1->Parent != NULL && a2->Parent == NULL )
        return false;
    if( a1->Type != a2->Type )
        return a1->Type < a2->Type;

    if( a1->MatchScore != a2->MatchScore )
        return a1->MatchScore > a2->MatchScore;  // biggest first.

    if( a1->Parent != a2->Parent )
        return a1->Parent->MatchName.Cmp(a2->Parent->MatchName) < 0;
        return scoreComparator( a1->Parent, a2->Parent );

    return a1->MatchName.Cmp( a2->MatchName ) < 0;
}


COMPONENT_TREE_SEARCH_CONTAINER::COMPONENT_TREE_SEARCH_CONTAINER()
    : tree( NULL )
    : tree( NULL ), libraries_added( 0 ), preselect_unit_number( -1 )
{
}

@@ -108,9 +112,11 @@ COMPONENT_TREE_SEARCH_CONTAINER::~COMPONENT_TREE_SEARCH_CONTAINER()
}


void COMPONENT_TREE_SEARCH_CONTAINER::SetPreselectNode( const wxString& aComponentName )
void COMPONENT_TREE_SEARCH_CONTAINER::SetPreselectNode( const wxString& aComponentName,
                                                        int aUnit )
{
    preselect_node_name = aComponentName.Lower();
    preselect_unit_number = aUnit;
}


@@ -123,71 +129,79 @@ void COMPONENT_TREE_SEARCH_CONTAINER::SetTree( wxTreeCtrl* aTree )

void COMPONENT_TREE_SEARCH_CONTAINER::AddLibrary( CMP_LIBRARY& aLib )
{
    wxArrayString all_comp;
    wxArrayString all_aliases;

    aLib.GetEntryNames( all_comp );
    AddComponentList( aLib.GetName(), all_comp, &aLib, false );
    aLib.GetEntryNames( all_aliases );
    AddAliasList( aLib.GetName(), all_aliases, &aLib );
    ++libraries_added;
}


void COMPONENT_TREE_SEARCH_CONTAINER::AddComponentList( const wxString& aNodeName,
                                                        const wxArrayString& aComponentNameList,
                                                        CMP_LIBRARY* aOptionalLib,
                                                        bool aNormallyExpanded )
void COMPONENT_TREE_SEARCH_CONTAINER::AddAliasList( const wxString& aNodeName,
                                                    const wxArrayString& aAliasNameList,
                                                    CMP_LIBRARY* aOptionalLib )
{
    TREE_NODE* parent_node = new TREE_NODE( NULL, NULL, aNodeName, wxEmptyString, wxEmptyString,
                                            aNormallyExpanded );
    static const wxChar unitLetter[] = wxT( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" );

    nodes.push_back( parent_node );
    TREE_NODE* const lib_node = new TREE_NODE( TREE_NODE::TYPE_LIB,  NULL, NULL,
                                               aNodeName, wxEmptyString, wxEmptyString );
    nodes.push_back( lib_node );

    BOOST_FOREACH( const wxString& cName, aComponentNameList )
    BOOST_FOREACH( const wxString& aName, aAliasNameList )
    {
        LIB_COMPONENT *c;
        LIB_ALIAS* a;

        if( aOptionalLib )
            c = aOptionalLib->FindComponent( cName );
            a = aOptionalLib->FindAlias( aName );
        else
            c = CMP_LIBRARY::FindLibraryComponent( cName, wxEmptyString );
            a = CMP_LIBRARY::FindLibraryEntry( aName, wxEmptyString );

        if (c == NULL)
        if( a == NULL )
            continue;

        wxString keywords, descriptions;
        wxString display_info;
        wxString search_text;
        search_text = ( a->GetKeyWords().empty() ) ? wxT("        ") : a->GetKeyWords();
        search_text += a->GetDescription();

        for ( size_t i = 0; i < c->GetAliasCount(); ++i )
        {
            LIB_ALIAS *a = c->GetAlias( i );
            keywords += a->GetKeyWords();
            descriptions += a->GetDescription();
        wxString display_info;

            if ( display_info.empty() && !a->GetDescription().empty() )
        if( !a->GetDescription().empty() )
        {
            // Preformatting. Unfortunately, the tree widget doesn't have columns
            display_info.Printf( wxT(" %s[ %s ]"),
                                     ( cName.length() <= 8 ) ? wxT("\t\t") : wxT("\t"),
                                 ( a->GetName().length() <= 8 ) ? wxT("\t\t") : wxT("\t"),
                                 GetChars( a->GetDescription() ) );
        }
        }

        // If there are no keywords, we give a couple of characters whitespace penalty. We want
        // a component with a search-term found in the keywords score slightly higher than another
        // component without keywords, but that term in the descriptions.
        wxString search_text = ( !keywords.empty() ) ? keywords : wxT("        ");
        search_text += descriptions;
        nodes.push_back( new TREE_NODE( parent_node, c->GetLibrary(),
                                        cName, display_info, search_text ) );
        TREE_NODE* alias_node = new TREE_NODE( TREE_NODE::TYPE_ALIAS, lib_node,
                                               a, a->GetName(), display_info, search_text );
        nodes.push_back( alias_node );

        if( a->GetComponent()->IsMulti() )    // Add all units as sub-nodes.
            for ( int u = 0; u < a->GetComponent()->GetPartCount(); ++u )
            {
                const wxString unitName = unitLetter[u];
                TREE_NODE* unit_node = new TREE_NODE(TREE_NODE::TYPE_UNIT, alias_node, a,
                                                     _("Unit ") + unitName,
                                                     wxEmptyString, wxEmptyString );
                unit_node->Unit = u + 1;
                nodes.push_back( unit_node );
            }
    }
}


LIB_COMPONENT* COMPONENT_TREE_SEARCH_CONTAINER::GetSelectedComponent()
LIB_ALIAS* COMPONENT_TREE_SEARCH_CONTAINER::GetSelectedAlias( int* aUnit )
{
    const wxTreeItemId& select_id = tree->GetSelection();

    BOOST_FOREACH( TREE_NODE* node, nodes )
    {
        if ( node->MatchScore > 0 && node->TreeId == select_id && node->Lib )
            return node->Lib->FindComponent( node->Name );
        if( node->MatchScore > 0 && node->TreeId == select_id ) {
            if( aUnit && node->Unit > 0 )
                *aUnit = node->Unit;
            return node->Alias;
        }
    }
    return NULL;
}
@@ -220,7 +234,7 @@ void COMPONENT_TREE_SEARCH_CONTAINER::UpdateSearchTerm( const wxString& aSearch
    BOOST_FOREACH( TREE_NODE* node, nodes )
    {
        node->PreviousScore = node->MatchScore;
        node->MatchScore = node->Parent ? kLowestDefaultScore : 0;  // start-match for leafs.
        node->MatchScore = ( node->Type == TREE_NODE::TYPE_LIB ) ? 0 : kLowestDefaultScore;
    }

    // Create match scores for each node for all the terms, that come space-separated.
@@ -239,10 +253,11 @@ void COMPONENT_TREE_SEARCH_CONTAINER::UpdateSearchTerm( const wxString& aSearch
    while ( tokenizer.HasMoreTokens() )
    {
        const wxString term = tokenizer.GetNextToken().Lower();

        BOOST_FOREACH( TREE_NODE* node, nodes )
        {
            if ( node->Parent == NULL)
                continue;      // Library nodes are not scored here.
            if( node->Type != TREE_NODE::TYPE_ALIAS )
                continue;      // Only aliases are actually scored here.

            if( node->MatchScore == 0)
                continue;   // Leaf node without score are out of the game.
@@ -277,19 +292,32 @@ void COMPONENT_TREE_SEARCH_CONTAINER::UpdateSearchTerm( const wxString& aSearch
        }
    }

    // Parent nodes have the maximum score seen in any of their children.
    // Library nodes have the maximum score seen in any of their children.
    // Alias nodes have the score of their parents.
    unsigned highest_score_seen = 0;
    bool any_change = false;

    BOOST_FOREACH( TREE_NODE* node, nodes )
    {
        if ( node->Parent == NULL )
            continue;

        switch( node->Type )
        {
        case TREE_NODE::TYPE_ALIAS:
            {
                any_change |= (node->PreviousScore != node->MatchScore);
                // Update library score.
                node->Parent->MatchScore = std::max( node->Parent->MatchScore, node->MatchScore );
                highest_score_seen = std::max( highest_score_seen, node->MatchScore );
            }
            break;

        case TREE_NODE::TYPE_UNIT:
            node->MatchScore = node->Parent->MatchScore;
            break;

        default:
            break;
        }
    }

    // The tree update might be slow, so we want to bail out if there is no change.
    if( !any_change )
@@ -305,6 +333,7 @@ void COMPONENT_TREE_SEARCH_CONTAINER::UpdateSearchTerm( const wxString& aSearch
    const wxTreeItemId root_id = tree->AddRoot( wxEmptyString );
    const TREE_NODE* first_match = NULL;
    const TREE_NODE* preselected_node = NULL;

    BOOST_FOREACH( TREE_NODE* node, nodes )
    {
        if( node->MatchScore == 0 )
@@ -318,34 +347,42 @@ void COMPONENT_TREE_SEARCH_CONTAINER::UpdateSearchTerm( const wxString& aSearch
        if( highest_score_seen > kLowestDefaultScore && node->MatchScore == kLowestDefaultScore )
            continue;

        const bool isLeaf = ( node->Parent != NULL );
        wxString node_text;
#if 0
        // Node text with scoring information for debugging
        node_text.Printf( wxT("%s (s=%u)%s"), GetChars(node->Name),
        node_text.Printf( wxT("%s (s=%u)%s"), GetChars(node->DisplayName),
                          node->MatchScore, GetChars( node->DisplayInfo ));
#else
        node_text = node->Name + node->DisplayInfo;
        node_text = node->DisplayName + node->DisplayInfo;
#endif
        node->TreeId = tree->AppendItem( !isLeaf ? root_id : node->Parent->TreeId, node_text );

        // If we are a leaf node, we might need to expand.
        if ( isLeaf )
        {
            if ( node->MatchScore > kLowestDefaultScore )
        node->TreeId = tree->AppendItem( node->Parent ? node->Parent->TreeId : root_id,
                                         node_text );

        // If we are a nicely scored alias, we want to have it visible. Also, if there
        // is only a single library in this container, we want to have it unfolded
        // (example: power library).
        if( node->Type == TREE_NODE::TYPE_ALIAS
             && ( node->MatchScore > kLowestDefaultScore || libraries_added == 1 ) )
        {
            tree->EnsureVisible( node->TreeId );

            if( first_match == NULL )
                    first_match = node;   // The "I am feeling lucky" element.
                first_match = node;   // First, highest scoring: the "I am feeling lucky" element.
        }

            if ( preselected_node == NULL && node->MatchName == preselect_node_name )
        // The first node that matches our pre-select criteria is choosen. 'First node'
        // means, it shows up in the history, as the history node is displayed very first
        // (by virtue of alphabetical ordering)
        if( preselected_node == NULL
             && node->Type == TREE_NODE::TYPE_ALIAS
             && node->MatchName == preselect_node_name )
            preselected_node = node;
        }

        if ( !isLeaf && node->NormallyExpanded )
            tree->Expand( node->TreeId );
        // Refinement in case we come accross a matching unit node.
        if( preselected_node != NULL && preselected_node->Type == TREE_NODE::TYPE_ALIAS
             && node->Parent == preselected_node
             && preselect_unit_number >= 1 && node->Unit == preselect_unit_number )
            preselected_node = node;
    }

    if( first_match )                      // Highest score search match pre-selected.
+19 −11
Original line number Diff line number Diff line
@@ -21,11 +21,13 @@
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */
#ifndef COMPONENT_TREE_SEARCH_CONTAINER_H
#define COMPONENT_TREE_SEARCH_CONTAINER_H

#include <vector>
#include <wx/string.h>

class LIB_COMPONENT;
class LIB_ALIAS;
class CMP_LIBRARY;
class wxTreeCtrl;
class wxArrayString;
@@ -44,7 +46,7 @@ public:
    ~COMPONENT_TREE_SEARCH_CONTAINER();

    /** Function AddLibrary
     * Add the components of this library to be searched.
     * Add all the components and their aliases of this library to be searched.
     * To be called in the setup phase to fill this container.
     *
     * @param aLib containting all the components to be added.
@@ -56,19 +58,19 @@ public:
     * To be called in the setup phase to fill this container.
     *
     * @param aNodeName          The parent node name the components will show up as leaf.
     * @param aComponentNameList List of component names.
     * @param aAliasNameList List of alias names.
     * @param aOptionalLib       Library to look up the component names (if NULL: global lookup)
     * @param aNormallyExpanded  Should the node in the tree be expanded by default.
     */
    void AddComponentList( const wxString& aNodeName, const wxArrayString& aComponentNameList,
                           CMP_LIBRARY* aOptionalLib, bool aNormallyExpanded );
    void AddAliasList( const wxString& aNodeName, const wxArrayString& aAliasNameList,
                       CMP_LIBRARY* aOptionalLib );

    /** Function SetPreselectNode
     * Set the component name to be selected in absence of any search-result.
     *
     * @param aComponentName the component name to be selected.
     * @param aUnit          the component unit to be selected (if > 0).
     */
    void SetPreselectNode( const wxString& aComponentName );
    void SetPreselectNode( const wxString& aComponentName, int aUnit );

    /** Function SetTree
     * Set the tree to be manipulated.
@@ -92,17 +94,23 @@ public:
     */
    void UpdateSearchTerm( const wxString& aSearch );

    /** Function GetSelectedComponent
    /** Function GetSelectedAlias
     *
     * @return the selected component or NULL if there is none.
     * @param if not-NULL, the selected sub-unit is set here.
     * @return the selected alias or NULL if there is none.
     */
    LIB_COMPONENT* GetSelectedComponent();
    LIB_ALIAS* GetSelectedAlias( int* aUnit );

private:
    struct TREE_NODE;
    static bool scoreComparator( const TREE_NODE* a1, const TREE_NODE* a2 );

    std::vector<TREE_NODE*> nodes;
    wxString preselect_node_name;
    wxTreeCtrl* tree;
    int libraries_added;

    wxString preselect_node_name;
    int preselect_unit_number;
};

#endif /* COMPONENT_TREE_SEARCH_CONTAINER_H */
+150 −84

File changed.

Preview size limit exceeded, changes collapsed.

+16 −7
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */
#ifndef DIALOG_CHOOSE_COMPONENT_H
#define DIALOG_CHOOSE_COMPONENT_H

#include <dialog_choose_component_base.h>

@@ -32,14 +34,16 @@ class DIALOG_CHOOSE_COMPONENT : public DIALOG_CHOOSE_COMPONENT_BASE
{
public:
    DIALOG_CHOOSE_COMPONENT( wxWindow* aParent, const wxString& aTitle,
                             COMPONENT_TREE_SEARCH_CONTAINER* aSearch_container );
                             COMPONENT_TREE_SEARCH_CONTAINER* aSearch_container,
                             int aDeMorganConvert );

    /** Function GetSelectedComponentName
    /** Function GetSelectedAliasName
     * To be called after this dialog returns from ShowModal().
     *
     * @return the component that has been selected, or an empty string if there is none.
     * @param aUnit if not NULL, the selected unit is filled in here.
     * @return the alias that has been selected, or an empty string if there is none.
     */
    wxString GetSelectedComponentName() const;
    wxString GetSelectedAliasName( int* aUnit ) const;

    /** Function IsExternalBrowserSelected
     *
@@ -57,13 +61,18 @@ protected:
    virtual void OnTreeMouseUp( wxMouseEvent& aMouseEvent );

    virtual void OnStartComponentBrowser( wxMouseEvent& aEvent );
    virtual void OnHandlePreviewRepaint( wxPaintEvent& aRepaintEvent );

private:
    void updateSelection();
    void SelectIfValid( const wxTreeItemId& aTreeId );
    bool updateSelection();
    void selectIfValid( const wxTreeItemId& aTreeId );
    void renderPreview( LIB_COMPONENT* aComponent, int aUnit );

    COMPONENT_TREE_SEARCH_CONTAINER* const m_search_container;
    LIB_COMPONENT* m_selected_component;
    const int m_deMorganConvert;
    bool m_external_browser_requested;
    bool m_received_doubleclick_in_tree;
    bool m_ready_to_render;
};

#endif /* DIALOG_CHOOSE_COMPONENT_H */
+9 −25
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov  6 2013)
// C++ code generated with wxFormBuilder (version Feb  8 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -11,7 +11,7 @@

DIALOG_CHOOSE_COMPONENT_BASE::DIALOG_CHOOSE_COMPONENT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 450,-1 ), wxDefaultSize );
	this->SetSizeHints( wxSize( 450,100 ), wxDefaultSize );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
@@ -37,35 +37,21 @@ DIALOG_CHOOSE_COMPONENT_BASE::DIALOG_CHOOSE_COMPONENT_BASE( wxWindow* parent, wx
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxHORIZONTAL );
	
	m_componentView = new wxStaticText( this, wxID_ANY, wxT("TODO\n(mini. comp image)"), wxDefaultPosition, wxSize( 100,100 ), 0 );
	m_componentView->Wrap( -1 );
	m_componentView = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_componentView->SetMinSize( wxSize( 100,100 ) );
	
	bSizer3->Add( m_componentView, 0, wxALL, 5 );
	bSizer3->Add( m_componentView, 1, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer6;
	bSizer6 = new wxBoxSizer( wxVERTICAL );
	m_componentDetails = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_MULTILINE );
	m_componentDetails->SetMinSize( wxSize( -1,100 ) );
	
	m_componentDetails = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,100 ), wxTE_MULTILINE );
	bSizer6->Add( m_componentDetails, 1, wxALL|wxEXPAND, 5 );
	
	m_unitChoice = new wxComboBox( this, wxID_ANY, wxT("Unit A"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	m_unitChoice->Enable( false );
	m_unitChoice->Hide();
	
	bSizer6->Add( m_unitChoice, 0, wxALL, 5 );
	
	
	bSizer3->Add( bSizer6, 2, wxEXPAND, 5 );
	bSizer3->Add( m_componentDetails, 2, wxALL|wxEXPAND, 5 );
	
	
	bSizer1->Add( bSizer3, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxHORIZONTAL );
	
	
	bSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	m_button = new wxStdDialogButtonSizer();
	m_buttonOK = new wxButton( this, wxID_OK );
@@ -77,7 +63,7 @@ DIALOG_CHOOSE_COMPONENT_BASE::DIALOG_CHOOSE_COMPONENT_BASE( wxWindow* parent, wx
	bSizer5->Add( m_button, 0, wxEXPAND, 5 );
	
	
	bSizer1->Add( bSizer5, 0, wxEXPAND, 5 );
	bSizer1->Add( bSizer5, 0, wxALIGN_RIGHT, 5 );
	
	
	this->SetSizer( bSizer1 );
@@ -92,7 +78,6 @@ DIALOG_CHOOSE_COMPONENT_BASE::DIALOG_CHOOSE_COMPONENT_BASE( wxWindow* parent, wx
	m_libraryComponentTree->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnTreeMouseUp ), NULL, this );
	m_libraryComponentTree->Connect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnDoubleClickTreeSelect ), NULL, this );
	m_libraryComponentTree->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnTreeSelect ), NULL, this );
	m_componentView->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnStartComponentBrowser ), NULL, this );
}

DIALOG_CHOOSE_COMPONENT_BASE::~DIALOG_CHOOSE_COMPONENT_BASE()
@@ -104,6 +89,5 @@ DIALOG_CHOOSE_COMPONENT_BASE::~DIALOG_CHOOSE_COMPONENT_BASE()
	m_libraryComponentTree->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnTreeMouseUp ), NULL, this );
	m_libraryComponentTree->Disconnect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnDoubleClickTreeSelect ), NULL, this );
	m_libraryComponentTree->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnTreeSelect ), NULL, this );
	m_componentView->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnStartComponentBrowser ), NULL, this );
	
}
Loading