]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To implement more careful pipeline shallow copy
authorapo <apo@opencascade.com>
Mon, 26 Sep 2005 14:23:57 +0000 (14:23 +0000)
committerapo <apo@opencascade.com>
Mon, 26 Sep 2005 14:23:57 +0000 (14:23 +0000)
src/PIPELINE/VISU_GaussPointsPL.cxx
src/PIPELINE/VISU_ImplicitFunctionWidget.cxx
src/PIPELINE/VISU_ImplicitFunctionWidget.h
src/PIPELINE/VISU_PipeLine.cxx
src/PIPELINE/VISU_ScalarMapPL.cxx

index d2071495bf7c9efa827eed64361ca30a9998ff4b..292babe59c32adf70d9bc7071f09de66eda0fc64 100644 (file)
@@ -59,15 +59,14 @@ void
 VISU_GaussPointsPL
 ::ShallowCopy(VISU_PipeLine *thePipeLine)
 {
-  SetIDMapper(thePipeLine->GetIDMapper());
-  myPSMapper->ShallowCopy(thePipeLine->GetMapper());
-  Build();
-
+  Superclass::ShallowCopy(thePipeLine);
   if(VISU_GaussPointsPL *aPipeLine = dynamic_cast<VISU_GaussPointsPL*>(thePipeLine)){
-    SetScalarRange(aPipeLine->GetScalarRange());
-    SetScalarMode(aPipeLine->GetScalarMode());
-    SetNbColors(aPipeLine->GetNbColors());
-    SetScaling(aPipeLine->GetScaling());
+    SetGaussMesh(aPipeLine->GetGaussMesh());
+    
+    vtkPolyData* aDatsSet = myPSMapper->GetInput();
+    myPSMapper->ShallowCopy(aPipeLine->GetPSMapper());
+    // To restore mapper input from pipeline
+    myPSMapper->SetInput(aDatsSet);
 
     SetGaussMesh(aPipeLine->GetGaussMesh());
     SetClamp(aPipeLine->GetClamp());
@@ -123,8 +122,8 @@ VISU_GaussPointsPL
 
 //----------------------------------------------------------------------------
 void 
-VISU_GaussPointsPL::
-Init()
+VISU_GaussPointsPL
+::Init()
 {
   VISU_ScalarMapPL::Init();
 
index 5d2130e5ca0262a0291fef55df0e79446b441b22..236de5535d37df135dd478fc591ef4bcaf7147ef 100644 (file)
@@ -417,6 +417,15 @@ void VISU_ImplicitFunctionWidget::SetEnabled(int enabling)
   
   this->Interactor->Render();
 }
+
+int
+VISU_ImplicitFunctionWidget
+::IsEnabled()
+{
+  return this->Enabled;
+}
+
+
 //==================================================================
 // function: ProcessEvents
 // purpose :
index 5b59e1dc94055dac8ce22ba82ea41397ed1ed3c5..1590f303c8b777a5d760f138ecdfbab81f461f6d 100644 (file)
@@ -67,8 +67,7 @@ public:
   // Methods that satisfy the superclass' API.
   virtual void SetEnabled(int);
   virtual void PlaceWidget(float bounds[6]);
-  void PlaceWidget()
-    {this->Superclass::PlaceWidget();}
+  int IsEnabled();
 
   // Description:
   // Get the origin of the plane.
index 57f11890ce6e1a0fd7595c10295ffb1c08a86909..be88e0b59b411d1cbdec19080afc4ddb6865522b 100644 (file)
@@ -88,8 +88,15 @@ VISU_PipeLine
 ::ShallowCopy(VISU_PipeLine *thePipeLine)
 {
   SetIDMapper(thePipeLine->GetIDMapper());
-  GetMapper()->ShallowCopy(thePipeLine->GetMapper());
+
   SetImplicitFunction(thePipeLine->GetImplicitFunction());
+
+  vtkDataSet* aDatsSet = myMapper->GetInput();
+  GetMapper()->ShallowCopy(thePipeLine->GetMapper());
+
+  // To restore mapper input from pipeline
+  myMapper->SetInput(aDatsSet);
+
   Build();
 }
 
@@ -325,7 +332,7 @@ vtkIdType
 VISU_PipeLine
 ::GetNodeObjID(vtkIdType theID)
 {
-  vtkIdType anID=myExtractGeometry->GetNodeObjId(theID);
+  vtkIdType anID = myExtractGeometry->GetNodeObjId(theID);
   return myIDMapper->GetNodeObjID(anID);
 }
 
@@ -348,7 +355,7 @@ vtkIdType
 VISU_PipeLine
 ::GetElemObjID(vtkIdType theID)
 {
-  vtkIdType anID=myExtractGeometry->GetElemObjId(theID);
+  vtkIdType anID = myExtractGeometry->GetElemObjId(theID);
   return myIDMapper->GetElemObjID(anID);
 }
 
index ac75caae3c178298f59867a41a92343cc01e965b..2b46d042f1fef0f316013c5f72074e4804fab430 100644 (file)
@@ -67,7 +67,7 @@ void VISU_ScalarMapPL::ShallowCopy(VISU_PipeLine *thePipeLine){
     SetScalarMode(aPipeLine->GetScalarMode());
     SetNbColors(aPipeLine->GetNbColors());
     SetScaling(aPipeLine->GetScaling());
-    //Update();
+    Update(); // apo-gauss
   }
 }