X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MultiEditDlg.cxx;h=e42a8389dc2383dfe70e7f75ac97817df9e0ee55;hp=a252ce333238a2c3080adcea34843c64534c507b;hb=0631ddc21db91465a4fbf2b9b2e9f69b0d45f24f;hpb=f500e5a8b62895e81275f73d8fecd7a977711d78 diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index a252ce333..e42a8389d 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // 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 @@ -53,7 +53,6 @@ #include #include #include -#include #include #include @@ -739,7 +738,7 @@ void SMESHGUI_MultiEditDlg::updateButtons() bool isListBoxNonEmpty = myListBox->count() > 0; bool isToAll = myToAllChk->isChecked(); myFilterBtn->setEnabled(!isToAll); - myRemoveBtn->setEnabled(isListBoxNonEmpty && !isToAll); + myRemoveBtn->setEnabled(myListBox->selectedItems().count() && !isToAll); mySortBtn->setEnabled(isListBoxNonEmpty &&!isToAll); const SALOME_ListIO& aList = mySelector->StoredIObjects(); @@ -859,6 +858,8 @@ void SMESHGUI_MultiEditDlg::onListSelectionChanged() mySelector->AddOrRemoveIndex(anActor->getIO(),anIndexes,false); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->highlight(anActor->getIO(),true,true); + + myRemoveBtn->setEnabled( anIndexes.Extent() ); } //======================================================================= @@ -1635,16 +1636,18 @@ bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, aParameters << myDirSpin[2]->text(); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); - SMESH::AxisStruct_var axis = new SMESH::AxisStruct; - axis->x = myPointSpin[0]->GetValue(); - axis->y = myPointSpin[1]->GetValue(); - axis->z = myPointSpin[2]->GetValue(); - axis->vx = myDirSpin[0]->GetValue(); - axis->vy = myDirSpin[1]->GetValue(); - axis->vz = myDirSpin[2]->GetValue(); - - theEditor->SplitHexahedraIntoPrisms( obj, myGroupChoice->checkedId()+1, - axis, myAllDomainsChk->isChecked() ); + SMESH::PointStruct_var point = new SMESH::PointStruct; + point->x = myPointSpin[0]->GetValue(); + point->y = myPointSpin[1]->GetValue(); + point->z = myPointSpin[2]->GetValue(); + SMESH::DirStruct_var norm = new SMESH::DirStruct; + norm->PS.x = myDirSpin[0]->GetValue(); + norm->PS.y = myDirSpin[1]->GetValue(); + norm->PS.z = myDirSpin[2]->GetValue(); + + theEditor->SplitHexahedraIntoPrisms( obj, point, norm, + myGroupChoice->checkedId()+1, + myAllDomainsChk->isChecked() ); } else { @@ -1698,6 +1701,10 @@ void SMESHGUI_SplitVolumesDlg::on3d2dChanged(int isPrism) } SMESHGUI_MultiEditDlg::on3d2dChanged( !myEntityType ); myEntityType = 1; // == VOLUME + myChoiceWidget->hide(); + myChoiceWidget->show(); + resize(minimumSizeHint()); + onSelectionDone(); } //================================================================================ @@ -1788,6 +1795,8 @@ void SMESHGUI_SplitVolumesDlg::onSelectionDone() } updateButtons(); } + + myCriterionGrp->setEnabled( !myMesh->_is_nil() && nbElemsInMesh() > 0 ); } //================================================================================