-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
DocumentPtr aDoc = aObj->document();
SessionPtr aMgr = ModelAPI_Session::get();
- ModuleBase_ModelWidget* aWidget = anOperation->propertyPanel()->activeWidget();
- if (aWidget && aWidget->canUseExternalParts())
- aValid = Standard_True;
- else
- aValid = (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument());
+ if (anOperation->propertyPanel()) {
+ ModuleBase_ModelWidget* aWidget = anOperation->propertyPanel()->activeWidget();
+ if (aWidget && aWidget->canUseExternalParts())
+ return Standard_True;
+ }
+ return (aDoc == aMgr->activeDocument() || aDoc == aMgr->moduleDocument());
}
else {
// This object is not controlled by the filter
case Prs3d_DP_ZAxis:
aDir = anAxis.Direction();
break;
+ default: // [to avoid compilation warning]
+ break;
}
gp_Lin aLine(aTrihedron->Component()->Location(), aDir);
return aPlane.Contains(aLine, Precision::Confusion(), Precision::Angular());