|
|
@ -31,14 +31,46 @@ SCH_SEARCH_PANE::SCH_SEARCH_PANE( SCH_EDIT_FRAME* aFrame ) : |
|
|
|
if( m_sch != nullptr ) |
|
|
|
m_sch->AddListener( this ); |
|
|
|
|
|
|
|
m_schFrame->Bind( EDA_EVT_UNITS_CHANGED, [&]( wxCommandEvent& aEvent ) |
|
|
|
m_schFrame->Bind( EDA_EVT_UNITS_CHANGED, &SCH_SEARCH_PANE::onUnitsChanged, this ); |
|
|
|
m_schFrame->Bind( EDA_EVT_SCHEMATIC_CHANGING, &SCH_SEARCH_PANE::onSchChanging, this ); |
|
|
|
m_schFrame->Bind( EDA_EVT_SCHEMATIC_CHANGED, &SCH_SEARCH_PANE::onSchChanged, this ); |
|
|
|
|
|
|
|
wxFont infoFont = KIUI::GetDockedPaneFont( this ); |
|
|
|
SetFont( infoFont ); |
|
|
|
m_notebook->SetFont( infoFont ); |
|
|
|
|
|
|
|
AddSearcher( std::make_shared<SYMBOL_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
AddSearcher( std::make_shared<POWER_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
AddSearcher( std::make_shared<TEXT_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
AddSearcher( std::make_shared<LABEL_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
AddSearcher( std::make_shared<GROUP_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SCH_SEARCH_PANE::~SCH_SEARCH_PANE() |
|
|
|
{ |
|
|
|
m_schFrame->Unbind( EDA_EVT_UNITS_CHANGED, &SCH_SEARCH_PANE::onUnitsChanged, this ); |
|
|
|
m_schFrame->Unbind( EDA_EVT_SCHEMATIC_CHANGING, &SCH_SEARCH_PANE::onSchChanging, this ); |
|
|
|
m_schFrame->Unbind( EDA_EVT_SCHEMATIC_CHANGED, &SCH_SEARCH_PANE::onSchChanged, this ); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SCH_SEARCH_PANE::onUnitsChanged( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
ClearAllResults(); |
|
|
|
RefreshSearch(); |
|
|
|
aEvent.Skip(); |
|
|
|
} ); |
|
|
|
event.Skip(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
m_schFrame->Bind( EDA_EVT_SCHEMATIC_CHANGED, [&]( wxCommandEvent& aEvent ) |
|
|
|
void SCH_SEARCH_PANE::onSchChanging( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
ClearAllResults(); |
|
|
|
event.Skip(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SCH_SEARCH_PANE::onSchChanged( wxCommandEvent& event ) |
|
|
|
{ |
|
|
|
m_sch = &m_schFrame->Schematic(); |
|
|
|
|
|
|
@ -47,24 +79,7 @@ SCH_SEARCH_PANE::SCH_SEARCH_PANE( SCH_EDIT_FRAME* aFrame ) : |
|
|
|
|
|
|
|
ClearAllResults(); |
|
|
|
RefreshSearch(); |
|
|
|
aEvent.Skip(); |
|
|
|
} ); |
|
|
|
|
|
|
|
m_schFrame->Bind( EDA_EVT_SCHEMATIC_CHANGING, [&]( wxCommandEvent& aEvent ) |
|
|
|
{ |
|
|
|
ClearAllResults(); |
|
|
|
aEvent.Skip(); |
|
|
|
} ); |
|
|
|
|
|
|
|
wxFont infoFont = KIUI::GetDockedPaneFont( this ); |
|
|
|
SetFont( infoFont ); |
|
|
|
m_notebook->SetFont( infoFont ); |
|
|
|
|
|
|
|
AddSearcher( std::make_shared<SYMBOL_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
AddSearcher( std::make_shared<POWER_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
AddSearcher( std::make_shared<TEXT_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
AddSearcher( std::make_shared<LABEL_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
AddSearcher( std::make_shared<GROUP_SEARCH_HANDLER>( aFrame ) ); |
|
|
|
event.Skip(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|