From: ouv Date: Fri, 20 Jun 2008 12:32:11 +0000 (+0000) Subject: Bug VISU200819978 - Parent cell is not shown in 3D Viewer after activating of respons... X-Git-Tag: TG_VISU_2008_2008-06-26~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7b833277935f842bc3ed8d3ef1b40e2eb7683f6b;p=modules%2Fvisu.git Bug VISU200819978 - Parent cell is not shown in 3D Viewer after activating of responsible check box in ?Selection Info? dialog box --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index ead67d73..8660ff35 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -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); } } diff --git a/src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx b/src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx index 6b258d2c..e62a7906 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx +++ b/src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx @@ -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()