]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Suppression of warnings, application launching problems in different cases (on Window... V9_9_0a2
authormpv <mpv@opencascade.com>
Wed, 30 Mar 2022 11:45:44 +0000 (14:45 +0300)
committermpv <mpv@opencascade.com>
Wed, 30 Mar 2022 11:46:11 +0000 (14:46 +0300)
37 files changed:
src/CollectionPlugin/CollectionPlugin_GroupShape.cpp
src/ExchangePlugin/ExchangePlugin_Import.h
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/FeaturesPlugin/FeaturesPlugin_NormalToFace.cpp
src/FeaturesPlugin/doc/translationFeature.rst
src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.cpp
src/GeomAlgoAPI/GeomAlgoAPI_STEPImportXCAF.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Tools.cpp
src/Model/Model_AttributeImage.cpp
src/ModelAPI/ModelAPI_Tools.h
src/ModuleBase/ModuleBase_Preferences.cpp
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/ModuleBase/ModuleBase_Tools.cpp
src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp
src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp
src/PartSet/PartSet_CenterPrs.cpp
src/PartSet/PartSet_ExternalPointsMgr.cpp
src/PartSet/PartSet_FieldStepPrs.cpp
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_ResultSketchPrs.cpp
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PrimitivesPlugin/PrimitivesPlugin_Tube.cpp
src/SketcherPrs/SketcherPrs_Coincident.cpp
src/SketcherPrs/SketcherPrs_Collinear.cpp
src/SketcherPrs/SketcherPrs_HVDirection.cpp
src/SketcherPrs/SketcherPrs_Middle.cpp
src/SketcherPrs/SketcherPrs_Mirror.cpp
src/SketcherPrs/SketcherPrs_Parallel.cpp
src/XGUI/XGUI_ActionsMgr.cpp
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_FacesPanel.cpp
src/XGUI/XGUI_Selection.cpp
src/XGUI/XGUI_SelectionMgr.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_WorkshopListener.cpp

index 0373800412e526e4ca0669717fa4ca4bda02d367..6069ee18a58675e07f7237e8044263afb2eb2a5c 100644 (file)
@@ -35,9 +35,8 @@ void CollectionPlugin_GroupShape::execute()
     /// unique shape, remove compound on type
 
     TopoDS_Iterator anIt(aShape);
-    TopoDS_Shape aShape = anIt.Value();
     std::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
-    aRes->setImpl(new TopoDS_Shape(aShape));
+    aRes->setImpl(new TopoDS_Shape(anIt.Value()));
     aGroup->store(GeomShapePtr());
     aGroup->store(aRes);
     aCompound = aGroup->shape();
index c9f98594d42aa996f95c54cd64e161fbca019650..dcf9e5135b2372a8a32186f3662784badeb5240d 100644 (file)
@@ -85,7 +85,7 @@ class ExchangePlugin_ImportBase : public ModelAPI_Feature
                                          AttributeIntegerPtr& aTargetAttr);
 };
 
-EXCHANGEPLUGIN_EXPORT class ExchangePlugin_Import : public ExchangePlugin_ImportBase
+class ExchangePlugin_Import : public ExchangePlugin_ImportBase
 {
  public:
   /// Feature kind
@@ -158,7 +158,7 @@ EXCHANGEPLUGIN_EXPORT class ExchangePlugin_Import : public ExchangePlugin_Import
 
 };
 
-EXCHANGEPLUGIN_EXPORT class ExchangePlugin_Import_Image : public ExchangePlugin_ImportBase
+class ExchangePlugin_Import_Image : public ExchangePlugin_ImportBase
 {
  public:
   /// Feature kind
index e077e4ca78a81465938ea4da770a33147170b212..a13a1a44558bbe9b3107150dc18a39d26563a731 100644 (file)
@@ -341,10 +341,10 @@ void ExchangePlugin_ImportFeature::setMaterielGroup(
         if (aRes->get() && ((*aRes)->data()->name() == (*aResMat)))
         {
           if (aShape->isCompound() || aShape->isCompSolid()) {
-            GeomAPI_ShapeIterator anIt(aShape);
-            for (; anIt.more(); anIt.next()) {
-              aSelectionList->setSelectionType(anIt.current()->shapeTypeStr());
-              aSelectionList->append(theResultBody,anIt.current());
+            GeomAPI_ShapeIterator aShapeIt(aShape);
+            for (; aShapeIt.more(); aShapeIt.next()) {
+              aSelectionList->setSelectionType(aShapeIt.current()->shapeTypeStr());
+              aSelectionList->append(theResultBody, aShapeIt.current());
             }
           } else {
             aSelectionList->setSelectionType(aShape->shapeTypeStr());
index 86270765535c2233e5bab64ba134dad5734f1e00..1930054e0da2e804da6e5ed935911bd5236886a0 100644 (file)
@@ -55,7 +55,7 @@ void FeaturesPlugin_NormalToFace::initAttributes()
 }
 
 //=================================================================================================
-void FeaturesPlugin_NormalToFace::attributeChanged(const std::string& theID)
+void FeaturesPlugin_NormalToFace::attributeChanged(const std::string& /*theID*/)
 {
 }
 
index 81dc77ab09eb4c8017b8f4d30d1fade2b21f4827..e36901d2e5aee9b4794222d68a4dc43b0e59d496 100644 (file)
@@ -146,9 +146,10 @@ The result of operation is a shifted initial shape.
 
   .. _transformation_subshapes:
 
-Transformation of COMPSOLID subshapes is prohibited. Read more about transformation of COMPOUND subshapes.
-======================
+Transformation of COMPSOLID subshapes is prohibited.
+===========
 
-If you select one or more subshapes of COMPOUND as transformation **Main objects**, all other subshapes will be also included in result at their original locations.
+If you select one or more subshapes of COMPOUND as transformation (translation or other operation that changes the shape position or orientation) **Main objects**,
+all other subshapes will be also included in result at their original locations.
 
 Transformation of COMPSOLID subshapes is prohibited, because we cannot guarantee the result still be a COMPSOLID after moving/duplicating some parts of it.
index 99c3dc372ab10b8c6c381ec40569a0af2c4c3fc8..7a0c0df943116cbadccc7a57f954be3573cd23c6 100644 (file)
@@ -95,7 +95,7 @@ bool readUnits(STEPControl_Reader& aReader,
   else {
     //cout<<"need re-scale a model"<<endl;
     // set UnitFlag to 'meter'
-    Interface_Static::SetCVal("xstep.cascade.unit","M");
+    Interface_Static::SetCVal("xstep.cascade.unit", "M");
   }
   return true;
 }
@@ -103,7 +103,7 @@ bool readUnits(STEPControl_Reader& aReader,
 
 //==================================================================================================
 std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
-                                          const std::string& theFormatName,
+                                          const std::string& /*theFormatName*/,
                                           const bool theScalInterUnits,
                                           std::string& theError)
 {
@@ -116,7 +116,7 @@ std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
   STEPControl_Reader aReader;
 
   //VSR: 16/09/09: Convert to METERS
-  Interface_Static::SetCVal("xstep.cascade.unit","M");
+  Interface_Static::SetCVal("xstep.cascade.unit", "M");
   Interface_Static::SetIVal("read.step.ideas", 1);
   Interface_Static::SetIVal("read.step.nonmanifold", 1);
 
@@ -131,7 +131,7 @@ std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
 
     if (status == IFSelect_RetDone) {
       // Regard or not the model units
-      if( !readUnits(aReader,theScalInterUnits,theError)) {
+      if( !readUnits(aReader, theScalInterUnits, theError)) {
         std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
         aGeomShape->setImpl(new TopoDS_Shape());
         return aGeomShape;
@@ -188,7 +188,7 @@ std::shared_ptr<GeomAPI_Shape> STEPImport(const std::string& theFileName,
         aResShape = compound;
 
       // Check if any BRep entity has been read, there must be at least a vertex
-      if ( !TopExp_Explorer( aResShape, TopAbs_VERTEX ).More() )
+      if (!TopExp_Explorer(aResShape, TopAbs_VERTEX).More())
       {
         theError = "No geometrical data in the imported file.";
         std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
@@ -215,7 +215,7 @@ GeomShapePtr STEPImportAttributs(const std::string& theFileName,
                                  std::shared_ptr<ModelAPI_ResultBody> theResultBody,
                                  const bool theScalInterUnits,
                                  const bool theMaterials,
-                                 const bool theColor,
+                                 const bool /*theColor*/,
                                  std::map< std::wstring,
                                  std::list<std::wstring>>& theMaterialShape,
                                  std::string& theError)
@@ -225,7 +225,7 @@ GeomShapePtr STEPImportAttributs(const std::string& theFileName,
     STEPControl_Reader aReader;
     std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
 
-    Interface_Static::SetCVal("xstep.cascade.unit","M");
+    Interface_Static::SetCVal("xstep.cascade.unit", "M");
     Interface_Static::SetIVal("read.step.ideas", 1);
     Interface_Static::SetIVal("read.step.nonmanifold", 1);
 
@@ -236,7 +236,7 @@ GeomShapePtr STEPImportAttributs(const std::string& theFileName,
 
       if (status == IFSelect_RetDone) {
         // Regard or not the model units
-        if( !readUnits(aReader,theScalInterUnits,theError)) {
+        if( !readUnits(aReader, theScalInterUnits, theError)) {
           aGeomShape->setImpl(new TopoDS_Shape());
           return aGeomShape;
         }
@@ -254,7 +254,6 @@ GeomShapePtr STEPImportAttributs(const std::string& theFileName,
 
     if (aCafreader.ReadFile(theFileName.c_str()) != IFSelect_RetDone) {
       theError = "Wrong format of the imported file. Can't import file.";
-      std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
       aGeomShape->setImpl(new TopoDS_Shape());
       return aGeomShape;
     }
@@ -264,8 +263,8 @@ GeomShapePtr STEPImportAttributs(const std::string& theFileName,
                           theMaterials,
                           theMaterialShape,
                           theError);
-  } catch (OSD_Exception& e) {
+  } catch (OSD_Exception&) {
     //Try to load STEP file without colors...
-    return STEPImport(theFileName,"",theScalInterUnits,theError);
+    return STEPImport(theFileName, "", theScalInterUnits, theError);
   }
 }
index 9aeaf48a35e60dc9e988bf81d9bee863fdfd300a..d9926abae676ce169045deb4160a926756524c79 100644 (file)
@@ -120,7 +120,7 @@ std::shared_ptr<GeomAPI_Shape> readAttributes(STEPCAFControl_Reader &theReader,
 
 //=============================================================================
 std::shared_ptr<GeomAPI_Shape> setgeom(const Handle(XCAFDoc_ShapeTool) &theShapeTool,
-                                       const TDF_Label &theLabel,
+                                       const TDF_Label& /*theLabel*/,
                                        std::string& theError)
 {
   BRep_Builder aB;
@@ -164,7 +164,6 @@ std::shared_ptr<GeomAPI_Shape> setgeom(const Handle(XCAFDoc_ShapeTool) &theShape
     // Check if any BRep entity has been read, there must be at least a vertex
     if (!TopExp_Explorer( aShape, TopAbs_VERTEX ).More()) {
       theError = "No geometrical data in the imported file.";
-      std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
       aGeomShape->setImpl(new TopoDS_Shape());
       return aGeomShape;
     }
@@ -302,7 +301,7 @@ void storeMaterial( std::shared_ptr<ModelAPI_ResultBody>    theResultBody,
                     const Handle(Standard_Transient)        &theEnti,
                     const TopTools_IndexedMapOfShape        &theIndices,
                     const Handle(Transfer_TransientProcess) &theTP,
-                    const TDF_Label                         &theShapeLabel,
+                    const TDF_Label                         &/*theShapeLabel*/,
                     std::map< std::wstring, std::list<std::wstring>> &theMaterialShape )
 {
   // Treat Product Definition Shape only.
index a26b7257e92247735e7670f0e277fb5195d0dabd..3f466b59b42e01ec3a82256ac790f2e2ce67f516 100644 (file)
@@ -65,7 +65,7 @@ std::string File_Tools::path(const std::string& theFileName)
 {
   OSD_Path aPath (theFileName.c_str());
   Standard_Integer aTrekLen =
-    theFileName.size() - aPath.Extension().Length() - aPath.Name().Length();
+    int(theFileName.size()) - aPath.Extension().Length() - aPath.Name().Length();
   return theFileName.substr(0, aTrekLen);
 }
 
index c74e429452249953579def305eeecf893f8a3cb0..36362a2dca377d9b9dde27075fad5e59419b8ce0 100644 (file)
@@ -41,7 +41,7 @@ void Model_AttributeImage::setTexture(const int theWidth,
   if (theWidth > 0 && theHeight > 0 && theByteArray.size() > 0) { // set new data
     // Find or create attributes
     Handle_TDataStd_ByteArray aByteArray =
-      TDataStd_ByteArray::Set(myLab, 0, theByteArray.size() - 1);
+      TDataStd_ByteArray::Set(myLab, 0, int(theByteArray.size()) - 1);
     Handle_TDataStd_IntegerArray aDimensions =
       TDataStd_IntegerArray::Set(myLab, 0, 1);
     Handle_TDataStd_Comment aFormat = TDataStd_Comment::Set(myLab, theFormat.c_str());
@@ -52,7 +52,7 @@ void Model_AttributeImage::setTexture(const int theWidth,
 
     // Texture
     Handle(TColStd_HArray1OfByte) aNewArray =
-      new TColStd_HArray1OfByte(0, theByteArray.size() - 1);
+      new TColStd_HArray1OfByte(0, int(theByteArray.size()) - 1);
     std::list<unsigned char>::const_iterator itBA = theByteArray.begin();
     for (int j = 0; itBA != theByteArray.end(); ++itBA, ++j) {
       aNewArray->SetValue(j, (Standard_Byte)(*itBA));
index 904b82132671fdd1dc329b2ed8d697ff6fcf7f40..c3d7b9901f52b22484b71f5adf68eaef30f0a582 100644 (file)
@@ -51,7 +51,7 @@ MODELAPI_EXPORT std::shared_ptr<GeomAPI_Shape> shape(
  */
 MODELAPI_EXPORT std::string getFeatureError(const std::shared_ptr<ModelAPI_Feature>& theFeature);
 
-MODELAPI_EXPORT struct ResultBaseAlgo {
+struct ResultBaseAlgo {
   std::shared_ptr<ModelAPI_ResultBody> resultBody;
   std::shared_ptr<GeomAPI_Shape> baseShape;
   std::shared_ptr<GeomAlgoAPI_MakeShape> makeShape;
index d8d1c417a238bac26a17596c3a36de34feaedb43..5be9881345e373d6b7169f485ae20e421215b0a0 100644 (file)
 #include <QDialogButtonBox>
 #include <QPushButton>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 const QString ModuleBase_Preferences::VIEWER_SECTION = "Viewer";
 const QString ModuleBase_Preferences::MENU_SECTION = "Menu";
 const QString ModuleBase_Preferences::GENERAL_SECTION = "General";
index 54107b53fe644ef011be1331f63812f159f09079..9047d3a3931c1d86cf0ac2fcb36b3ce2556520c6 100644 (file)
@@ -444,7 +444,7 @@ bool ModuleBase_ResultPrs::appendVertexSelection(const Handle(SelectMgr_Selectio
     /// visualizes it in Ring style) OCCT version is 7.0.0 with path for SHAPER module.
     Handle(StdSelect_BRepOwner) aOwner = new StdSelect_BRepOwner(aShape, aPriority, Standard_True);
     StdSelect_BRepSelectionTool::ComputeSensitive(aShape, aOwner, aSelection,
-                                                  aDeflection, myDrawer->HLRAngle(), 9, 500);
+                                                  aDeflection, myDrawer->DeviationAngle(), 9, 500);
 
 
     NCollection_Vector<Handle(SelectMgr_SensitiveEntity)> anEntities = aSelection->Entities();
index f1cf9f0d12733065ee1865167bf0565d514319ce..c4ae53fe11acc25e619a7506771e4ec8f709bb21 100644 (file)
 #include <ModelAPI_Folder.h>
 
 #include <ModelGeomAlgo_Point2D.h>
+#include <SUIT_ResourceMgr.h>
 
 #ifdef HAVE_SALOME
 #include <SUIT_Application.h>
-#include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 #endif
 
index e027461f6034178b999cd2c36bfdc2631665a820..83c800cf585206bd60a180eb6b6d1d01506439ab 100644 (file)
 #include <QCheckBox>
 #include <QDir>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 FeaturePtr ModuleBase_WidgetSelectionFilter::SelectorFeature;
 std::string ModuleBase_WidgetSelectionFilter::AttributeId;
 
index 6cad0001346eed4bf21036eaf307754850b8a097..514726b11cb5257c75e4f749f3ea597d20f3d8ff 100644 (file)
 #include <QShortcut>
 #include <QFileDialog>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 enum ColumnType {
   Col_Name,
   Col_Equation,
index 1d791dcf295f875e191e167efbe26f60eac84626..d323e7cf8e256fb7dbaec8bd7b0528ed7ccdade1 100644 (file)
@@ -27,7 +27,6 @@
 #include <Geom_CartesianPoint.hxx>
 #include <Prs3d_PointAspect.hxx>
 #include <Graphic3d_AspectMarker3d.hxx>
-#include <Prs3d_Root.hxx>
 #include <Graphic3d_ArrayOfPoints.hxx>
 #include <AIS_InteractiveContext.hxx>
 
@@ -59,7 +58,7 @@ void PartSet_CenterPrs::drawPoint(const Handle(Prs3d_Presentation)& thePrs,
   PtA->SetColor(theColor);
 
   Handle(Geom_Point) aPnt = Component();
-  Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(thePrs);
+  Handle(Graphic3d_Group) TheGroup = thePrs->CurrentGroup();
   TheGroup->SetPrimitivesAspect(PtA);
 
   Handle(Graphic3d_ArrayOfPoints) aPoint = new Graphic3d_ArrayOfPoints (1);
index b28d5dd46277c478c7a054ea25d84d9545614e03..0c16d6e8b7a63f74756738d69faacdc28dcd2304 100644 (file)
 #include <XGUI_SelectionActivate.h>
 #include <XGUI_SelectionMgr.h>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 PartSet_ExternalPointsMgr::PartSet_ExternalPointsMgr(ModuleBase_IWorkshop* theWorkshop,
                                                      const CompositeFeaturePtr& theSketch)
   : QObject(theWorkshop), myWorkshop(theWorkshop), mySketch(theSketch)
index c09da9f9113f0184d23519f3373c5aa1c857b106..ae396483b8f5531e5b4b3cd53f3b0593f5bb3516 100644 (file)
@@ -37,7 +37,6 @@
 #include <TopoDS.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <TopExp_Explorer.hxx>
-#include <Prs3d_Root.hxx>
 #include <Graphic3d_Text.hxx>
 
 
@@ -217,7 +216,7 @@ void PartSet_FieldStepPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t
     QStringList aValues = strings();
     AttributeSelectionListPtr aSelList =
       aData->selectionList(CollectionPlugin_Field::SELECTED_ID());
-    Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
+    Handle(Graphic3d_Group) aGroup = thePrs->NewGroup();
     for (int i = 0; i < aSelList->size(); i++) {
       AttributeSelectionPtr aSelection = aSelList->value(i);
       GeomShapePtr aShapePtr = aSelection->value();
index f3e8ad1a568369c21bcc6d2a90331223fa328225..683173100f44c4d60ed3bb2501798604bda6365d 100644 (file)
@@ -1144,10 +1144,9 @@ void PartSet_Module::onViewTransformed(int theTrsfType)
   Handle(V3d_Viewer) aV3dViewer = aContext->CurrentViewer();
   Handle(V3d_View) aView;
   double aScale = 0;
-  for (aV3dViewer->InitDefinedViews();
-       aV3dViewer->MoreDefinedViews();
-       aV3dViewer->NextDefinedViews()) {
-    Handle(V3d_View) aV = aV3dViewer->DefinedView();
+  V3d_ListOfView::Iterator aDefinedViews(aV3dViewer->DefinedViews());
+  for (; aDefinedViews.More(); aDefinedViews.Next()) {
+    Handle(V3d_View) aV = aDefinedViews.Value();
     double aS = aV->Scale();
     if (aS > aScale) {
       aScale = aS;
@@ -1810,11 +1809,11 @@ void PartSet_Module::onTreeViewDoubleClick(const QModelIndex& theIndex)
     {
       if (!aPart.get() && aObj->groupName() == ModelAPI_ResultParameter::group())
       {
-        QObjectPtrList aObjects = aWorkshop->objectBrowser()->selectedObjects();
+        QObjectPtrList aSelectedObjects = aWorkshop->objectBrowser()->selectedObjects();
         FeaturePtr aFeature;
         ResultParameterPtr aParam;
-        foreach(ObjectPtr aObj, aObjects) {
-          aParam = std::dynamic_pointer_cast<ModelAPI_ResultParameter>(aObj);
+        foreach(ObjectPtr aSelected, aSelectedObjects) {
+          aParam = std::dynamic_pointer_cast<ModelAPI_ResultParameter>(aSelected);
           if (aParam.get())
             break;
         }
index 497f5a0b2cc845d09310b4d392b1064edf30486d..d44711dd95f5ccdd70dea3a392458358be4d6cd0 100644 (file)
@@ -232,7 +232,7 @@ void PartSet_ResultSketchPrs::appendShapeSelection(const Handle(SelectMgr_Select
                                       theShape,
                                       theTypeOfSelection,
                                       aDeflection,
-                                      myDrawer->HLRAngle(),
+                                      myDrawer->DeviationAngle(),
                                       myDrawer->IsAutoTriangulation());
   } catch ( Standard_Failure ) {
   }
index 14bfd60fa9aae8c043d831a3567219d51f086184..7db82ccdbe8865a2549bdf96dbec2cc421bf6792 100644 (file)
 #include <QMessageBox>
 #include <QMainWindow>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 #define DEBUG_UNDO_INVALID_SKETCH
 
 
index 4b0581d6fd38ebe275bd038ba4780927cb601c24..de6dce00b14a10d932ec96b24d25f0cbbfb23ec0 100644 (file)
 #include <QDialog>
 #include <QTimer>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 #ifndef DBL_MAX
 #define DBL_MAX 1.7976931348623158e+308
 #endif
index d9a90d9ff403bfd8d60030b9cf1cea13b500ce93..2891effa9226e0994184e4a2bd604a6168046395 100644 (file)
@@ -66,7 +66,6 @@ void PrimitivesPlugin_Tube::loadNamingDS(std::shared_ptr<GeomAlgoAPI_Tube> theTu
   theTubeAlgo->prepareNamingFaces();
 
   // Insert to faces
-  int num = 1;
   std::map< std::string, std::shared_ptr<GeomAPI_Shape> > listOfFaces =
     theTubeAlgo->getCreatedFaces();
   for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator it = listOfFaces.begin();
index 364d6aac6105151ce54e2b12fa5f834d17515c45..9f3fa216e4c3231adb44c572cfd8791e5c08b864 100644 (file)
@@ -38,7 +38,6 @@
 #include <Graphic3d_AspectMarker3d.hxx>
 #include <Graphic3d_ArrayOfPoints.hxx>
 #include <Prs3d_PointAspect.hxx>
-#include <Prs3d_Root.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_Selection.hxx>
 #include <Select3D_SensitivePoint.hxx>
@@ -153,7 +152,7 @@ void SketcherPrs_Coincident::Compute(
   aPtA->SetScale(2. * aRatio);
   aPtA->SetColor(aExternalColor);
 
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
+  Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
   aGroup->SetPrimitivesAspect(aPtA);
   Handle(Graphic3d_ArrayOfPoints) aPntArray = new Graphic3d_ArrayOfPoints(1);
   aPntArray->AddVertex (myPoint.X(), myPoint.Y(), myPoint.Z());
index 3b2fb1ad2387e8c50f4dd0f2740ab6f84bbb3afc..1e44309fe2e8038fa8aefb2db8bd33e562a3756a 100644 (file)
@@ -24,7 +24,6 @@
 #include <SketchPlugin_Constraint.h>
 
 #include <Graphic3d_AspectLine3d.hxx>
-#include <Prs3d_Root.hxx>
 
 
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Collinear, SketcherPrs_SymbolPrs);
@@ -76,7 +75,7 @@ bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep, bool withColo
 void SketcherPrs_Collinear::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                       Quantity_Color theColor) const
 {
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePrs);
+  Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
 
   Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
index d4a29174ec5b561d5f299490e72674884b75d3b1..9ce852ac560978410426ce102f6dbe9674b5cd8e 100644 (file)
@@ -24,7 +24,6 @@
 #include <SketchPlugin_Constraint.h>
 
 #include <Graphic3d_AspectLine3d.hxx>
-#include <Prs3d_Root.hxx>
 
 
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_HVDirection, SketcherPrs_SymbolPrs);
@@ -67,7 +66,7 @@ bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep, bool withCo
 void SketcherPrs_HVDirection::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                         Quantity_Color theColor) const
 {
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePrs);
+  Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
 
   // Draw constrained object
   Handle(Graphic3d_AspectLine3d) aLineAspect =
index bb96cd07a38fdbf581d664dc97971690909b2461..4e9025ca01281718aecf1a89f99199fe0abd3138 100644 (file)
@@ -24,7 +24,6 @@
 #include <SketchPlugin_Constraint.h>
 
 #include <Graphic3d_AspectLine3d.hxx>
-#include <Prs3d_Root.hxx>
 
 
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Middle, SketcherPrs_SymbolPrs);
@@ -93,7 +92,7 @@ bool SketcherPrs_Middle::updateIfReadyToDisplay(double theStep, bool withColor)
 void SketcherPrs_Middle::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                    Quantity_Color theColor) const
 {
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePrs);
+  Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
 
   Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
index 97b4a404719203b4f9dc0b1346f64d7560b36b0e..d051f9d47a0e8d4f5e27740174c5ee99a0640557 100644 (file)
 #include <SketchPlugin_Constraint.h>
 
 #include <Graphic3d_AspectLine3d.hxx>
-#include <Prs3d_Root.hxx>
 #include <Prs3d_LineAspect.hxx>
 
 
-
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Mirror, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
@@ -134,7 +132,7 @@ void SketcherPrs_Mirror::drawLines(const Handle(Prs3d_Presentation)& thePrs,
   if (aNb != anAttrC->size())
     return;
 
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePrs);
+  Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
 
   // drawListOfShapes uses myDrawer for attributes definition
   Handle(Prs3d_LineAspect) aLnAspect = new Prs3d_LineAspect(theColor, Aspect_TOL_SOLID, 1);
index e3b8bc367818e7971d482bf98701aa737f6996c7..2b6a14be56a43d3dd8105e4ef7436c467493418f 100644 (file)
@@ -24,8 +24,6 @@
 #include <SketchPlugin_Constraint.h>
 
 #include <Graphic3d_AspectLine3d.hxx>
-#include <Prs3d_Root.hxx>
-
 
 
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Parallel, SketcherPrs_SymbolPrs);
@@ -78,7 +76,7 @@ bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep, bool withColor
 void SketcherPrs_Parallel::drawLines(const Handle(Prs3d_Presentation)& thePrs,
   Quantity_Color theColor) const
 {
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePrs);
+  Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
 
   Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
index 971ae10979f384f30f899020bf72234e3ba6d345..05eca8c0cc5873f5dc2e439e79653cdcfb637afb 100644 (file)
 #include <ModuleBase_SelectionValidator.h>
 #include <ModuleBase_Tools.h>
 
-
 #include <QAction>
 #include <QMainWindow>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 #ifdef _DEBUG
 #include <iostream>
 #include <QDebug>
index 10a1f7f36997aa21374f8a617101de073441b7d9..99e9bc0fb6dba8d4038cf08a26e957e28e38482a 100644 (file)
 #include <QMainWindow>
 #include <QModelIndex>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 XGUI_ContextMenuMgr::XGUI_ContextMenuMgr(XGUI_Workshop* theParent)
     : QObject(theParent),
       myWorkshop(theParent),
index c0824cf1d6b1ae0c3b15b6dabd00332f123b1c4d..cda24e471ca58416c0dd9ba5f94ef9dd9539114e 100644 (file)
@@ -1194,11 +1194,7 @@ GeomPlanePtr XGUI_Displayer::getScreenPlane() const
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (!aContext.IsNull()) {
     Handle(V3d_Viewer) aViewer = aContext->CurrentViewer();
-    Handle(V3d_View) aView;
-    for (aViewer->InitActiveViews(); aViewer->MoreActiveViews(); aViewer->NextActiveViews()) {
-      aView = aViewer->ActiveView();
-      break;
-    }
+    Handle(V3d_View) aView = aViewer->ActiveViews().First();
     if (!aView.IsNull()) {
       double aEyeX, aEyeY, aEyeZ;
       aView->Eye(aEyeX, aEyeY, aEyeZ);
@@ -1220,11 +1216,7 @@ double XGUI_Displayer::getViewScale() const
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (!aContext.IsNull()) {
     Handle(V3d_Viewer) aViewer = aContext->CurrentViewer();
-    Handle(V3d_View) aView;
-    for (aViewer->InitActiveViews(); aViewer->MoreActiveViews(); aViewer->NextActiveViews()) {
-      aView = aViewer->ActiveView();
-      break;
-    }
+    Handle(V3d_View) aView = aViewer->ActiveViews().First();
     return aView->Camera()->Scale();
   }
   return 1;
index d312092cfd8e4b0cfc6f68ae229e82b0480bf182..2f9bee2a475012724267ee7ac72d47993aeccd0b 100644 (file)
 #include <QMainWindow>
 #include <QTimer>
 
+#ifdef WIN32
+#pragma warning(disable : 4189) // for skipping MAYBE_UNUSED on Win
+#endif
+
 static const int LayoutMargin = 3;
 
 //********************************************************************
index 30d41b7b6b8a01b643769d621ab8f15ec2d72693..78e37d9595916784dd9c354cbe99ac7b4f68a183 100644 (file)
 
 #include <set>
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 #define DEBUG_DELIVERY
 
 XGUI_Selection::XGUI_Selection(XGUI_Workshop* theWorkshop)
index fa83cf2a232999761b0dd1156438593c8608ba2f..b55a16c877386b012da2abab1eb69e882b65aa26 100644 (file)
 #include <inspector/VInspectorAPI_CallBack.hxx>
 #endif
 
+#ifdef WIN32
+#pragma warning(disable : 4456) // for nested foreach
+#endif
+
 #define OPTIMIZATION_LEVEL 50
 
 
index f95053cbdbb8ae9961f31c07d4303b22433c2432..fb55eef8b1138a116f6ab256bfa5374f037767dc 100644 (file)
@@ -172,6 +172,8 @@ static Handle(VInspector_CallBack) MyVCallBack;
 
 #ifdef WIN32
 #include <windows.h>
+#pragma warning(disable : 4456) // for nested foreach
+#pragma warning(disable : 4189) // for declaration of unused variables (MAYBE_UNUSED)
 #else
 #include <dlfcn.h>
 #endif
index 370cbe793357c75ec81c2ca422f0a1191ba124e0..ff49e6bfd11d9f0fcfc8afd69ebb938d4dd71e9a 100644 (file)
 #include <ModuleBase_Tools.h>
 #include <ModuleBase_WidgetSelector.h>
 
-#ifdef HAVE_SALOME
 #include <SUIT_Application.h>
 #include <SUIT_Session.h>
-#endif
 
 #include "XGUI_ActionsMgr.h"
 #include "XGUI_Displayer.h"
 #include <iostream>
 #endif
 
+#ifdef WIN32
+#pragma warning(disable : 4189) // for declaration of unused variables (MAYBE_UNUSED)
+#endif
+
 //#define DEBUG_FEATURE_CREATED
 //#define DEBUG_FEATURE_REDISPLAY
 //#define DEBUG_FEATURE_UPDATED
@@ -397,9 +399,13 @@ void XGUI_WorkshopListener::
 void XGUI_WorkshopListener::
   onFeatureCreatedMsg(const std::shared_ptr<ModelAPI_ObjectUpdatedMessage>& theMsg)
 {
-  SUIT_Application * app = SUIT_Session::session()->activeApplication();
-
-  QVariant aVar = app->property("IsLoadedScript");
+  bool isLoadedScript = false;
+  SUIT_Session* aSession = SUIT_Session::session();
+  if (aSession)
+  {
+    QVariant aVar = aSession->activeApplication()->property("IsLoadedScript");
+    isLoadedScript = !aVar.isNull() && aVar.toBool();
+  }
 
   std::set<ObjectPtr> anObjects = theMsg->objects();
   std::set<ObjectPtr>::const_iterator aIt;
@@ -415,7 +421,7 @@ void XGUI_WorkshopListener::
 
   //bool aHasPart = false;
   bool aDisplayed = false;
-  if (aVar.isNull() || !aVar.toBool()) {
+  if (!isLoadedScript) {
     for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
       ObjectPtr anObject = *aIt;