Fix 3D shape & footprint download wizards freeze on OSX
Fixes: lp:1758095 * https://bugs.launchpad.net/kicad/+bug/1758095
This commit is contained in:
parent
554cb54a4f
commit
86906b05e0
|
@ -287,7 +287,7 @@ void WIZARD_3DSHAPE_LIBS_DOWNLOADER::OnWizardFinished( wxWizardEvent& aEvent )
|
|||
|
||||
if( !downloadGithubLibsFromList( m_libraries, &error ) )
|
||||
{
|
||||
DisplayError( GetParent(), error );
|
||||
DisplayError( this, error );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -356,9 +356,10 @@ bool WIZARD_3DSHAPE_LIBS_DOWNLOADER::downloadGithubLibsFromList( wxArrayString&
|
|||
// Display a progress bar to show the download state
|
||||
// The title is updated for each downloaded library.
|
||||
// the state will be updated by downloadOneLib() for each file.
|
||||
// for OSX do not enable wPD_APP_MODAL, keep wxPD_AUTO_HIDE
|
||||
wxProgressDialog pdlg( _( "Downloading 3D libraries" ), wxEmptyString,
|
||||
aUrlList.GetCount(), this,
|
||||
wxPD_CAN_ABORT | wxPD_APP_MODAL | wxPD_AUTO_HIDE );
|
||||
wxPD_CAN_ABORT | wxPD_AUTO_HIDE );
|
||||
|
||||
// Built the full server name string:
|
||||
wxURI repo( GetGithubURL() );
|
||||
|
@ -404,7 +405,7 @@ bool WIZARD_3DSHAPE_LIBS_DOWNLOADER::downloadGithubLibsFromList( wxArrayString&
|
|||
|
||||
|
||||
bool WIZARD_3DSHAPE_LIBS_DOWNLOADER::downloadOneLib( const wxString& aLibURL,
|
||||
const wxString& aLocalLibName, wxProgressDialog * aIndicator,
|
||||
const wxString& aLocalLibName, wxProgressDialog* aIndicator,
|
||||
wxString* aErrorMessage )
|
||||
{
|
||||
wxArrayString fileslist;
|
||||
|
|
|
@ -77,8 +77,8 @@ public:
|
|||
void OnWizardFinished( wxWizardEvent& aEvent ) override;
|
||||
void OnBrowseButtonClick( wxCommandEvent& aEvent ) override;
|
||||
void OnCheckSaveCopy( wxCommandEvent& aEvent );
|
||||
void OnDefault3DPathButtonClick( wxCommandEvent& event ) override;
|
||||
void OnGridLibReviewSize( wxSizeEvent& event ) override;
|
||||
void OnDefault3DPathButtonClick( wxCommandEvent& event ) override;
|
||||
void OnGridLibReviewSize( wxSizeEvent& event ) override;
|
||||
void OnLocalFolderChange( wxCommandEvent& event ) override;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -606,7 +606,9 @@ bool WIZARD_FPLIB_TABLE::downloadGithubLibsFromList( wxArrayString& aUrlList,
|
|||
wxString* aErrorMessage )
|
||||
{
|
||||
// Display a progress bar to show the downlaod state
|
||||
wxProgressDialog pdlg( _( "Downloading libraries" ), wxEmptyString, aUrlList.GetCount() );
|
||||
// for OSX do not enable wPD_APP_MODAL, keep wxPD_AUTO_HIDE
|
||||
wxProgressDialog pdlg( _( "Downloading libraries" ), wxEmptyString, aUrlList.GetCount(),
|
||||
this, wxPD_CAN_ABORT | wxPD_AUTO_HIDE );
|
||||
|
||||
// Download libs:
|
||||
for( unsigned ii = 0; ii < aUrlList.GetCount(); ii++ )
|
||||
|
@ -789,9 +791,9 @@ void WIZARD_FPLIB_TABLE::setupReview()
|
|||
int libTotalCount = m_libraries.size();
|
||||
int libCount = 0;
|
||||
bool validate = true;
|
||||
// for OSX do not enable wPD_APP_MODAL, keep wxPD_AUTO_HIDE
|
||||
wxProgressDialog progressDlg( _( "Please wait..." ), _( "Validating libraries" ),
|
||||
libTotalCount, this,
|
||||
wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE );
|
||||
libTotalCount, this, wxPD_CAN_ABORT | wxPD_AUTO_HIDE );
|
||||
|
||||
m_dvLibName->SetWidth( 280 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue