issue #0003174: Import of simple shapes no longer works

This commit is contained in:
wmayer
2017-12-06 17:54:10 +01:00
parent dee8769d0e
commit d15e5fc7ca
3 changed files with 12 additions and 13 deletions

View File

@@ -343,10 +343,10 @@ private:
Handle(XCAFApp_Application) hApp = XCAFApp_Application::GetApplication();
Handle(TDocStd_Document) hDoc;
bool optionReadShapeCompoundMode_status;
bool optionReadShapeCompoundMode = true;
hApp->NewDocument(TCollection_ExtendedString("MDTV-CAF"), hDoc);
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Import/hSTEP");
optionReadShapeCompoundMode_status = hGrp->GetBool("ReadShapeCompoundMode",false);
optionReadShapeCompoundMode = hGrp->GetBool("ReadShapeCompoundMode", optionReadShapeCompoundMode);
if (file.hasExtension("stp") || file.hasExtension("step")) {
try {
@@ -419,7 +419,7 @@ private:
// way. This is drastically improving STEP rendering time on complex STEP files.
pcDoc->recompute();
if (file.hasExtension("stp") || file.hasExtension("step"))
ocaf.setMerge(optionReadShapeCompoundMode_status);
ocaf.setMerge(optionReadShapeCompoundMode);
ocaf.loadShapes();
pcDoc->purgeTouched();
pcDoc->recompute();