Salome HOME
merge from V5_1_3rc5
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SingleEditDlg.cxx
index 6a27b17a337f9e4003e8abe4f74cc0847d8520e5..a99a2ae960200e60900be898299e3690fa380797 100755 (executable)
@@ -278,10 +278,10 @@ void SMESHGUI_SingleEditDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -348,13 +348,13 @@ void SMESHGUI_SingleEditDlg::onTextChange (const QString& theNewText)
 
       int id1, id2;
       if ( !getNodeIds(myEdge->text(), id1, id2) )
-       return;
+        return;
 
       const SMDS_MeshNode* aNode1 = aMesh->FindNode( id1 );
       const SMDS_MeshNode* aNode2 = aMesh->FindNode( id2 );
 
       if ( !aNode1 || !aNode2 || aNode1 == aNode2 )
-       return;
+        return;
 
       // find a triangle and an edge index
       const SMDS_MeshElement* tria1;
@@ -362,23 +362,23 @@ void SMESHGUI_SingleEditDlg::onTextChange (const QString& theNewText)
 
       if ( findTriangles(aNode1,aNode2,tria1,tria2) )
       {
-       newIndices.Add(tria1->GetID());
-
-       const SMDS_MeshNode* a3Nodes[3];
-       SMDS_ElemIteratorPtr it;
-       int edgeInd = 2, i;
-       for (i = 0, it = tria1->nodesIterator(); it->more(); i++) {
-         a3Nodes[ i ] = static_cast<const SMDS_MeshNode*>(it->next());
-         if (i > 0 && ( a3Nodes[ i ] == aNode1 && a3Nodes[ i - 1] == aNode2 ||
-                        a3Nodes[ i ] == aNode2 && a3Nodes[ i - 1] == aNode1 ) ) {
-           edgeInd = i - 1;
-           break;
-         }
-       }
-       newIndices.Add(-edgeInd-1);
-       
-       myOkBtn->setEnabled(true);
-       myApplyBtn->setEnabled(true);
+        newIndices.Add(tria1->GetID());
+
+        const SMDS_MeshNode* a3Nodes[3];
+        SMDS_ElemIteratorPtr it;
+        int edgeInd = 2, i;
+        for (i = 0, it = tria1->nodesIterator(); it->more(); i++) {
+          a3Nodes[ i ] = static_cast<const SMDS_MeshNode*>(it->next());
+          if (i > 0 && ( a3Nodes[ i ] == aNode1 && a3Nodes[ i - 1] == aNode2 ||
+                         a3Nodes[ i ] == aNode2 && a3Nodes[ i - 1] == aNode1 ) ) {
+            edgeInd = i - 1;
+            break;
+          }
+        }
+        newIndices.Add(-edgeInd-1);
+        
+        myOkBtn->setEnabled(true);
+        myApplyBtn->setEnabled(true);
       }
       mySelector->AddOrRemoveIndex(anIO,newIndices, false);
       SMESH::GetViewWindow(mySMESHGUI)->highlight( anIO, true, true );
@@ -416,17 +416,17 @@ void SMESHGUI_SingleEditDlg::onSelectionDone()
     {
       const SMDS_MeshElement* tria[2];
       if( SMESH::GetEdgeNodes( mySelector, aVisualObj, anId1, anId2 ) >= 1 &&
-         findTriangles( aMesh->FindNode( anId1 ), aMesh->FindNode( anId2 ), tria[0],tria[1] ) )
+          findTriangles( aMesh->FindNode( anId1 ), aMesh->FindNode( anId2 ), tria[0],tria[1] ) )
       {
-       QString aText = QString("%1-%2").arg(anId1).arg(anId2);
-       myEdge->setText(aText);
-       
-       myOkBtn->setEnabled(true);
-       myApplyBtn->setEnabled(true);
+        QString aText = QString("%1-%2").arg(anId1).arg(anId2);
+        myEdge->setText(aText);
+        
+        myOkBtn->setEnabled(true);
+        myApplyBtn->setEnabled(true);
       }
       else
       {
-       myEdge->clear();
+        myEdge->clear();
       }
     }
   }
@@ -494,8 +494,8 @@ bool SMESHGUI_SingleEditDlg::onApply()
 
   if (aMesh->_is_nil()) {
     SUIT_MessageBox::information(SMESH::GetDesktop(mySMESHGUI), 
-                                tr("SMESH_ERROR"),
-                                tr("SMESHG_NO_MESH"));
+                                 tr("SMESH_ERROR"),
+                                 tr("SMESHG_NO_MESH"));
     return false;
   }