]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix Group Dialog
authorViktor Uzlov <viktor.uzlov@opencascade.com>
Mon, 8 Mar 2021 11:02:45 +0000 (14:02 +0300)
committerViktor Uzlov <viktor.uzlov@opencascade.com>
Mon, 8 Mar 2021 11:02:45 +0000 (14:02 +0300)
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_ActorDef.h
src/OBJECT/SMESH_CellLabelActor.cxx
src/OBJECT/SMESH_NodeLabelActor.cxx
src/OBJECT/SMESH_SVTKActor.cxx
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.cxx

index 48b0c7d0f6b2e59f977c30dc404078efe2316d03..05bec17b37e9c60a4583b8de43f42e42799c81d1 100644 (file)
@@ -2225,7 +2225,7 @@ void SMESH_ActorDef::SetBallScale( double theVal )
   Modified();
 }
 
-int SMESH_ActorDef::GetObjDimension( const int theObjId )
+int SMESH_ActorDef::GetObjDimension( const vtkIdType theObjId )
 {
   return myVisualObj->GetElemDimension( theObjId );
 }
index de1e91a63954ac5c20281b7026c3de4b78d076f4..467ab46db336d5e8b20c6d3a33eb7fe0e8e4c441 100644 (file)
@@ -151,7 +151,7 @@ class SMESH_ActorDef : public SMESH_Actor
   virtual vtkIdType GetElemObjId(vtkIdType theVtkID);
   virtual vtkCell* GetElemCell(vtkIdType theObjID);
 
-  virtual int GetObjDimension( const int theObjId );
+  virtual int GetObjDimension( const vtkIdType theObjId ) override;
 
   virtual void SetVisibility(int theMode);
   void SetVisibility(int theMode, bool theIsUpdateRepersentation);
index 34220b870e03733905a0f48cf8b8cd2ff62e920d..693dcb44c301ca9dfe5341f244d98a5886a4b547 100644 (file)
@@ -71,7 +71,7 @@ SMESH_CellLabelActor::SMESH_CellLabelActor()
   myClsLabeledDataMapper = vtkLabeledDataMapper::New();
   myClsLabeledDataMapper->SetInputConnection(myClsSelectVisiblePoints->GetOutputPort());
 
-  myClsLabeledDataMapper->SetLabelFormat("%d");
+  //myClsLabeledDataMapper->SetLabelFormat("%d");
   myClsLabeledDataMapper->SetLabelModeToLabelScalars();
 
   myClsTextProp = vtkTextProperty::New();
@@ -159,9 +159,6 @@ void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled)
     vtkUnstructuredGrid *aDataSet = myCellsNumDataSet;
     vtkIdType aNbElem = aDataSet->GetNumberOfCells();
     vtkIdTypeArray *anArray = vtkIdTypeArray::New();
-    //
-    std::cout << "\n\n\n***********\nSizeof vtkIdType: " << sizeof(vtkIdType) << "\nSizeof smIdType: " << sizeof(smIdType) << "\n";
-    //
     anArray->SetNumberOfValues(aNbElem);
     myExtractUnstructuredGrid->BuildOut2InMap();
     for(vtkIdType anId = 0; anId < aNbElem; anId++)
index 1b04fe731bcbe274eae8f4057b8cbd599b82d7f7..150d89b5948805fcb7f88a222d26eb5224033532 100644 (file)
@@ -61,7 +61,7 @@ SMESH_NodeLabelActor::SMESH_NodeLabelActor()
 
   myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
   myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort());
-  myPtsLabeledDataMapper->SetLabelFormat("%d");
+  //myPtsLabeledDataMapper->SetLabelFormat("%d");
   myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
 
   myPtsTextProp = vtkTextProperty::New();
index dd72914b02a716193c6e05ebd0c8110d52247e7d..2d32fce9445067fbc55b1eb905f8617fdf5e7b95 100644 (file)
@@ -124,7 +124,7 @@ SMESH_SVTKActor
   myBallGrid->SetPoints( aSourceGrid->GetPoints() );
   my0DGrid->SetPoints( aSourceGrid->GetPoints() );
 
-  int aNbOfParts = theMapIndex.Extent();
+  vtkIdType aNbOfParts = theMapIndex.Extent();
 
   vtkCellData* cd = 0;
   vtkCellData* outputCD = 0;
@@ -134,8 +134,8 @@ SMESH_SVTKActor
     cd = aSourceGrid->GetCellData();
   }
   outputCD->CopyAllocate(cd,aNbOfParts,aNbOfParts/2);
-  for(int ind = 1; ind <= aNbOfParts; ind++){
-    int aPartId = theMapIndex( ind );
+  for(vtkIdType ind = 1; ind <= aNbOfParts; ind++){
+       vtkIdType aPartId = theMapIndex( ind );
     if(vtkCell* aCell = theMapActor->GetElemCell(aPartId))
     {
       if (aCell->GetCellType() != VTK_POLYHEDRON)
index 2dc454d819a52ed4fffb6726f791dd8b21aa8da2..6964928d1769f6d7dd7b05ccbb13866c9ae305d0 100644 (file)
@@ -2213,15 +2213,19 @@ void SMESHGUI_GroupDlg::onSort()
   // PAL5412: sorts items in ascending by "string" value
   // myElements->sort(true);
   // myElements->update();
-  int i, k = myElements->count();
+  vtkIdType i, k = myElements->count();
   if (k > 0) {
     myIsBusy = true;
-    QList<int> aSelected;
-    std::vector<int> anArray(k);
+    QList<vtkIdType> aSelected;
+    std::vector<vtkIdType> anArray(k);
     //    QMemArray<int> anArray(k);
     // fill the array
     for (i = 0; i < k; i++) {
-      int id = myElements->item(i)->text().toInt();
+         vtkIdType id;
+         if (sizeof(vtkIdType)==8)
+               id = myElements->item(i)->text().toLongLong();
+         else
+               id = myElements->item(i)->text().toInt();
       anArray[i] = id;
       if (myElements->item(i)->isSelected())
         aSelected.append(id);
index 1cc4206eb24f643681bdbd412599b622a114b431..865f10a650e3724f2021e0094f5fb8432d3100d6 100644 (file)
@@ -1211,7 +1211,7 @@ namespace SMESH
     SVTK_TIndexedMapOfVtkId aMapIndex;
     theSelector->GetIndex(theIO,aMapIndex);
 
-    typedef std::set<int> TIdContainer;
+    typedef std::set<vtkIdType> TIdContainer;
     TIdContainer anIdContainer;
     for( int i = 1; i <= aMapIndex.Extent(); i++)
       anIdContainer.insert(aMapIndex(i));