]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug VISU200819978 - Parent cell is not shown in 3D Viewer after activating of respons...
authorouv <ouv@opencascade.com>
Fri, 20 Jun 2008 12:32:11 +0000 (12:32 +0000)
committerouv <ouv@opencascade.com>
Fri, 20 Jun 2008 12:32:11 +0000 (12:32 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx
src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx

index ead67d738d8125d51a8e563d38c93c27d708122c..8660ff35ed4a4dd03e2c1e1c1db6a91f56dbf61f 100644 (file)
@@ -938,12 +938,13 @@ VISU_GaussPtsAct
   bool aCurrentHasIndex = aMapIndex.Extent() == 1;
   bool anIsVisible = GetVisibility() && aCurrentHasIndex && theIsHighlight;
   bool aShowTextActor = aPickingSettings->GetInfoWindowEnabled();
+  bool aShowCellActor = aPickingSettings->GetDisplayParentMesh();
 
   myOutlineActor->SetVisibility(false);
   myCursorPyramid->SetVisibility(false);
 
   myTextActor->SetVisibility(anIsVisible && aShowTextActor);
-  myCellActor->SetVisibility(anIsVisible);
+  myCellActor->SetVisibility(anIsVisible && aShowCellActor);
   GetScalarBarCtrl()->SetIsMarked(anIsVisible);
   myCursorPyramidSelected->SetVisibility(anIsVisible);
   //GetScalarBarCtrl()->Update();
@@ -1078,23 +1079,19 @@ VISU_GaussPtsAct
     myTextActor->SetVisibility(anIsVisible && theIsHighlight && aShowTextActor);
     //
     // myCellActor
-    if(aPickingSettings->GetDisplayParentMesh()){
-      const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper = 
-       myGaussPointsPL->GetGaussPtsIDMapper();
-      VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
-      
-      myCellSource->Reset();
-      myCellSource->Modified(); // a VTK bug
-      vtkUnstructuredGrid* aDataSet = aParent->GetUnstructuredGridOutput();
-      myCellSource->SetPoints(aDataSet->GetPoints());
-      
-      VISU::TGaussPointID aGaussPointID = aGaussPtsIDMapper->GetObjID(anObjId);
-      vtkIdType aCellID = aGaussPointID.first;
-      vtkCell* aCell = aParent->GetElemCell(aCellID);
-      myCellSource->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
-      myCellActor->SetVisibility(anIsVisible && theIsHighlight);
-      myCellActor->SetRepresentation(VTK_WIREFRAME);
-    }
+    const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper = myGaussPointsPL->GetGaussPtsIDMapper();
+    VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
+    //
+    myCellSource->Reset();
+    myCellSource->Modified(); // a VTK bug
+    vtkUnstructuredGrid* aCellDataSet = aParent->GetUnstructuredGridOutput();
+    myCellSource->SetPoints(aCellDataSet->GetPoints());
+    //  
+    VISU::TGaussPointID aGaussPointID = aGaussPtsIDMapper->GetObjID(anObjId);
+    vtkIdType aCellID = aGaussPointID.first;
+    vtkCell* aCell = aParent->GetElemCell(aCellID);
+    myCellSource->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
+    myCellActor->SetVisibility(anIsVisible && theIsHighlight && aShowCellActor);
   }
 }
 
index 6b258d2c2f42392d5db81992f06173741c620837..e62a7906aaff4c58f3567050ab90d03f85405ef9 100644 (file)
@@ -257,20 +257,13 @@ VisuGUI_GaussPointsSelectionPane::VisuGUI_GaussPointsSelectionPane( const Salome
   myEventCallbackCommand->SetCallback(VisuGUI_GaussPointsSelectionPane::ProcessEvents);
 
   QVBoxLayout* TopLayout = new QVBoxLayout( this );
-  TopLayout->setSpacing(6);
-  TopLayout->setMargin(11);
-
-  QWidget* aBox = new QWidget( this );
-  QVBoxLayout* BoxLayout = new QVBoxLayout( aBox );
-  BoxLayout->setMargin(0);
-  BoxLayout->setSpacing(6);
+  //TopLayout->setSpacing(6);
 
   // Display parent mesh element
-  QGroupBox* PositionGroup = new QGroupBox( tr( "DATA_POSITION" ), aBox );
+  QGroupBox* PositionGroup = new QGroupBox( tr( "DATA_POSITION" ), this );
   QGridLayout* PositionGroupLayout = new QGridLayout (PositionGroup);
   PositionGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
-  PositionGroupLayout->setSpacing(6);
-  PositionGroupLayout->setMargin(11);
+  //PositionGroupLayout->setSpacing(6);
 
   QLabel* ParentElementLabel = new QLabel( tr( "PARENT_ELEMENT" ), PositionGroup );
   ParentElementLabel->setToolTip( tr( "PARENT_ELEMENT_TIP" ) );
@@ -308,11 +301,10 @@ VisuGUI_GaussPointsSelectionPane::VisuGUI_GaussPointsSelectionPane( const Salome
   PositionGroupLayout->addWidget( LocalPointBtn,               1, 4 );
   PositionGroupLayout->addWidget( myDisplayParentMeshCheckBox, 2, 0, 1, 5 );
 
-  BoxLayout->addWidget( PositionGroup );
-
-  connect( myDisplayParentMeshCheckBox, SIGNAL(), this, SLOT( onApplyDisplayParentMesh( bool ) ) );
+  connect( myDisplayParentMeshCheckBox, SIGNAL( toggled( bool ) ), this, SLOT( onApplyDisplayParentMesh( bool ) ) );
 
-  TopLayout->addWidget( aBox );
+  TopLayout->addWidget( PositionGroup );
+  TopLayout->addStretch();
 }
 
 VisuGUI_GaussPointsSelectionPane::~VisuGUI_GaussPointsSelectionPane()