]> SALOME platform Git repositories - modules/homard.git/blobdiff - src/HOMARDGUI/MonEditIteration.cxx
Salome HOME
Copyright update 2022
[modules/homard.git] / src / HOMARDGUI / MonEditIteration.cxx
index d8f1a99b81b5131bdacb5e12ab83350f50cf8dc6..5202b3596437a1c42dda38a2de5cc729108355fb 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2011-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,8 +17,6 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-using namespace std;
-
 #include "MonEditIteration.h"
 
 #include "SalomeApp_Tools.h"
@@ -26,6 +24,7 @@ using namespace std;
 #include "HomardQtCommun.h"
 #include <utilities.h>
 
+using namespace std;
 
 // -------------------------------------------------------------------------------------------------------------------------------------
 MonEditIteration::MonEditIteration ( QWidget* parent, bool modal,
@@ -82,7 +81,6 @@ void MonEditIteration::InitValEdit0(int etat)
 //    Invisibilite des hypotheses et des champs
       Hypothese->setVisible(0);
       GBField->setVisible(0);
-      adjustSize();
 //
 }
 // ------------------------------
@@ -94,32 +92,32 @@ void MonEditIteration::InitValEdit()
   LEName->setText(_IterationName);
   LEName->setReadOnly(true);
 
-//    Affichage bloque du nom de l'iteration parent
+  //    Affichage bloque du nom de l'iteration parent
   _IterParentName = aIter->GetIterParentName();
   LEIterationParentName->setText(_IterParentName);
   LEIterationParentName->setReadOnly(true);
   PBIterParent->setEnabled(false);
   PBIterParent->setVisible(0);
 
-//    Affichage bloque du nom du maillage de l'iteration parent
+  //    Affichage bloque du nom du maillage de l'iteration parent
   aIterParent = myHomardGen->GetIteration(_IterParentName.toStdString().c_str());
   QString MeshNameParent = aIterParent->GetMeshName();
   LEMeshName_n->setText(MeshNameParent);
   LEMeshName_n->setReadOnly(1);
 
-//    Affichage bloque du nom du maillage de l'iteration courante
+  //    Affichage bloque du nom du maillage de l'iteration courante
   QString MeshName = aIter->GetMeshName();
   LEMeshName_np1->setText(MeshName);
   LEMeshName_np1->setReadOnly(1);
 
-//    Affichage de la bonne hypothese
+  //    Affichage de la bonne hypothese
   QString HypoName = aIter->GetHypoName();
   CBHypothese->insertItem(0,HypoName);
   CBHypothese->setCurrentIndex(0);
   CBHypothese->setEnabled(false);
   PBHypoNew->setVisible(0);
 
-//    Pour une adaptation selon un champ
+  //    Pour une adaptation selon un champ
   HOMARD::HOMARD_Hypothesis_var myHypo = myHomardGen->GetHypothesis(HypoName.toStdString().c_str()) ;
   _aTypeAdap = myHypo->GetAdapType() ;
   if ( _aTypeAdap == 1 )
@@ -131,7 +129,7 @@ void MonEditIteration::InitValEdit()
     _rank = aIter->GetRank() ;
     SpinBox_Rank->setValue(_rank);
 
-// Cas ou on prend le dernier pas de temps ou sans pas de temps
+  // Cas ou on prend le dernier pas de temps ou sans pas de temps
     if ( _step <= -1 )
     {
       Rank->setVisible(0);
@@ -143,7 +141,7 @@ void MonEditIteration::InitValEdit()
       else               { RBNo->setChecked(true); }
     }
 
-// Cas avec pas de temps
+  // Cas avec pas de temps
     else
     {
       Rank->setVisible(1);
@@ -157,6 +155,7 @@ void MonEditIteration::InitValEdit()
   {
     GBField->setVisible(0);
   }
+//
   adjustSize();
 //
 }
@@ -168,8 +167,8 @@ bool MonEditIteration::PushOnApply()
   if ( _aTypeAdap ==  1)
   {
 // Pour du raffinement selon un champ, les instants ont-ils change ?
-    if ( (_FieldFile != LEFieldFile->text().trimmed()) or
-       (  _rank != SpinBox_Rank->value())  or
+    if ( (_FieldFile != LEFieldFile->text().trimmed()) ||
+       (  _rank != SpinBox_Rank->value())  ||
        (  _step != SpinBox_TimeStep->value()))
     {
       _FieldFile = LEFieldFile->text().trimmed();