X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_SewingDlg.cxx;h=90b603534a3001e4ca7ad9ee4e28652abad27f40;hb=062f1da5dde14e9ca8755c2eda44cbe8850f1d3a;hp=b42b97e50142e8771d2d425ec16c2eb73f637808;hpb=879dbf686e7b6feb320b55d3e7b250394645f4cb;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx index b42b97e50..90b603534 100644 --- a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 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 @@ -19,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SMESH SMESHGUI : GUI for SMESH component // File : SMESHGUI_SewingDlg.cxx // Author : Michael ZORIN, Open CASCADE S.A.S. @@ -385,9 +386,9 @@ void SMESHGUI_SewingDlg::ConstructorsClicked (int constructorId) LineEdit5->setEnabled(false); if (!CheckBoxPolygons->isVisible()) - CheckBoxPolygons->show(); + CheckBoxPolygons->show(); if (!CheckBoxPolyedrs->isVisible()) - CheckBoxPolyedrs->show(); + CheckBoxPolyedrs->show(); myOk5 = true; @@ -412,7 +413,7 @@ void SMESHGUI_SewingDlg::ConstructorsClicked (int constructorId) SMESH::SetPointRepresentation(false); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->SetSelectionMode(CellSelection); + aViewWindow->SetSelectionMode(CellSelection); break; } } @@ -472,8 +473,8 @@ bool SMESHGUI_SewingDlg::ClickOnApply() LineEdit4->text().toLong(), LineEdit5->text().toLong(), LineEdit6->text().toLong(), - toCreatePolygons, - toCreatePolyedrs); + toCreatePolygons, + toCreatePolyedrs); else if (aConstructorId == 1) anError = aMeshEditor->SewConformFreeBorders(LineEdit1->text().toLong(), LineEdit2->text().toLong(), @@ -486,8 +487,8 @@ bool SMESHGUI_SewingDlg::ClickOnApply() LineEdit3->text().toLong(), LineEdit4->text().toLong(), LineEdit6->text().toLong(), - toCreatePolygons, - toCreatePolyedrs); + toCreatePolygons, + toCreatePolyedrs); else if (aConstructorId == 3) { QStringList aListElementsId1 = LineEdit1->text().split(" ", QString::SkipEmptyParts); QStringList aListElementsId2 = LineEdit4->text().split(" ", QString::SkipEmptyParts); @@ -532,6 +533,8 @@ bool SMESHGUI_SewingDlg::ClickOnApply() Init(); ConstructorsClicked(GetConstructorId()); + + SMESHGUI::Modified(); } } @@ -580,10 +583,10 @@ void SMESHGUI_SewingDlg::ClickOnHelp() 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)); } } @@ -632,15 +635,15 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText) SMESH::SetPointRepresentation(true); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->SetSelectionMode(NodeSelection); + aViewWindow->SetSelectionMode(NodeSelection); const SMDS_MeshNode * n = aMesh->FindNode(theNewText.toInt()); if (n) { - newIndices.Add(n->GetID()); - mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false); - if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->highlight( myActor->getIO(), true, true ); - + newIndices.Add(n->GetID()); + mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->highlight( myActor->getIO(), true, true ); + if (send == LineEdit1) myOk1 = true; else if (send == LineEdit2) @@ -658,7 +661,7 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText) SMESH::SetPointRepresentation(false); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->SetSelectionMode(CellSelection); + aViewWindow->SetSelectionMode(CellSelection); QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); @@ -667,8 +670,8 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText) for (int i = 0; i < aListId.count(); i++) { const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()); if (e) - newIndices.Add(e->GetID()); - + newIndices.Add(e->GetID()); + if (!isEvenOneExists) isEvenOneExists = true; } @@ -676,7 +679,7 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText) mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->highlight( myActor->getIO(), true, true ); + aViewWindow->highlight( myActor->getIO(), true, true ); if (isEvenOneExists) { if (send == LineEdit1)