SelectFootprintFromLibTree(): fix a issue similar to commit 27d47743
.
Force immediate deletion of the APP_PROGRESS_DIALOG (do not use Destroy() ) because on Windows, APP_PROGRESS_DIALOG has some side effects on the event loop manager. A side effect is the call of ShowModal() or ShowQuasiModal of a dialog following the use of a APP_PROGRESS_DIALOG (if not deleted) has a broken behavior (incorrect modal/quasi modal behavior).
This commit is contained in:
parent
27d47743cd
commit
93e186f53e
|
@ -85,7 +85,7 @@ void SYMBOL_TREE_MODEL_ADAPTER::AddLibraries( const std::vector<wxString>& aNick
|
||||||
|
|
||||||
if( prg )
|
if( prg )
|
||||||
{
|
{
|
||||||
// Force immediate deletion of the SYMBOL_TREE_MODEL_ADAPTER (do not use Destroy() )
|
// Force immediate deletion of the WX_PROGRESS_REPORTER (do not use Destroy() )
|
||||||
// because on Windows, APP_PROGRESS_DIALOG has some side effects on the event loop
|
// because on Windows, APP_PROGRESS_DIALOG has some side effects on the event loop
|
||||||
// manager. A side effect is the call of ShowModal() of a dialog following
|
// manager. A side effect is the call of ShowModal() of a dialog following
|
||||||
// the use of SYMBOL_TREE_MODEL_ADAPTER creating a SYMBOL_TREE_MODEL_ADAPTER
|
// the use of SYMBOL_TREE_MODEL_ADAPTER creating a SYMBOL_TREE_MODEL_ADAPTER
|
||||||
|
|
|
@ -212,7 +212,12 @@ FOOTPRINT* PCB_BASE_FRAME::SelectFootprintFromLibTree( LIB_ID aPreselect )
|
||||||
_( "Loading Footprint Libraries" ), 3 );
|
_( "Loading Footprint Libraries" ), 3 );
|
||||||
GFootprintList.ReadFootprintFiles( fpTable, nullptr, progressReporter );
|
GFootprintList.ReadFootprintFiles( fpTable, nullptr, progressReporter );
|
||||||
bool cancel = progressReporter->WasCancelled();
|
bool cancel = progressReporter->WasCancelled();
|
||||||
progressReporter->Destroy();
|
// Force immediate deletion of the WX_PROGRESS_REPORTER (do not use Destroy() )
|
||||||
|
// because on Windows, APP_PROGRESS_DIALOG has some side effects on the event loop
|
||||||
|
// manager. A side effect is the call of ShowModal() of a dialog following
|
||||||
|
// the use of SYMBOL_TREE_MODEL_ADAPTER creating a SYMBOL_TREE_MODEL_ADAPTER
|
||||||
|
// has a broken behavior (incorrect modal or quasi modal behavior).
|
||||||
|
delete progressReporter;
|
||||||
|
|
||||||
if( cancel )
|
if( cancel )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Reference in New Issue