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 ) )
|
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
|
// Display a progress bar to show the download state
|
||||||
// The title is updated for each downloaded library.
|
// The title is updated for each downloaded library.
|
||||||
// the state will be updated by downloadOneLib() for each file.
|
// 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,
|
wxProgressDialog pdlg( _( "Downloading 3D libraries" ), wxEmptyString,
|
||||||
aUrlList.GetCount(), this,
|
aUrlList.GetCount(), this,
|
||||||
wxPD_CAN_ABORT | wxPD_APP_MODAL | wxPD_AUTO_HIDE );
|
wxPD_CAN_ABORT | wxPD_AUTO_HIDE );
|
||||||
|
|
||||||
// Built the full server name string:
|
// Built the full server name string:
|
||||||
wxURI repo( GetGithubURL() );
|
wxURI repo( GetGithubURL() );
|
||||||
|
@ -404,7 +405,7 @@ bool WIZARD_3DSHAPE_LIBS_DOWNLOADER::downloadGithubLibsFromList( wxArrayString&
|
||||||
|
|
||||||
|
|
||||||
bool WIZARD_3DSHAPE_LIBS_DOWNLOADER::downloadOneLib( const wxString& aLibURL,
|
bool WIZARD_3DSHAPE_LIBS_DOWNLOADER::downloadOneLib( const wxString& aLibURL,
|
||||||
const wxString& aLocalLibName, wxProgressDialog * aIndicator,
|
const wxString& aLocalLibName, wxProgressDialog* aIndicator,
|
||||||
wxString* aErrorMessage )
|
wxString* aErrorMessage )
|
||||||
{
|
{
|
||||||
wxArrayString fileslist;
|
wxArrayString fileslist;
|
||||||
|
|
|
@ -606,7 +606,9 @@ bool WIZARD_FPLIB_TABLE::downloadGithubLibsFromList( wxArrayString& aUrlList,
|
||||||
wxString* aErrorMessage )
|
wxString* aErrorMessage )
|
||||||
{
|
{
|
||||||
// Display a progress bar to show the downlaod state
|
// 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:
|
// Download libs:
|
||||||
for( unsigned ii = 0; ii < aUrlList.GetCount(); ii++ )
|
for( unsigned ii = 0; ii < aUrlList.GetCount(); ii++ )
|
||||||
|
@ -789,9 +791,9 @@ void WIZARD_FPLIB_TABLE::setupReview()
|
||||||
int libTotalCount = m_libraries.size();
|
int libTotalCount = m_libraries.size();
|
||||||
int libCount = 0;
|
int libCount = 0;
|
||||||
bool validate = true;
|
bool validate = true;
|
||||||
|
// for OSX do not enable wPD_APP_MODAL, keep wxPD_AUTO_HIDE
|
||||||
wxProgressDialog progressDlg( _( "Please wait..." ), _( "Validating libraries" ),
|
wxProgressDialog progressDlg( _( "Please wait..." ), _( "Validating libraries" ),
|
||||||
libTotalCount, this,
|
libTotalCount, this, wxPD_CAN_ABORT | wxPD_AUTO_HIDE );
|
||||||
wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE );
|
|
||||||
|
|
||||||
m_dvLibName->SetWidth( 280 );
|
m_dvLibName->SetWidth( 280 );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue