diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index 1f99e1ed79..daa0ba3326 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -118,6 +118,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : m_filteringOptions = 0; m_tcFilterString = NULL; m_FootprintsList = FOOTPRINT_LIST::GetInstance( Kiway() ); + m_initialized = false; // Give an icon wxIcon icon; @@ -209,6 +210,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) : m_auimgr.AddPane( bottomPanel, wxAuiPaneInfo( horiz ).Name( wxT( "buttons" ) ).Bottom() ); m_auimgr.Update(); + m_initialized = true; // Connect Events m_saveAndContinue->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CVPCB_MAINFRAME::OnSaveAndContinue ), NULL, this ); @@ -645,8 +647,8 @@ void CVPCB_MAINFRAME::OnEnterFilteringText( wxCommandEvent& aEvent ) void CVPCB_MAINFRAME::DisplayStatus() { - if( !m_libListBox || !m_compListBox || !m_footprintListBox ) - return; // still initializing; not ready for status yet + if( !m_initialized ) + return; wxString filters, msg; COMPONENT* component = GetSelectedComponent(); diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 4af40e0bf7..b7cf96b185 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -77,12 +77,13 @@ public: FOOTPRINT_LIST* m_FootprintsList; protected: - int m_undefinedComponentCnt; bool m_modified; bool m_skipComponentSelect; // true to skip OnSelectComponent event // (in automatic selection/deletion of associations) PARAM_CFG_ARRAY m_projectFileParams; + bool m_initialized; + CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ); public: diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 94187e9d57..0468776172 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -361,12 +361,6 @@ bool CVPCB_MAINFRAME::ReadNetListAndFpFiles( const std::string& aNetlist ) GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) ); m_compListBox->AppendLine( msg ); - - if( component->GetFPID().empty() ) - { - m_undefinedComponentCnt += 1; - continue; - } } if( !m_netlist.IsEmpty() )