mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
52943: "Apply and Close" button does not active on symmetry dialog box
Fix same pb in all similar dlg
This commit is contained in:
parent
abd8d64dea
commit
7b33b10e89
@ -494,6 +494,9 @@ void SMESHGUI_CopyMeshDlg::onTextChange (const QString& theNewText)
|
||||
void SMESHGUI_CopyMeshDlg::SelectionIntoArgument()
|
||||
{
|
||||
if (myBusy) return;
|
||||
if (myFilterDlg && myFilterDlg->isVisible()) return; // filter dlg active
|
||||
if (!GroupButtons->isEnabled()) return; // inactive
|
||||
|
||||
BusyLocker lock( myBusy );
|
||||
|
||||
// clear
|
||||
@ -677,6 +680,15 @@ void SMESHGUI_CopyMeshDlg::setFilters()
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
QList<int> types;
|
||||
if ( myMesh->NbEdges() ) types << SMESH::EDGE;
|
||||
if ( myMesh->NbFaces() ) types << SMESH::FACE;
|
||||
if ( myMesh->NbVolumes() ) types << SMESH::VOLUME;
|
||||
if ( myMesh->NbBalls() ) types << SMESH::BALL;
|
||||
if ( myMesh->Nb0DElements()) types << SMESH::ELEM0D;
|
||||
if ( types.count() > 1 ) types << SMESH::ALL;
|
||||
|
||||
myFilterDlg->Init( types );
|
||||
myFilterDlg->SetSelection();
|
||||
myFilterDlg->SetMesh( myMesh );
|
||||
myFilterDlg->SetSourceWg( myLineEditElements );
|
||||
|
@ -299,14 +299,14 @@ void SMESHGUI_Make2DFrom3DOp::selectionDone()
|
||||
myDlg->selectObject( names, types, ids );
|
||||
|
||||
// enable/desable "new mesh" button
|
||||
bool isMesh = true; // EAP - it's sometimes necessary to copy to a new mesh
|
||||
// for ( int i = 0; i < ids.count() && isMesh; ++i )
|
||||
// {
|
||||
// _PTR(SObject) sobj =
|
||||
// SMESHGUI::activeStudy()->studyDS()->FindObjectID( ids[i].toLatin1().constData() );
|
||||
// mySrcMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( sobj );
|
||||
// isMesh = !mySrcMesh->_is_nil();
|
||||
// }
|
||||
bool isMesh = true;
|
||||
for ( int i = 0; i < ids.count() && isMesh; ++i )
|
||||
{
|
||||
_PTR(SObject) sobj =
|
||||
SMESHGUI::activeStudy()->studyDS()->FindObjectID( ids[i].toLatin1().constData() );
|
||||
mySrcMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( sobj );
|
||||
//isMesh = !mySrcMesh->_is_nil(); // EAP - it's sometimes necessary to copy to a new mesh
|
||||
}
|
||||
myDlg->setNewMeshEnabled( isMesh );
|
||||
}
|
||||
catch ( const SALOME::SALOME_Exception& S_ex ) {
|
||||
|
@ -377,7 +377,7 @@ void SMESHGUI_RemoveElementsDlg::onTextChange(const QString& theNewText)
|
||||
void SMESHGUI_RemoveElementsDlg::SelectionIntoArgument()
|
||||
{
|
||||
if (myBusy) return; // busy
|
||||
if (myFilterDlg && myFilterDlg->isVisible()) return; // filter digl active
|
||||
if (myFilterDlg && myFilterDlg->isVisible()) return; // filter dlg active
|
||||
if (!GroupButtons->isEnabled()) return; // inactive
|
||||
|
||||
// clear
|
||||
|
@ -677,6 +677,7 @@ void SMESHGUI_RotationDlg::onTextChange (const QString& theNewText)
|
||||
void SMESHGUI_RotationDlg::SelectionIntoArgument()
|
||||
{
|
||||
if (myBusy) return;
|
||||
if (myFilterDlg && myFilterDlg->isVisible()) return; // filter dlg active
|
||||
|
||||
// clear
|
||||
myActor = 0;
|
||||
@ -1064,6 +1065,15 @@ void SMESHGUI_RotationDlg::setFilters()
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
QList<int> types;
|
||||
if ( myMeshes[0]->NbEdges() ) types << SMESH::EDGE;
|
||||
if ( myMeshes[0]->NbFaces() ) types << SMESH::FACE;
|
||||
if ( myMeshes[0]->NbVolumes() ) types << SMESH::VOLUME;
|
||||
if ( myMeshes[0]->NbBalls() ) types << SMESH::BALL;
|
||||
if ( myMeshes[0]->Nb0DElements()) types << SMESH::ELEM0D;
|
||||
if ( types.count() > 1 ) types << SMESH::ALL;
|
||||
|
||||
myFilterDlg->Init( types );
|
||||
myFilterDlg->SetSelection();
|
||||
myFilterDlg->SetMesh( myMeshes[0] );
|
||||
myFilterDlg->SetSourceWg( LineEditElements );
|
||||
|
@ -715,6 +715,8 @@ void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText)
|
||||
void SMESHGUI_ScaleDlg::SelectionIntoArgument()
|
||||
{
|
||||
if (myBusy) return;
|
||||
if (myFilterDlg && myFilterDlg->isVisible()) return; // filter dlg active
|
||||
|
||||
BusyLocker lock( myBusy );
|
||||
// clear
|
||||
myActor = 0;
|
||||
@ -1112,6 +1114,15 @@ void SMESHGUI_ScaleDlg::setFilters()
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
QList<int> types;
|
||||
if ( myMeshes[0]->NbEdges() ) types << SMESH::EDGE;
|
||||
if ( myMeshes[0]->NbFaces() ) types << SMESH::FACE;
|
||||
if ( myMeshes[0]->NbVolumes() ) types << SMESH::VOLUME;
|
||||
if ( myMeshes[0]->NbBalls() ) types << SMESH::BALL;
|
||||
if ( myMeshes[0]->Nb0DElements()) types << SMESH::ELEM0D;
|
||||
if ( types.count() > 1 ) types << SMESH::ALL;
|
||||
|
||||
myFilterDlg->Init( types );
|
||||
myFilterDlg->SetSelection();
|
||||
myFilterDlg->SetMesh( myMeshes[0] );
|
||||
myFilterDlg->SetSourceWg( LineEditElements );
|
||||
|
@ -566,6 +566,7 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText)
|
||||
void SMESHGUI_SmoothingDlg::SelectionIntoArgument()
|
||||
{
|
||||
if (myBusy) return;
|
||||
if (myFilterDlg && myFilterDlg->isVisible()) return; // filter dlg active
|
||||
|
||||
// clear
|
||||
QString aString = "";
|
||||
@ -574,7 +575,8 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument()
|
||||
BusyLocker lock( myBusy );
|
||||
|
||||
if (myEditCurrentArgument == LineEditElements ||
|
||||
myEditCurrentArgument == LineEditNodes) {
|
||||
myEditCurrentArgument == LineEditNodes)
|
||||
{
|
||||
myEditCurrentArgument->setText(aString);
|
||||
if (myEditCurrentArgument == LineEditElements) {
|
||||
myNbOkElements = 0;
|
||||
|
@ -736,6 +736,7 @@ void SMESHGUI_SymmetryDlg::onTextChange (const QString& theNewText)
|
||||
void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
|
||||
{
|
||||
if (myBusy) return;
|
||||
if (myFilterDlg && myFilterDlg->isVisible()) return; // filter dlg active
|
||||
|
||||
// clear
|
||||
myActor = 0;
|
||||
@ -1134,6 +1135,15 @@ void SMESHGUI_SymmetryDlg::setFilters()
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
QList<int> types;
|
||||
if ( myMeshes[0]->NbEdges() ) types << SMESH::EDGE;
|
||||
if ( myMeshes[0]->NbFaces() ) types << SMESH::FACE;
|
||||
if ( myMeshes[0]->NbVolumes() ) types << SMESH::VOLUME;
|
||||
if ( myMeshes[0]->NbBalls() ) types << SMESH::BALL;
|
||||
if ( myMeshes[0]->Nb0DElements()) types << SMESH::ELEM0D;
|
||||
if ( types.count() > 1 ) types << SMESH::ALL;
|
||||
|
||||
myFilterDlg->Init( types );
|
||||
myFilterDlg->SetSelection();
|
||||
myFilterDlg->SetMesh( myMeshes[0] );
|
||||
myFilterDlg->SetSourceWg( LineEditElements );
|
||||
@ -1173,9 +1183,12 @@ bool SMESHGUI_SymmetryDlg::isValid()
|
||||
// function : onDisplaySimulation
|
||||
// purpose : Show/Hide preview
|
||||
//=================================================================================
|
||||
void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
if (myPreviewCheckBox->isChecked() && toDisplayPreview) {
|
||||
if ( myNbOkElements && isValid() && IsMirrorOk() ) {
|
||||
void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview )
|
||||
{
|
||||
if (myPreviewCheckBox->isChecked() && toDisplayPreview)
|
||||
{
|
||||
if ( myNbOkElements && isValid() && IsMirrorOk() )
|
||||
{
|
||||
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
|
||||
SMESH::long_array_var anElementsId = new SMESH::long_array;
|
||||
|
||||
@ -1220,7 +1233,9 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
||||
// function : getMirror
|
||||
// purpose : return mirror parameters
|
||||
//=================================================================================
|
||||
void SMESHGUI_SymmetryDlg::getMirror(SMESH::AxisStruct& theMirror, SMESH::SMESH_MeshEditor::MirrorType& theMirrorType) {
|
||||
void SMESHGUI_SymmetryDlg::getMirror(SMESH::AxisStruct& theMirror,
|
||||
SMESH::SMESH_MeshEditor::MirrorType& theMirrorType)
|
||||
{
|
||||
theMirror.x = SpinBox_X->GetValue();
|
||||
theMirror.y = SpinBox_Y->GetValue();
|
||||
theMirror.z = SpinBox_Z->GetValue();
|
||||
|
@ -745,6 +745,8 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText)
|
||||
void SMESHGUI_TranslationDlg::SelectionIntoArgument()
|
||||
{
|
||||
if (myBusy) return;
|
||||
if (myFilterDlg && myFilterDlg->isVisible()) return; // filter dlg active
|
||||
|
||||
BusyLocker lock( myBusy );
|
||||
// clear
|
||||
myActor = 0;
|
||||
@ -1106,6 +1108,15 @@ void SMESHGUI_TranslationDlg::setFilters()
|
||||
if ( !myFilterDlg )
|
||||
myFilterDlg = new SMESHGUI_FilterDlg( mySMESHGUI, SMESH::ALL );
|
||||
|
||||
QList<int> types;
|
||||
if ( myMeshes[0]->NbEdges() ) types << SMESH::EDGE;
|
||||
if ( myMeshes[0]->NbFaces() ) types << SMESH::FACE;
|
||||
if ( myMeshes[0]->NbVolumes() ) types << SMESH::VOLUME;
|
||||
if ( myMeshes[0]->NbBalls() ) types << SMESH::BALL;
|
||||
if ( myMeshes[0]->Nb0DElements()) types << SMESH::ELEM0D;
|
||||
if ( types.count() > 1 ) types << SMESH::ALL;
|
||||
|
||||
myFilterDlg->Init( types );
|
||||
myFilterDlg->SetSelection();
|
||||
myFilterDlg->SetMesh( myMeshes[0] );
|
||||
myFilterDlg->SetSourceWg( LineEditElements );
|
||||
@ -1147,9 +1158,10 @@ bool SMESHGUI_TranslationDlg::isValid()
|
||||
//=================================================================================
|
||||
void SMESHGUI_TranslationDlg::onDisplaySimulation( bool toDisplayPreview )
|
||||
{
|
||||
if (myPreviewCheckBox->isChecked() && toDisplayPreview) {
|
||||
|
||||
if (isValid() && myNbOkElements) {
|
||||
if (myPreviewCheckBox->isChecked() && toDisplayPreview)
|
||||
{
|
||||
if (isValid() && myNbOkElements)
|
||||
{
|
||||
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
|
||||
|
||||
SMESH::long_array_var anElementsId = new SMESH::long_array;
|
||||
|
Loading…
Reference in New Issue
Block a user