From 756baec6e74556efab1fdde0a6c411ca81e103c7 Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 3 May 2005 12:01:13 +0000 Subject: [PATCH] Bug PAL8221 - POST-PRO: Pal/Salome crashes if edit presentation in opened study --- src/PIPELINE/VISU_StreamLinesPL.cxx | 2 +- src/VISUGUI/VisuGUI.cxx | 14 +++++++------- src/VISU_I/VISU_CutLines_i.cc | 22 ++++++++++++++++----- src/VISU_I/VISU_CutLines_i.hh | 8 ++++++-- src/VISU_I/VISU_CutPlanes_i.cc | 23 +++++++++++++++++----- src/VISU_I/VISU_CutPlanes_i.hh | 8 ++++++-- src/VISU_I/VISU_DeformedShape_i.cc | 23 +++++++++++++++++----- src/VISU_I/VISU_DeformedShape_i.hh | 8 ++++++-- src/VISU_I/VISU_IsoSurfaces_i.cc | 22 ++++++++++++++++----- src/VISU_I/VISU_IsoSurfaces_i.hh | 8 ++++++-- src/VISU_I/VISU_Mesh_i.cc | 21 ++++++++++++++++---- src/VISU_I/VISU_Mesh_i.hh | 6 +++++- src/VISU_I/VISU_Prs3d_i.cc | 26 ++++++++++++++++++------- src/VISU_I/VISU_Prs3d_i.hh | 7 ++++++- src/VISU_I/VISU_ScalarMap_i.cc | 21 +++++++++++++++----- src/VISU_I/VISU_ScalarMap_i.hh | 8 ++++++-- src/VISU_I/VISU_StreamLines_i.cc | 30 ++++++++++++++++++++++------- src/VISU_I/VISU_StreamLines_i.hh | 8 ++++++-- src/VISU_I/VISU_Vectors_i.cc | 26 +++++++++++++++++++------ src/VISU_I/VISU_Vectors_i.hh | 8 ++++++-- 20 files changed, 226 insertions(+), 73 deletions(-) diff --git a/src/PIPELINE/VISU_StreamLinesPL.cxx b/src/PIPELINE/VISU_StreamLinesPL.cxx index f219d4a3..9d3cf427 100644 --- a/src/PIPELINE/VISU_StreamLinesPL.cxx +++ b/src/PIPELINE/VISU_StreamLinesPL.cxx @@ -37,7 +37,7 @@ #include #ifdef _DEBUG_ -static int MYDEBUG = 1; +static int MYDEBUG = 0; #else static int MYDEBUG = 0; #endif diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 6e4b1d19..a039ad74 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -2616,7 +2616,7 @@ void VisuGUI::CopyPresentation(){ case VISU::TSCALARMAP: { VISU::ScalarMap_i* aScalarPrs = dynamic_cast(aPrsObject); - VISU::ScalarMap_i* aSameScalar = new VISU::ScalarMap_i(aScalarPrs->GetResult()); + VISU::ScalarMap_i* aSameScalar = new VISU::ScalarMap_i(aScalarPrs->GetResult(),true); aSameScalar->SameAs(aScalarPrs); UpdateViewer(aSameScalar); } @@ -2624,7 +2624,7 @@ void VisuGUI::CopyPresentation(){ case VISU::TDEFORMEDSHAPE: { VISU::DeformedShape_i* aDefPrs = dynamic_cast(aPrsObject); - VISU::DeformedShape_i* aSameDeformed = new VISU::DeformedShape_i(aDefPrs->GetResult()); + VISU::DeformedShape_i* aSameDeformed = new VISU::DeformedShape_i(aDefPrs->GetResult(),true); aSameDeformed->SameAs(aDefPrs); UpdateViewer(aSameDeformed); } @@ -2632,7 +2632,7 @@ void VisuGUI::CopyPresentation(){ case VISU::TCUTPLANES: { VISU::CutPlanes_i* aCutPrs = dynamic_cast(aPrsObject); - VISU::CutPlanes_i* aSameCut = new VISU::CutPlanes_i(aCutPrs->GetResult()); + VISU::CutPlanes_i* aSameCut = new VISU::CutPlanes_i(aCutPrs->GetResult(),true); aSameCut->SameAs(aCutPrs); UpdateViewer(aSameCut); } @@ -2640,7 +2640,7 @@ void VisuGUI::CopyPresentation(){ case VISU::TCUTLINES: { VISU::CutLines_i* aCutPrs = dynamic_cast(aPrsObject); - VISU::CutLines_i* aSameCut = new VISU::CutLines_i(aCutPrs->GetResult()); + VISU::CutLines_i* aSameCut = new VISU::CutLines_i(aCutPrs->GetResult(),true); aSameCut->SameAs(aCutPrs); UpdateViewer(aSameCut); } @@ -2648,7 +2648,7 @@ void VisuGUI::CopyPresentation(){ case VISU::TISOSURFACE: { VISU::IsoSurfaces_i* aIsoPrs = dynamic_cast(aPrsObject); - VISU::IsoSurfaces_i* aSameIso = new VISU::IsoSurfaces_i(aIsoPrs->GetResult()); + VISU::IsoSurfaces_i* aSameIso = new VISU::IsoSurfaces_i(aIsoPrs->GetResult(),true); aSameIso->SameAs(aIsoPrs); UpdateViewer(aSameIso); } @@ -2656,7 +2656,7 @@ void VisuGUI::CopyPresentation(){ case VISU::TSTREAMLINES: { VISU::StreamLines_i* aLinesPrs = dynamic_cast(aPrsObject); - VISU::StreamLines_i* aSameLines = new VISU::StreamLines_i(aLinesPrs->GetResult()); + VISU::StreamLines_i* aSameLines = new VISU::StreamLines_i(aLinesPrs->GetResult(),true); aSameLines->SameAs(aLinesPrs); UpdateViewer(aSameLines); } @@ -2664,7 +2664,7 @@ void VisuGUI::CopyPresentation(){ case VISU::TVECTORS: { VISU::Vectors_i* aVectorsPrs = dynamic_cast(aPrsObject); - VISU::Vectors_i* aSameVectors = new VISU::Vectors_i(aVectorsPrs->GetResult()); + VISU::Vectors_i* aSameVectors = new VISU::Vectors_i(aVectorsPrs->GetResult(),true); aSameVectors->SameAs(aVectorsPrs); UpdateViewer(aSameVectors); } diff --git a/src/VISU_I/VISU_CutLines_i.cc b/src/VISU_I/VISU_CutLines_i.cc index f5185524..f2ee138e 100644 --- a/src/VISU_I/VISU_CutLines_i.cc +++ b/src/VISU_I/VISU_CutLines_i.cc @@ -55,15 +55,27 @@ const string VISU::CutLines_i::myComment = "CUTLINES"; const char* VISU::CutLines_i::GetComment() const { return myComment.c_str();} -VISU::CutLines_i::CutLines_i(Result_i* theResult, bool theAddToStudy, SALOMEDS::SObject_ptr theSObject) : - PrsObject_i(theResult->GetStudyDocument()), - Prs3d_i(theResult,theSObject), - ScalarMap_i(theResult,theAddToStudy,theSObject) +VISU::CutLines_i:: +CutLines_i(Result_i* theResult, + bool theAddToStudy) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theAddToStudy), + ScalarMap_i(theResult,theAddToStudy), + myCutLinesPL(NULL) { - myCutLinesPL = NULL; } +VISU::CutLines_i:: +CutLines_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theSObject), + ScalarMap_i(theResult,theSObject), + myCutLinesPL(NULL) +{ +} + void VISU::CutLines_i::SameAs(const CutLines_i* theOrigin){ VISU::ScalarMap_i::SameAs(theOrigin); diff --git a/src/VISU_I/VISU_CutLines_i.hh b/src/VISU_I/VISU_CutLines_i.hh index e0ee1820..5d697a7f 100644 --- a/src/VISU_I/VISU_CutLines_i.hh +++ b/src/VISU_I/VISU_CutLines_i.hh @@ -39,8 +39,12 @@ namespace VISU{ CutLines_i(); CutLines_i(const CutLines_i&); public: - CutLines_i(Result_i* theResult, bool theAddToStudy = true, - SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()); + explicit + CutLines_i(Result_i* theResult, + bool theAddToStudy); + explicit + CutLines_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject); virtual void SameAs(const CutLines_i* theOrigin); virtual ~CutLines_i(); diff --git a/src/VISU_I/VISU_CutPlanes_i.cc b/src/VISU_I/VISU_CutPlanes_i.cc index a18f32f3..b0dca7d0 100644 --- a/src/VISU_I/VISU_CutPlanes_i.cc +++ b/src/VISU_I/VISU_CutPlanes_i.cc @@ -53,12 +53,25 @@ const string VISU::CutPlanes_i::myComment = "CUTPLANES"; const char* VISU::CutPlanes_i::GetComment() const { return myComment.c_str();} -VISU::CutPlanes_i::CutPlanes_i(Result_i* theResult, bool theAddToStudy, SALOMEDS::SObject_ptr theSObject) : - PrsObject_i(theResult->GetStudyDocument()), - Prs3d_i(theResult,theSObject), - ScalarMap_i(theResult,theAddToStudy,theSObject) +VISU::CutPlanes_i:: +CutPlanes_i(Result_i* theResult, + bool theAddToStudy) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theAddToStudy), + ScalarMap_i(theResult,theAddToStudy), + myCutPlanesPL(NULL) +{ +} + + +VISU::CutPlanes_i:: +CutPlanes_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theSObject), + ScalarMap_i(theResult,theSObject), + myCutPlanesPL(NULL) { - myCutPlanesPL = NULL; } diff --git a/src/VISU_I/VISU_CutPlanes_i.hh b/src/VISU_I/VISU_CutPlanes_i.hh index 867fe5d3..e980c315 100644 --- a/src/VISU_I/VISU_CutPlanes_i.hh +++ b/src/VISU_I/VISU_CutPlanes_i.hh @@ -39,8 +39,12 @@ namespace VISU{ CutPlanes_i(); CutPlanes_i(const CutPlanes_i&); public: - CutPlanes_i(Result_i* theResult, bool theAddToStudy = true, - SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()); + explicit + CutPlanes_i(Result_i* theResult, + bool theAddToStudy); + explicit + CutPlanes_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject); virtual void SameAs(const CutPlanes_i* theOrigin); virtual ~CutPlanes_i(); diff --git a/src/VISU_I/VISU_DeformedShape_i.cc b/src/VISU_I/VISU_DeformedShape_i.cc index ed15758d..1198ad2d 100644 --- a/src/VISU_I/VISU_DeformedShape_i.cc +++ b/src/VISU_I/VISU_DeformedShape_i.cc @@ -62,16 +62,29 @@ const string VISU::DeformedShape_i::myComment = "DEFORMEDSHAPE"; const char* VISU::DeformedShape_i::GetComment() const { return myComment.c_str();} -VISU::DeformedShape_i::DeformedShape_i(Result_i* theResult, bool theAddToStudy, SALOMEDS::SObject_ptr theSObject) : - PrsObject_i(theResult->GetStudyDocument()), - Prs3d_i(theResult,theSObject), - ScalarMap_i(theResult,theAddToStudy,theSObject) +VISU::DeformedShape_i:: +DeformedShape_i(Result_i* theResult, + bool theAddToStudy) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theAddToStudy), + ScalarMap_i(theResult,theAddToStudy), + myDeformedShapePL(NULL) { if(MYDEBUG) MESSAGE("DeformedShape_i::DeformedShape_i"); - myDeformedShapePL = NULL; } +VISU::DeformedShape_i:: +DeformedShape_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theSObject), + ScalarMap_i(theResult,theSObject), + myDeformedShapePL(NULL) +{ + if(MYDEBUG) MESSAGE("DeformedShape_i::DeformedShape_i"); +} + void VISU::DeformedShape_i::SameAs(const DeformedShape_i* theOrigin) { diff --git a/src/VISU_I/VISU_DeformedShape_i.hh b/src/VISU_I/VISU_DeformedShape_i.hh index 96fc4d22..d8298457 100644 --- a/src/VISU_I/VISU_DeformedShape_i.hh +++ b/src/VISU_I/VISU_DeformedShape_i.hh @@ -39,8 +39,12 @@ namespace VISU{ DeformedShape_i(); DeformedShape_i(const DeformedShape_i&); public: - DeformedShape_i(Result_i* theResult, bool theAddToStudy = true, - SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()); + explicit + DeformedShape_i(Result_i* theResult, + bool theAddToStudy); + explicit + DeformedShape_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject); virtual void SameAs(const DeformedShape_i* theOrigin); virtual ~DeformedShape_i(); diff --git a/src/VISU_I/VISU_IsoSurfaces_i.cc b/src/VISU_I/VISU_IsoSurfaces_i.cc index 4a152703..79b2a877 100644 --- a/src/VISU_I/VISU_IsoSurfaces_i.cc +++ b/src/VISU_I/VISU_IsoSurfaces_i.cc @@ -51,15 +51,27 @@ const string VISU::IsoSurfaces_i::myComment = "ISOSURFACES"; const char* VISU::IsoSurfaces_i::GetComment() const { return myComment.c_str();} -VISU::IsoSurfaces_i::IsoSurfaces_i(Result_i* theResult, bool theAddToStudy, SALOMEDS::SObject_ptr theSObject) : - PrsObject_i(theResult->GetStudyDocument()), - Prs3d_i(theResult,theSObject), - ScalarMap_i(theResult,theAddToStudy,theSObject) +VISU::IsoSurfaces_i:: +IsoSurfaces_i(Result_i* theResult, + bool theAddToStudy) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theAddToStudy), + ScalarMap_i(theResult,theAddToStudy), + myIsoSurfacesPL(NULL) { - myIsoSurfacesPL = NULL; } +VISU::IsoSurfaces_i:: +IsoSurfaces_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theSObject), + ScalarMap_i(theResult,theSObject), + myIsoSurfacesPL(NULL) +{ +} + void VISU::IsoSurfaces_i::SameAs(const IsoSurfaces_i* theOrigin) { VISU::ScalarMap_i::SameAs(theOrigin); diff --git a/src/VISU_I/VISU_IsoSurfaces_i.hh b/src/VISU_I/VISU_IsoSurfaces_i.hh index d3e70ff1..74e83587 100644 --- a/src/VISU_I/VISU_IsoSurfaces_i.hh +++ b/src/VISU_I/VISU_IsoSurfaces_i.hh @@ -39,8 +39,12 @@ namespace VISU{ IsoSurfaces_i(); IsoSurfaces_i(const IsoSurfaces_i&); public: - IsoSurfaces_i(Result_i* theResult, bool theAddToStudy = true, - SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()); + explicit + IsoSurfaces_i(Result_i* theResult, + bool theAddToStudy); + explicit + IsoSurfaces_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject); virtual void SameAs(const IsoSurfaces_i* theOrigin); virtual ~IsoSurfaces_i(); diff --git a/src/VISU_I/VISU_Mesh_i.cc b/src/VISU_I/VISU_Mesh_i.cc index 8459b5bc..27b69a65 100644 --- a/src/VISU_I/VISU_Mesh_i.cc +++ b/src/VISU_I/VISU_Mesh_i.cc @@ -48,11 +48,24 @@ const string VISU::Mesh_i::myComment = "MESH"; const char* VISU::Mesh_i::GetComment() const { return myComment.c_str();} -VISU::Mesh_i::Mesh_i(Result_i* theResult, SALOMEDS::SObject_ptr theSObject) : - PrsObject_i(theResult->GetStudyDocument()), - Prs3d_i(theResult,theSObject) +VISU::Mesh_i:: +Mesh_i(Result_i* theResult) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,false), + myMeshPL(VISU_MeshPL::New()) { - myPipeLine = myMeshPL = VISU_MeshPL::New();; + myPipeLine = myMeshPL; +} + + +VISU::Mesh_i:: +Mesh_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theSObject), + myMeshPL(VISU_MeshPL::New()) +{ + myPipeLine = myMeshPL; } diff --git a/src/VISU_I/VISU_Mesh_i.hh b/src/VISU_I/VISU_Mesh_i.hh index 5ae8a364..ebed10ac 100644 --- a/src/VISU_I/VISU_Mesh_i.hh +++ b/src/VISU_I/VISU_Mesh_i.hh @@ -39,7 +39,11 @@ namespace VISU{ Mesh_i(); Mesh_i(const Mesh_i&); public: - Mesh_i(Result_i* theResult, SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()); + explicit + Mesh_i(Result_i* theResult); + explicit + Mesh_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject); virtual void SameAs(const Mesh_i* theOrigin); virtual ~Mesh_i(); virtual void RemoveFromStudy(); diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index bd655338..5ae2f8ab 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -41,16 +41,28 @@ static int MYDEBUG = 0; static int MYDEBUG = 0; #endif -VISU::Prs3d_i::Prs3d_i(Result_i* theResult, SALOMEDS::SObject_ptr theSObject) : +VISU::Prs3d_i:: +Prs3d_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : PrsObject_i(theResult->GetStudyDocument()), - myResult(theResult) + myResult(theResult), + mySObject(SALOMEDS::SObject::_duplicate(theSObject)), + myAddToStudy(true), + myPipeLine(NULL) +{ + myResult->Register(); +} + +VISU::Prs3d_i:: +Prs3d_i(Result_i* theResult, + bool theAddToStudy) : + PrsObject_i(theResult->GetStudyDocument()), + myResult(theResult), + mySObject(SALOMEDS::SObject::_nil()), + myAddToStudy(theAddToStudy), + myPipeLine(NULL) { myResult->Register(); - mySObject = SALOMEDS::SObject::_duplicate(theSObject); - myAddToStudy = true; - myPipeLine = NULL; - CORBA::String_var aName = myStudy->Name(); - if(MYDEBUG) MESSAGE("Prs3d_i - this = "<GetStudyDocument()), - Prs3d_i(theResult,theSObject) +VISU::ScalarMap_i:: +ScalarMap_i(Result_i* theResult, + bool theAddToStudy) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theAddToStudy), + myScalarMapPL(NULL) +{ +} + + +VISU::ScalarMap_i:: +ScalarMap_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theSObject), + myScalarMapPL(NULL) { - myAddToStudy = theAddToStudy; - myScalarMapPL = NULL; } diff --git a/src/VISU_I/VISU_ScalarMap_i.hh b/src/VISU_I/VISU_ScalarMap_i.hh index 510ff794..4bee2d4f 100644 --- a/src/VISU_I/VISU_ScalarMap_i.hh +++ b/src/VISU_I/VISU_ScalarMap_i.hh @@ -40,8 +40,12 @@ namespace VISU{ ScalarMap_i(const ScalarMap_i&); public: - ScalarMap_i(Result_i* theResult, bool theAddToStudy = true, - SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()); + explicit + ScalarMap_i(Result_i* theResult, + bool theAddToStudy); + explicit + ScalarMap_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject); virtual void SameAs(const ScalarMap_i* theOrigin); virtual ~ScalarMap_i(); virtual void RemoveFromStudy(); diff --git a/src/VISU_I/VISU_StreamLines_i.cc b/src/VISU_I/VISU_StreamLines_i.cc index 30794fd1..ecfe43c5 100644 --- a/src/VISU_I/VISU_StreamLines_i.cc +++ b/src/VISU_I/VISU_StreamLines_i.cc @@ -69,16 +69,32 @@ const string VISU::StreamLines_i::myComment = "STREAMLINES"; const char* VISU::StreamLines_i::GetComment() const { return myComment.c_str();} -VISU::StreamLines_i::StreamLines_i(Result_i* theResult, bool theAddToStudy, SALOMEDS::SObject_ptr theSObject) : - PrsObject_i(theResult->GetStudyDocument()), - Prs3d_i(theResult,theSObject), - ScalarMap_i(theResult,theAddToStudy,theSObject), - DeformedShape_i(theResult,theAddToStudy,theSObject) +VISU::StreamLines_i:: +StreamLines_i(Result_i* theResult, + bool theAddToStudy) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theAddToStudy), + ScalarMap_i(theResult,theAddToStudy), + DeformedShape_i(theResult,theAddToStudy), + myStreamLinesPL(NULL), + myAppendFilter(vtkAppendFilter::New()) { - myStreamLinesPL = NULL; - myAppendFilter = vtkAppendFilter::New(); } + +VISU::StreamLines_i:: +StreamLines_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theSObject), + ScalarMap_i(theResult,theSObject), + DeformedShape_i(theResult,theSObject), + myStreamLinesPL(NULL), + myAppendFilter(vtkAppendFilter::New()) +{ +} + + void VISU::StreamLines_i::SameAs(const StreamLines_i* theOrigin) { StreamLines_i* aStreamLines = const_cast(theOrigin); VISU::DeformedShape_i::SameAs(theOrigin); diff --git a/src/VISU_I/VISU_StreamLines_i.hh b/src/VISU_I/VISU_StreamLines_i.hh index 05d6cb46..46ccfde8 100644 --- a/src/VISU_I/VISU_StreamLines_i.hh +++ b/src/VISU_I/VISU_StreamLines_i.hh @@ -40,8 +40,12 @@ namespace VISU{ StreamLines_i(); StreamLines_i(const StreamLines_i&); public: - StreamLines_i(Result_i* theResult, bool theAddToStudy = true, - SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()); + explicit + StreamLines_i(Result_i* theResult, + bool theAddToStudy); + explicit + StreamLines_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject); virtual void SameAs(const StreamLines_i* theOriginal); virtual ~StreamLines_i(); diff --git a/src/VISU_I/VISU_Vectors_i.cc b/src/VISU_I/VISU_Vectors_i.cc index ff44a6c1..bd086a60 100644 --- a/src/VISU_I/VISU_Vectors_i.cc +++ b/src/VISU_I/VISU_Vectors_i.cc @@ -69,13 +69,27 @@ const string VISU::Vectors_i::myComment = "VECTORS"; const char* VISU::Vectors_i::GetComment() const { return myComment.c_str();} -VISU::Vectors_i::Vectors_i(Result_i* theResult, bool theAddToStudy, SALOMEDS::SObject_ptr theSObject) : - PrsObject_i(theResult->GetStudyDocument()), - Prs3d_i(theResult,theSObject), - ScalarMap_i(theResult,theAddToStudy,theSObject), - DeformedShape_i(theResult,theAddToStudy,theSObject) +VISU::Vectors_i:: +Vectors_i(Result_i* theResult, + bool theAddToStudy) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theAddToStudy), + ScalarMap_i(theResult,theAddToStudy), + DeformedShape_i(theResult,theAddToStudy), + myVectorsPL(NULL) +{ +} + + +VISU::Vectors_i:: +Vectors_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject) : + PrsObject_i(theResult->GetStudyDocument()), + Prs3d_i(theResult,theSObject), + ScalarMap_i(theResult,theSObject), + DeformedShape_i(theResult,theSObject), + myVectorsPL(NULL) { - myVectorsPL = NULL; } diff --git a/src/VISU_I/VISU_Vectors_i.hh b/src/VISU_I/VISU_Vectors_i.hh index 40b45a43..4acbb04a 100644 --- a/src/VISU_I/VISU_Vectors_i.hh +++ b/src/VISU_I/VISU_Vectors_i.hh @@ -39,8 +39,12 @@ namespace VISU{ Vectors_i(); Vectors_i(const Vectors_i&); public: - Vectors_i(Result_i* theResult, bool theAddToStudy = true, - SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()); + explicit + Vectors_i(Result_i* theResult, + bool theAddToStudy); + explicit + Vectors_i(Result_i* theResult, + SALOMEDS::SObject_ptr theSObject); virtual void SameAs(const Vectors_i* theOrigin); virtual ~Vectors_i(); -- 2.39.2