From 8fccf870d3387fa0974af92cf19d52a9e5c311fa Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 28 Apr 2009 12:53:25 +0000 Subject: [PATCH] IPAL20992 Controls Free nodes works wrong --- src/OBJECT/SMESH_DeviceActor.cxx | 4 ++-- src/SMESHGUI/SMESHGUI_Selection.cxx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index c24f10bfc..19e3451ca 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -547,8 +547,8 @@ SMESH_DeviceActor }else if(FreeNodes* aFreeNodes = dynamic_cast(theFunctor.get())){ myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding); vtkUnstructuredGrid* aGrid = myVisualObj->GetUnstructuredGrid(); - vtkIdType aNbCells = aGrid->GetNumberOfCells(); - for( vtkIdType i = 0; i < aNbCells; i++ ){ + vtkIdType aNbNodes = myVisualObj->GetNbEntities(SMDSAbs_Node); + for( vtkIdType i = 0; i < aNbNodes; i++ ){ vtkIdType anObjId = myVisualObj->GetNodeObjId(i); if(aFreeNodes->IsSatisfy(anObjId)) myExtractUnstructuredGrid->RegisterCell(i); diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index cc09a369f..c37d3559f 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -239,6 +239,7 @@ QString SMESHGUI_Selection::controlMode( int ind ) const case SMESH_Actor::eLength: return "eLength"; case SMESH_Actor::eLength2D: return "eLength2D"; case SMESH_Actor::eFreeEdges: return "eFreeEdges"; + case SMESH_Actor::eFreeNodes: return "eFreeNodes"; case SMESH_Actor::eFreeBorders: return "eFreeBorders"; case SMESH_Actor::eFreeFaces: return "eFreeFaces"; case SMESH_Actor::eMultiConnection: return "eMultiConnection"; -- 2.39.2