From 1e696647e5203fc6f23c7acc9e78a720163a225e Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 6 Mar 2018 11:12:26 +0300 Subject: [PATCH] Initial (compilation) porting to SALOME 8.5.0 current on Debian 8 --- env.sh | 2 +- src/Config/Config_Prop.h | 2 +- src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp | 6 ------ src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp | 5 ++--- src/GeomAlgoAPI/GeomAlgoAPI_MakeVolume.cpp | 8 -------- src/GeomAlgoAPI/GeomAlgoAPI_Partition.cpp | 6 ------ src/GeomAlgoAPI/GeomAlgoAPI_PaveFiller.cpp | 14 -------------- src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.cpp | 5 ++--- src/GeomAlgoAPI/GeomAlgoAPI_ShapeBuilder.cpp | 4 ++-- src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp | 10 ---------- src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp | 5 ----- src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp | 12 +++++++----- src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx | 4 ---- src/Model/Model_Document.cpp | 10 ++++------ src/ModelHighAPI/ModelHighAPI_Tools.cpp | 6 ++++-- src/ModuleBase/ModuleBase_BRepOwner.h | 2 +- src/ModuleBase/ModuleBase_ResultPrs.cpp | 2 +- src/ModuleBase/ModuleBase_ResultPrs.h | 2 +- src/ModuleBase/ModuleBase_Tools.cpp | 2 ++ src/ModuleBase/ModuleBase_ViewerFilters.cpp | 14 -------------- src/PartSet/PartSet_CenterPrs.cpp | 2 +- src/PartSet/PartSet_CenterPrs.h | 2 +- src/PartSet/PartSet_WidgetFeaturePointSelector.cpp | 4 ++-- src/SketcherPrs/SketcherPrs_Coincident.cpp | 3 --- src/SketcherPrs/SketcherPrs_SymbolPrs.cpp | 4 ++-- src/SketcherPrs/SketcherPrs_SymbolPrs.h | 2 +- src/XGUI/XGUI_Workshop.cpp | 2 +- 27 files changed, 36 insertions(+), 104 deletions(-) diff --git a/env.sh b/env.sh index 05bfb1145..a1c6228ac 100644 --- a/env.sh +++ b/env.sh @@ -11,7 +11,7 @@ export AUT_DIR=$(pwd) export TOOLS_DIR=$(pwd) export HOME_OLD=$HOME -source /dn46/SALOME/series8x/current-2017-07-11/start.sh +source /dn46/SALOME/series8x/current-2018-03-02/start.sh export HOME=$HOME_OLD # Path to solvespace-2 diff --git a/src/Config/Config_Prop.h b/src/Config/Config_Prop.h index bdaecb59b..5411766e4 100644 --- a/src/Config/Config_Prop.h +++ b/src/Config/Config_Prop.h @@ -26,7 +26,7 @@ #include #include -static const char* SKETCH_TAB_NAME = "Sketch"; +static const char SKETCH_TAB_NAME[] = "Sketch"; /*! * \class Config_Prop diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp index 7ef54d5d6..2af2e8edb 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp @@ -86,14 +86,8 @@ void GeomAlgoAPI_Boolean::build(const ListOfShape& theObjects, // Building and getting result. aBuilder->Perform(); -#ifdef USE_OCCT_720 if (aBuilder->HasErrors()) return; -#else - if(aBuilder->ErrorStatus() != 0) { - return; - } -#endif TopoDS_Shape aResult = aBuilder->Shape(); if(aResult.ShapeType() == TopAbs_COMPOUND) { diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp index f9f9cdfb4..1b9637feb 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp @@ -76,9 +76,8 @@ std::shared_ptr IGESImport(const std::string& theFileName, aShape.Nullify(); } } - catch( Standard_Failure ) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - theError = aFail->GetMessageString(); + catch( Standard_Failure const& anException) { + theError = anException.GetMessageString(); aShape.Nullify(); } diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_MakeVolume.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_MakeVolume.cpp index c942dd1cb..9dad362ea 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_MakeVolume.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_MakeVolume.cpp @@ -65,21 +65,13 @@ void GeomAlgoAPI_MakeVolume::build(const ListOfShape& theFaces) // parameters of the volume maker aVolumeMaker->SetArguments(anArgs); aVolumeMaker->SetIntersect(true); // split edges and faces -#ifdef USE_OCCT_720 aVolumeMaker->SetAvoidInternalShapes(true); -#endif aVolumeMaker->SetGlue(BOPAlgo_GlueOff); // building and getting result aVolumeMaker->Perform(); -#ifdef USE_OCCT_720 if (aVolumeMaker->HasErrors()) return; -#else - if(aVolumeMaker->ErrorStatus() != 0) { - return; - } -#endif TopoDS_Shape aResult = aVolumeMaker->Shape(); if(aResult.ShapeType() == TopAbs_COMPOUND) { diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Partition.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Partition.cpp index e8199f58c..9655931d7 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Partition.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Partition.cpp @@ -150,14 +150,8 @@ void GeomAlgoAPI_Partition::build(const ListOfShape& theObjects, // Building and getting result. anOperation->Perform(); -#ifdef USE_OCCT_720 if (anOperation->HasErrors()) return; -#else - if(anOperation->ErrorStatus() != 0) { - return; - } -#endif TopoDS_Shape aResult = anOperation->Shape(); if(aResult.ShapeType() == TopAbs_COMPOUND) { diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_PaveFiller.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_PaveFiller.cpp index 95a344072..39a18c4af 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_PaveFiller.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_PaveFiller.cpp @@ -55,30 +55,16 @@ void GeomAlgoAPI_PaveFiller::build(const ListOfShape& theListOfShape, } aPaveFiller->SetArguments(aListOfShape); aPaveFiller->Perform(); -#ifdef USE_OCCT_720 if (aPaveFiller->HasErrors()) return; -#else - Standard_Integer iErr = aPaveFiller->ErrorStatus(); - if(iErr) { - return; - } -#endif BOPAlgo_Builder* aBuilder = new BOPAlgo_Builder(); this->setImpl(aBuilder); this->setBuilderType(OCCT_BOPAlgo_Builder); aBuilder->SetArguments(aListOfShape); aBuilder->PerformWithFiller(*aPaveFiller); -#ifdef USE_OCCT_720 if (aBuilder->HasErrors()) return; -#else - iErr = aBuilder->ErrorStatus(); - if(iErr) { - return; - } -#endif TopoDS_Shape aResult = aBuilder->Shape(); if(aResult.ShapeType() == TopAbs_COMPOUND) { diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.cpp index 93c3c26f6..837237a79 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_STEPImport.cpp @@ -186,9 +186,8 @@ std::shared_ptr STEPImport(const std::string& theFileName, aResShape.Nullify(); } } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - theError = aFail->GetMessageString(); + catch (Standard_Failure const& anException) { + theError = anException.GetMessageString(); aResShape.Nullify(); } // Return previous locale diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeBuilder.cpp index ce6022de4..49b66507b 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeBuilder.cpp @@ -189,8 +189,8 @@ void GeomAlgoAPI_ShapeBuilder::addInternal(const std::shared_ptr } } } - } else if(aBaseShapeType == GeomAPI_Shape::FACE) { - if(aShapeToAddType == GeomAPI_Shape::EDGE) { + } else if(aBaseShapeType == TopAbs_FACE) { + if(aShapeToAddType == TopAbs_EDGE) { aShapeToAdd.Orientation(TopAbs_INTERNAL); TopoDS_Wire aWire; aBuilder.MakeWire(aWire); diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp index 5dc12d2ed..d03f8e05c 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp @@ -846,13 +846,8 @@ void GeomAlgoAPI_ShapeTools::splitShape(const std::shared_ptr& th } aBOP.Perform(); -#ifdef USE_OCCT_720 if (aBOP.HasErrors()) return; -#else - if (aBOP.ErrorStatus()) - return; -#endif // Collect splits const TopTools_ListOfShape& aSplits = aBOP.Modified(aBaseEdge); @@ -896,13 +891,8 @@ void GeomAlgoAPI_ShapeTools::splitShape_p(const std::shared_ptr& } aBOP.Perform(); -#ifdef USE_OCCT_720 if (aBOP.HasErrors()) return; -#else - if (aBOP.ErrorStatus()) - return; -#endif // Collect splits const TopTools_ListOfShape& aSplits = aBOP.Modified(aBaseEdge); diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index a6da1e785..bf58316e8 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -219,13 +219,8 @@ void GeomAlgoAPI_SketchBuilder::createFaces( aBB.AddArgument(anEdge); } aBB.Perform(); -#ifdef USE_OCCT_720 if (aBB.HasErrors()) return; -#else - if (aBB.ErrorStatus()) - return; -#endif // Collect faces TopTools_ListOfShape anAreas = aBB.Modified(aPlnFace); sortFaces(anAreas, theFeatures); // sort faces by the edges in them diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp index 8e8238aaf..356c15be1 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_UnifySameDomain.cpp @@ -96,11 +96,13 @@ void GeomAlgoAPI_UnifySameDomain::modified(const std::shared_ptr const TopoDS_Shape& aShape = theShape->impl(); const ShapeUpgrade_UnifySameDomain& aUnifyAlgo = this->impl(); - TopoDS_Shape aModifiedShape = aUnifyAlgo.Generated(aShape); + const TopTools_ListOfShape& aMList = aUnifyAlgo.History()->Generated(aShape); + for(TopTools_ListIteratorOfListOfShape aModified(aMList); aModified.More(); aModified.Next()) { - for(TopExp_Explorer anExp(aModifiedShape, aShape.ShapeType()); anExp.More(); anExp.Next()) { - GeomShapePtr aGeomShape(new GeomAPI_Shape()); - aGeomShape->setImpl(new TopoDS_Shape(anExp.Current())); - theHistory.push_back(aGeomShape); + for(TopExp_Explorer anExp(aModified.Value(), aShape.ShapeType()); anExp.More(); anExp.Next()) { + GeomShapePtr aGeomShape(new GeomAPI_Shape()); + aGeomShape->setImpl(new TopoDS_Shape(anExp.Current())); + theHistory.push_back(aGeomShape); + } } } diff --git a/src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx b/src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx index 364834d40..ed3fd90d4 100755 --- a/src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx +++ b/src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx @@ -143,10 +143,6 @@ void GEOMAlgo_Splitter::Clear() //======================================================================= void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType) { -#ifndef USE_OCCT_720 - myErrorStatus=0; -#endif - // TopAbs_ShapeEnum aType; BRep_Builder aBB; BOPCol_MapOfShape aM; diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index ebc01b3e6..cd276ffff 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -146,10 +146,9 @@ bool Model_Document::load(const char* theDirName, const char* theFileName, Docum Handle(TDocStd_Document) aLoaded; try { aStatus = anApp->Open(aPath, aLoaded); - } catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + } catch (Standard_Failure const& anException) { Events_InfoMessage("Model_Document", - "Exception in opening of document: %1").arg(aFail->GetMessageString()).send(); + "Exception in opening of document: %1").arg(anException.GetMessageString()).send(); return false; } bool isError = aStatus != PCDM_RS_OK; @@ -284,10 +283,9 @@ bool Model_Document::save( PCDM_StoreStatus aStatus; try { aStatus = anApp->SaveAs(myDoc, aPath); - } catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + } catch (Standard_Failure const& anException) { Events_InfoMessage("Model_Document", - "Exception in saving of document: %1").arg(aFail->GetMessageString()).send(); + "Exception in saving of document: %1").arg(anException.GetMessageString()).send(); if (aWasCurrent.get()) { // return the current feature to the initial position setCurrentFeature(aWasCurrent, false); aSession->setCheckTransactions(true); diff --git a/src/ModelHighAPI/ModelHighAPI_Tools.cpp b/src/ModelHighAPI/ModelHighAPI_Tools.cpp index 7d21ba70b..ce7245fba 100644 --- a/src/ModelHighAPI/ModelHighAPI_Tools.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Tools.cpp @@ -439,8 +439,10 @@ bool checkPythonDump() aSession->closeAll(); // execute the dumped PyGILState_STATE gstate = PyGILState_Ensure(); /* acquire python thread */ - PyObject* PyFileObject = PyFile_FromString("./check_dump.py", "r"); - PyRun_SimpleFileEx(PyFile_AsFile(PyFileObject), "./check_dump.py", 1); + static char aDumpName[] = "./check_dump.py"; + static char aReadMode[] = "r"; + PyObject* PyFileObject = PyFile_FromString(aDumpName, aReadMode); + PyRun_SimpleFileEx(PyFile_AsFile(PyFileObject), aDumpName, 1); PyGILState_Release(gstate); /* release python thread */ // compare with the stored data diff --git a/src/ModuleBase/ModuleBase_BRepOwner.h b/src/ModuleBase/ModuleBase_BRepOwner.h index b0dade4b1..31600e41a 100644 --- a/src/ModuleBase/ModuleBase_BRepOwner.h +++ b/src/ModuleBase/ModuleBase_BRepOwner.h @@ -52,7 +52,7 @@ public: /// \param theStyle a style of presentation /// \param theMode a drawing mode virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& aPM, - const Handle(Graphic3d_HighlightStyle)& theStyle, const Standard_Integer theMode = 0) + const Handle(Prs3d_Drawer)& theStyle, const Standard_Integer theMode = 0) { Selectable()->HilightOwnerWithColor(aPM, theStyle, this); } diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index fe20fa5da..906834285 100755 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -389,7 +389,7 @@ void ModuleBase_ResultPrs::HilightSelected(const Handle(PrsMgr_PresentationManag //******************************************************************** void ModuleBase_ResultPrs::HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, - const Handle(Graphic3d_HighlightStyle)& theStyle, + const Handle(Prs3d_Drawer)& theStyle, const Handle(SelectMgr_EntityOwner)& theOwner) { Handle(StdSelect_BRepOwner) aOwner = Handle(StdSelect_BRepOwner)::DownCast(theOwner); diff --git a/src/ModuleBase/ModuleBase_ResultPrs.h b/src/ModuleBase/ModuleBase_ResultPrs.h index 0a1f999b7..367d38232 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.h +++ b/src/ModuleBase/ModuleBase_ResultPrs.h @@ -65,7 +65,7 @@ public: //! this selectable object ( for fast presentation draw ) Standard_EXPORT virtual void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM, - const Handle(Graphic3d_HighlightStyle)& theStyle, + const Handle(Prs3d_Drawer)& theStyle, const Handle(SelectMgr_EntityOwner)& theOwner); /// Returns result object diff --git a/src/ModuleBase/ModuleBase_Tools.cpp b/src/ModuleBase/ModuleBase_Tools.cpp index bd3c855cc..402e40bd8 100755 --- a/src/ModuleBase/ModuleBase_Tools.cpp +++ b/src/ModuleBase/ModuleBase_Tools.cpp @@ -1141,6 +1141,7 @@ void setPointBallHighlighting(AIS_Shape* theAIS) #ifdef USE_OCCT_720 // to do: implement ball highlighting, in 7.2.0 this drawer is NULL #else +/* if(aDrawer->HasOwnPointAspect()) { Handle(Prs3d_PointAspect) aPntAspect = aDrawer->PointAspect(); if(aPixMap->IsEmpty()) { @@ -1158,6 +1159,7 @@ void setPointBallHighlighting(AIS_Shape* theAIS) aDrawer->SetPointAspect(aPntAspect); theAIS->SetHilightAttributes(aDrawer); } + */ #endif } diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.cpp b/src/ModuleBase/ModuleBase_ViewerFilters.cpp index 3f7b3a3ad..d4a77c29b 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.cpp +++ b/src/ModuleBase/ModuleBase_ViewerFilters.cpp @@ -156,24 +156,10 @@ Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk( const Prs3d_DatumParts& aPart = aTrOwner->DatumPart(); if (aPart >= Prs3d_DP_XAxis && aPart <= Prs3d_DP_ZAxis) { -#ifdef USE_OCCT_720 gp_Ax2 anAxis = aTrihedron->Component()->Ax2(); gp_Dir aDir = anAxis.XDirection(); gp_Lin aLine(aTrihedron->Component()->Location(), aDir); return aPlane.Contains(aLine, Precision::Confusion(), Precision::Angular()); -#else - Handle(Prs3d_Drawer) aDrawer = aTrihedron->Attributes(); - Handle(Prs3d_DatumAspect) aDatumAspect = aDrawer->DatumAspect(); - Handle(Graphic3d_ArrayOfPrimitives) aPrimitives = - aDatumAspect->ArrayOfPrimitives(aPart); - Standard_Real aX1, anY1, aZ1, aX2, anY2, aZ2; - aPrimitives->Vertice(1, aX1, anY1, aZ1); - aPrimitives->Vertice(2, aX2, anY2, aZ2); - gp_Pnt aPnt1(aX1, anY1, aZ1); - gp_Pnt aPnt2(aX2, anY2, aZ2); - gp_Lin aLine(aPnt1, gp_Dir(gp_Vec(aPnt1, aPnt2))); - return aPlane.Contains(aLine, Precision::Confusion(), Precision::Angular()); -#endif } } } diff --git a/src/PartSet/PartSet_CenterPrs.cpp b/src/PartSet/PartSet_CenterPrs.cpp index cc2ad4b0f..8049c1385 100644 --- a/src/PartSet/PartSet_CenterPrs.cpp +++ b/src/PartSet/PartSet_CenterPrs.cpp @@ -89,7 +89,7 @@ void PartSet_CenterPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3 } void PartSet_CenterPrs::HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, - const Handle(Graphic3d_HighlightStyle)& theStyle, + const Handle(Prs3d_Drawer)& theStyle, const Handle(SelectMgr_EntityOwner)& theOwner) { Handle( Prs3d_Presentation ) aHilightPrs = GetHilightPresentation( thePM ); diff --git a/src/PartSet/PartSet_CenterPrs.h b/src/PartSet/PartSet_CenterPrs.h index 8d60f6466..5e9c86b4f 100644 --- a/src/PartSet/PartSet_CenterPrs.h +++ b/src/PartSet/PartSet_CenterPrs.h @@ -65,7 +65,7 @@ public: virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& PM, const SelectMgr_SequenceOfOwner& Seq); virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)&, - const Handle(Graphic3d_HighlightStyle)&, + const Handle(Prs3d_Drawer)&, const Handle(SelectMgr_EntityOwner)&); DEFINE_STANDARD_RTTIEXT(PartSet_CenterPrs, AIS_Point) diff --git a/src/PartSet/PartSet_WidgetFeaturePointSelector.cpp b/src/PartSet/PartSet_WidgetFeaturePointSelector.cpp index 486138917..977289983 100644 --- a/src/PartSet/PartSet_WidgetFeaturePointSelector.cpp +++ b/src/PartSet/PartSet_WidgetFeaturePointSelector.cpp @@ -92,8 +92,8 @@ void PartSet_WidgetFeaturePointSelector::updateSelectionModesAndFilters(bool toA Handle(AIS_InteractiveContext) aContext = XGUI_Tools::workshop(myWorkshop)->viewer()->AISContext(); Quantity_Color aColor; - Handle(Graphic3d_HighlightStyle) aHStyle = aContext->HighlightStyle(); - Handle(Graphic3d_HighlightStyle) aSStyle = aContext->SelectionStyle(); + Handle(Prs3d_Drawer) aHStyle = aContext->HighlightStyle(); + Handle(Prs3d_Drawer) aSStyle = aContext->SelectionStyle(); if (toActivate) { std::vector aColors; aColors = Config_PropManager::color("Visualization", "sketch_entity_color"); diff --git a/src/SketcherPrs/SketcherPrs_Coincident.cpp b/src/SketcherPrs/SketcherPrs_Coincident.cpp index 8d7ea1581..fc2f3e36a 100644 --- a/src/SketcherPrs/SketcherPrs_Coincident.cpp +++ b/src/SketcherPrs/SketcherPrs_Coincident.cpp @@ -139,9 +139,6 @@ void SketcherPrs_Coincident::SetColor(const Quantity_NameOfColor aCol) void SketcherPrs_Coincident::SetColor(const Quantity_Color &aCol) { hasOwnColor=Standard_True; -#ifndef USE_OCCT_720 - myOwnColor=aCol; -#endif } void SketcherPrs_Coincident::SetCustomColor(const std::vector& theColor) diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp index 3f3819686..a2e51cbd4 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp @@ -99,7 +99,7 @@ public: // Update selection position only if there is no selected object // because it can corrupt selection of other objects - if ((myContext->NbCurrents() == 0) && (myContext->NbSelected() == 0)) { + if (myContext->NbSelected() == 0) { myContext->MainSelector()->RebuildSensitivesTree(myObj); myContext->MainSelector()->RebuildObjectsTree (false); } @@ -243,7 +243,7 @@ void SketcherPrs_SymbolPrs::HilightSelected(const Handle(PrsMgr_PresentationMana //********************************************************************************* void SketcherPrs_SymbolPrs::HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM, - const Handle(Graphic3d_HighlightStyle)& theStyle, + const Handle(Prs3d_Drawer)& theStyle, const Handle(SelectMgr_EntityOwner)& theOwner) { thePM->Color(this, theStyle); diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.h b/src/SketcherPrs/SketcherPrs_SymbolPrs.h index 5d28c1dd1..669f7a555 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.h +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.h @@ -69,7 +69,7 @@ public: //! this selectable object ( for fast presentation draw ) Standard_EXPORT virtual void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM, - const Handle(Graphic3d_HighlightStyle)& theStyle, + const Handle(Prs3d_Drawer)& theStyle, const Handle(SelectMgr_EntityOwner)& theOwner); /// Returns sketcher plane diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 313366bcc..34cbc8b5f 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1657,7 +1657,7 @@ bool XGUI_Workshop::prepareForDisplay(const std::set& theObjects) con int anAnswer = QMessageBox::question( desktop(), tr("Show object"), tr("'%1'\n are hidden by %2:\nRemove objects from the panel to be displayed?") - .arg(aHiddenObjectNames.join(' ,')).arg(facesPanel()->windowTitle()), + .arg(aHiddenObjectNames.join(", ")).arg(facesPanel()->windowTitle()), QMessageBox::Yes | QMessageBox::No, QMessageBox::No); bool aToBeDisplayed = anAnswer == QMessageBox::Yes; -- 2.39.2