diff --git a/common/dialogs/dialog_display_info_HTML_base.cpp b/common/dialogs/dialog_display_info_HTML_base.cpp index 91d4e81e3c..b118ace166 100644 --- a/common/dialogs/dialog_display_info_HTML_base.cpp +++ b/common/dialogs/dialog_display_info_HTML_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jan 2 2018) +// C++ code generated with wxFormBuilder (version Dec 30 2017) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -16,12 +16,12 @@ DIALOG_DISPLAY_HTML_TEXT_BASE::DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, wxBoxSizer* bMainSizer; bMainSizer = new wxBoxSizer( wxVERTICAL ); - m_htmlWindow = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER ); + m_htmlWindow = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); m_htmlWindow->SetMinSize( wxSize( 400,250 ) ); - bMainSizer->Add( m_htmlWindow, 1, wxEXPAND, 5 ); + bMainSizer->Add( m_htmlWindow, 1, wxALL|wxEXPAND, 5 ); - m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + m_buttonClose = new wxButton( this, wxID_CANCEL, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonClose->SetDefault(); bMainSizer->Add( m_buttonClose, 0, wxALIGN_RIGHT|wxALL, 5 ); diff --git a/common/dialogs/dialog_display_info_HTML_base.fbp b/common/dialogs/dialog_display_info_HTML_base.fbp index 180e95bdb3..12b56f9376 100644 --- a/common/dialogs/dialog_display_info_HTML_base.fbp +++ b/common/dialogs/dialog_display_info_HTML_base.fbp @@ -95,7 +95,7 @@ none 5 - wxEXPAND + wxALL|wxEXPAND 1 1 @@ -148,7 +148,7 @@ - wxSUNKEN_BORDER + @@ -210,7 +210,7 @@ 0 0 wxID_CANCEL - Close + OK 0 @@ -228,7 +228,7 @@ Resizable 1 - wxBU_EXACTFIT + 0 diff --git a/common/dialogs/dialog_display_info_HTML_base.h b/common/dialogs/dialog_display_info_HTML_base.h index 5bbaeacdf3..da3890cdf6 100644 --- a/common/dialogs/dialog_display_info_HTML_base.h +++ b/common/dialogs/dialog_display_info_HTML_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jan 2 2018) +// C++ code generated with wxFormBuilder (version Dec 30 2017) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! diff --git a/common/html_messagebox.cpp b/common/html_messagebox.cpp index 8646701afe..874897f13c 100644 --- a/common/html_messagebox.cpp +++ b/common/html_messagebox.cpp @@ -35,7 +35,7 @@ HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* parent, const wxString& aTitle) : ListClear(); // Gives a default logical size (the actual size depends on the display definition) - SetSizeInDU( 240, 150 ); + SetSizeInDU( 320, 120 ); Center(); } diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 7d2d9d2aae..d2c0da21d7 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -148,6 +148,12 @@ class FP_CACHE wxDateTime m_mod_time; /// Footprint library path modified time stamp. MODULE_MAP m_modules; /// Map of footprint file name per MODULE*. + bool m_represents_non_existant_dir; // Indicates this cache represents a directory + // which does not exist. This forces + // GetLibModificationTime() to return 0 (at least + // until the directory is found, at which point it + // will return Now). + public: FP_CACHE( PCB_IO* aOwner, const wxString& aLibraryPath ); @@ -204,13 +210,19 @@ FP_CACHE::FP_CACHE( PCB_IO* aOwner, const wxString& aLibraryPath ) { m_owner = aOwner; m_lib_path.SetPath( aLibraryPath ); + m_represents_non_existant_dir = false; } wxDateTime FP_CACHE::GetLibModificationTime() const { if( !m_lib_path.DirExists() ) - return wxDateTime::Now(); + { + if( m_represents_non_existant_dir ) + return wxDateTime( 0.0 ); + else + return wxDateTime::Now(); + } return m_lib_path.GetModificationTime(); } @@ -280,10 +292,14 @@ void FP_CACHE::Save() void FP_CACHE::Load() { + m_represents_non_existant_dir = false; + wxDir dir( m_lib_path.GetPath() ); if( !dir.IsOpened() ) { + m_represents_non_existant_dir = true; + wxString msg = wxString::Format( _( "Footprint library path \"%s\" does not exist" ), GetChars( m_lib_path.GetPath() ) @@ -1958,18 +1974,10 @@ void PCB_IO::FootprintEnumerate( wxArrayString& aFootprintNames, LOCALE_IO toggle; // toggles on, then off, the C locale. wxDir dir( aLibraryPath ); - if( !dir.IsOpened() ) - { - THROW_IO_ERROR( wxString::Format( _( "footprint library path \"%s\" does not exist" ), - GetChars( aLibraryPath ) ) ); - } - init( aProperties ); wxString errorMsg; - // Some of the files may have been parsed correctly so we want to add the valid files to - // the library. try { cacheLib( aLibraryPath ); @@ -1979,6 +1987,9 @@ void PCB_IO::FootprintEnumerate( wxArrayString& aFootprintNames, errorMsg = ioe.What(); } + // Some of the files may have been parsed correctly so we want to add the valid files to + // the library. + const MODULE_MAP& mods = m_cache->GetModules(); for( MODULE_CITER it = mods.begin(); it != mods.end(); ++it ) diff --git a/pcbnew/load_select_footprint.cpp b/pcbnew/load_select_footprint.cpp index 7a6c0aeaf4..d68dff5d80 100644 --- a/pcbnew/load_select_footprint.cpp +++ b/pcbnew/load_select_footprint.cpp @@ -390,19 +390,14 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow, MList.ReadFootprintFiles( aTable, !aLibraryName ? NULL : &aLibraryName ); if( MList.GetErrorCount() ) - { MList.DisplayErrors( this ); - return wxEmptyString; - } if( MList.GetCount() == 0 ) { wxString tmp; for( unsigned i = 0; i < libraries.GetCount(); i++ ) - { tmp += libraries[i] + wxT( "\n" ); - } msg.Printf( _( "No footprints could be read from library file(s):\n\n%s\nin any of " "the library search paths. Verify your system is configured properly "