X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARDGUI%2FMonEditCase.cxx;h=d6304c54ce7a6959a36af2fe7fd2d5862eb8ed40;hb=544c1b539d74424d9404eecc323dc0263800d0f9;hp=c4e8c7606bf7b90fb5cf66442f28f5d56428afa1;hpb=2c82da385bf3d7b6a045dfe7620d4b9bdc154fe6;p=modules%2Fhomard.git diff --git a/src/HOMARDGUI/MonEditCase.cxx b/src/HOMARDGUI/MonEditCase.cxx index c4e8c760..d6304c54 100644 --- a/src/HOMARDGUI/MonEditCase.cxx +++ b/src/HOMARDGUI/MonEditCase.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2016 CEA/DEN, EDF R&D +// Copyright (C) 2011-2020 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 @@ -74,31 +74,43 @@ void MonEditCase::InitValEdit() RBNonConforme->setEnabled(false); int ExtType=aCase->GetExtType(); -// Non affichage du mode de suivi de frontiere - CBBoundaryA->setVisible(0); - GBBoundaryA->setVisible(0); + +// Suivi de frontiere +// A priori, aucun affichage + GBTypeBoun->setVisible(0); CBBoundaryD->setVisible(0); + CBBoundaryA->setVisible(0); + GBBoundaryC->setVisible(0); GBBoundaryD->setVisible(0); - + GBBoundaryA->setVisible(0); // On passe en revue tous les couples (frontiere,groupe) du cas HOMARD::ListBoundaryGroupType_var mesBoundarys = aCase->GetBoundaryGroup(); if (mesBoundarys->length()>0) { QStringList ListeFron ; QString NomFron ; + bool BounCAO = false ; bool BounDi = false ; bool BounAn = false ; for (int i=0; ilength(); i++) { -// Nom de la frontiere +// Nom de la frontiere NomFron = mesBoundarys[i++]; MESSAGE("NomFron "<GetBoundary(NomFron.toStdString().c_str()); int type_obj = myBoundary->GetType() ; + MESSAGE("type_obj "<addItem(NomFron); + } // C'est une frontiere discrete // Rermarque : on ne gere pas les groupes - if ( type_obj==0 ) + else if ( type_obj==0 ) { BounDi = true ; CBBoundaryDi->addItem(NomFron); @@ -138,9 +150,23 @@ void MonEditCase::InitValEdit() TWBoundary->item( 0, ok )->setCheckState( Qt::Checked ); } } - MESSAGE("BounDi "<setVisible(1); + if ( BounCAO ) + { RBBoundaryCAO->setChecked(true); + GBBoundaryC->setVisible(1); + CBBoundaryCAO->setDisabled(true); + PBBoundaryCAONew->setVisible(0); + PBBoundaryCAOHelp->setVisible(0); } + if ( BounDi ) + { RBBoundaryNonCAO->setChecked(true); + GBBoundaryD->setVisible(1); + CBBoundaryDi->setDisabled(true); + PBBoundaryDiNew->setVisible(0); + PBBoundaryDiHelp->setVisible(0); } if ( BounAn ) - { GBBoundaryA->setVisible(1); + { RBBoundaryNonCAO->setChecked(true); + GBBoundaryA->setVisible(1); // On rend les cases non modifiables. // On ne peut pas le faire pour tout le tableau sinon on perd l'ascenseur ! int nbcol = TWBoundary->columnCount(); @@ -155,11 +181,9 @@ void MonEditCase::InitValEdit() PBBoundaryAnNew->setVisible(0); PBBoundaryAnHelp->setVisible(0); } - if ( BounDi ) - { GBBoundaryD->setVisible(1); - CBBoundaryDi->setDisabled(true); - PBBoundaryDiNew->setVisible(0); - PBBoundaryDiHelp->setVisible(0); } + RBBoundaryNo->setEnabled(false); + RBBoundaryCAO->setEnabled(false); + RBBoundaryNonCAO->setEnabled(false); } // // Les options avancees (non modifiables) @@ -210,10 +234,13 @@ void MonEditCase::InitValEdit() else { GBFormat->setVisible(1); RBMED->setVisible(1); + RBSaturne->setVisible(1); RBSaturne2D->setVisible(1); - RBSaturne2D->setChecked(true); + if ( ExtType == 1 ) { RBSaturne->setChecked(true); } + else { RBSaturne2D->setChecked(true); } } RBMED->setEnabled(false); + RBSaturne->setEnabled(false); RBSaturne2D->setEnabled(false); } else