Part/Import: [skip ci] disable use of Message_ProgressIndicator for OCC >= 7.5 due to major API changes

This commit is contained in:
wmayer
2020-10-08 14:48:35 +02:00
parent f129f3f097
commit fd9cdb9de9
9 changed files with 81 additions and 5 deletions

View File

@@ -103,10 +103,12 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name)
throw Base::FileException("Cannot open STEP file");
}
#if OCC_VERSION_HEX < 0x070500
Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
aReader.WS()->MapReader()->SetProgress(pi);
pi->NewScope(100, "Reading STEP file...");
pi->Show();
#endif
// Root transfers
Standard_Integer nbr = aReader.NbRootsForTransfer();
@@ -115,7 +117,9 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name)
Base::Console().Log("STEP: Transferring Root %d\n",n);
aReader.TransferRoot(n);
}
#if OCC_VERSION_HEX < 0x070500
pi->EndScope();
#endif
// Collecting resulting entities
Standard_Integer nbs = aReader.NbShapes();