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();
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);
}
}
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" ) );
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()