Salome HOME
54355: 'Compute' button is absent for 'Number of the double nodes' value in 'Mesh...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshInfo.cxx
index 57bd8236d37d1f2a449bc0c9f72c7396260067b7..34c737faf5fdd533c84526a18d1a95159dff5e6d 100644 (file)
@@ -610,11 +610,11 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
     myWidgets[i3DHexaPrisms][iTotal]        ->setProperty( "text", QString::number( info[SMDSEntity_Hexagonal_Prism] ));
     myWidgets[i3DPolyhedrons][iTotal]       ->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] ));
     long nbElemTotal       = info[SMDSEntity_0D] + info[SMDSEntity_Ball] + nbEdges + nb2DTotal + nb3DTotal;
-    long nbElemLinerial    = info[SMDSEntity_Edge] + nb2DLinear + nb3DLinear;
+    long nbElemLinearial   = info[SMDSEntity_Edge] + nb2DLinear + nb3DLinear;
     long nbElemQuadratic   = info[SMDSEntity_Quad_Edge] + nb2DQuadratic + nb3DQuadratic;
     long nbElemBiQuadratic = nb2DBiQuadratic + nb3DBiQuadratic;
     myWidgets[iNb][iTotal]      ->setProperty( "text", QString::number( nbElemTotal ));
-    myWidgets[iNb][iLinear]     ->setProperty( "text", QString::number( nbElemLinerial ));
+    myWidgets[iNb][iLinear]     ->setProperty( "text", QString::number( nbElemLinearial ));
     myWidgets[iNb][iQuadratic]  ->setProperty( "text", QString::number( nbElemQuadratic ));
     myWidgets[iNb][iBiQuadratic]->setProperty( "text", QString::number( nbElemBiQuadratic ));
     // before full loading from study file, type of elements in a sub-mesh can't be defined
@@ -2083,7 +2083,9 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         afunctor->SetMesh( actor()->GetObject()->GetMesh() );
         QTreeWidgetItem* minEdgeItem = createItem( cntrItem, Bold );
         minEdgeItem->setText( 0, tr( "MIN_ELEM_EDGE" ));
-        minEdgeItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) );
+        SMESH::Controls::TSequenceOfXYZ points;
+        afunctor->GetPoints( e, points ); // "non-standard" way, to make it work for all elem types
+        minEdgeItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( points )) );
 
         // gravity center
         XYZ gc = gravityCenter( e );
@@ -3247,12 +3249,6 @@ void SMESHGUI_MeshInfoDlg::showItemInfo( const QString& theStr )
 
 void SMESHGUI_MeshInfoDlg::dump()
 {
-  SUIT_Application* app = SUIT_Session::session()->activeApplication();
-  if ( !app ) return;
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study *>( app->activeStudy() );
-  if ( !appStudy ) return;
-  _PTR( Study ) aStudy = appStudy->studyDS();
-
   QStringList aFilters;
   aFilters.append( tr( "TEXT_FILES" ));
 
@@ -3580,17 +3576,17 @@ void SMESHGUI_CtrlInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
 
   // nodes info
   const CORBA::Long nbNodes =   nbElemsByType[ SMESH::NODE ];
-  const CORBA::Long nbElems = ( nbElemsByType[ SMESH::EDGE ] +
-                                nbElemsByType[ SMESH::FACE ] +
-                                nbElemsByType[ SMESH::VOLUME ] );
-  if ( nbNodes + nbElems > 0 ) {
-    if ( Max( (int)nbNodes, (int)nbElems ) <= ctrlLimit ) {
+  // const CORBA::Long nbElems = ( nbElemsByType[ SMESH::EDGE ] +
+  //                               nbElemsByType[ SMESH::FACE ] +
+  //                               nbElemsByType[ SMESH::VOLUME ] );
+  if ( nbNodes > 0 ) {
+    if ( nbNodes <= ctrlLimit ) {
       // free nodes
       computeFreeNodesInfo();
+      // node connectivity number
       computeNodesNbConnInfo();
       // double nodes
-      if ( Max( (int)mesh->NbNodes(), (int)mesh->NbElements() ) <= ctrlLimit )
-        computeDoubleNodesInfo();
+      computeDoubleNodesInfo();
     }
     else {
       myButtons[0]->setEnabled( true );
@@ -3599,7 +3595,7 @@ void SMESHGUI_CtrlInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
     }
   }
   else {
-    for( int i=2; i<=11; i++)
+    for( int i=2; i<=13; i++)
       myMainLayout->itemAt(i)->widget()->setVisible( false );
   }
 
@@ -3612,7 +3608,7 @@ void SMESHGUI_CtrlInfo::showInfo( SMESH::SMESH_IDSource_ptr obj )
       myButtons[3]->setEnabled( true );
   }
   else {
-    for( int i=11; i<=14; i++)
+    for( int i=14; i<=17; i++)
       myMainLayout->itemAt(i)->widget()->setVisible( false );
   }
  
@@ -4004,12 +4000,6 @@ void SMESHGUI_CtrlInfoDlg::deactivate()
  */
 void SMESHGUI_CtrlInfoDlg::dump()
 {
-  SUIT_Application* app = SUIT_Session::session()->activeApplication();
-  if ( !app ) return;
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study *>( app->activeStudy() );
-  if ( !appStudy ) return;
-  _PTR( Study ) aStudy = appStudy->studyDS();
-
   QStringList aFilters;
   aFilters.append( tr( "TEXT_FILES" ));