X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MeshPatternDlg.cxx;h=205b5b3463539608e70d41bcd577e0dadaa850d3;hb=7d9ae6b54f5ec98fff137636f7ad2a60d10ce6b6;hp=f040d82a14c2c26aac834714173a6aa1c7a12c60;hpb=b33324fe602b1fe1158c14a866c3802df12370fa;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index f040d82a1..205b5b346 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -47,7 +47,7 @@ #include "SUIT_Desktop.h" #include "SUIT_FileDlg.h" -#include "SalomeApp_SelectionMgr.h" +#include "LightApp_SelectionMgr.h" #include "SalomeApp_Tools.h" #include "SalomeApp_Study.h" @@ -127,7 +127,7 @@ SMESHGUI_MeshPatternDlg::SMESHGUI_MeshPatternDlg( SMESHGUI* theModule, myCreationDlg = 0; mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector(); - + Init(); } @@ -414,8 +414,7 @@ bool SMESHGUI_MeshPatternDlg::onApply() bool toCreatePolygons = myCreatePolygonsChk->isChecked(); bool toCreatePolyedrs = myCreatePolyedrsChk->isChecked(); if ( myPattern->MakeMesh( myMesh, toCreatePolygons, toCreatePolyedrs ) ) { - mySelectionMgr->clearSelected(); - SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI ); + //mySelectionMgr->clearSelected(); bool autoUpdate = SMESHGUI::automaticUpdate(); if (!isRefine() && autoUpdate) { _PTR(SObject) aSO = SMESH::FindSObject(myMesh.in()); @@ -429,7 +428,7 @@ bool SMESHGUI_MeshPatternDlg::onApply() } } SMESH::UpdateView(); - + mySMESHGUI->updateObjBrowser(true); return true; } else { @@ -740,7 +739,10 @@ void SMESHGUI_MeshPatternDlg::onOkCreationDlg() { myPattern = SMESH::SMESH_Pattern::_duplicate(myCreationDlg->GetPattern()); myName->setText(myCreationDlg->GetPatternName()); + + updateWgState(); displayPreview(); + setEnabled(true); myIsCreateDlgOpen = false; } @@ -934,7 +936,7 @@ void SMESHGUI_MeshPatternDlg::updateWgState() } QValueList ids; - if (!CORBA::is_nil(myPattern) && getIds(ids)) { + if (!CORBA::is_nil(myPattern)/* && getIds(ids)*/) { SMESH::long_array_var keyPoints = myPattern->GetKeyPoints(); if (keyPoints->length()) { myNode1->setEnabled(true); @@ -1265,9 +1267,9 @@ void SMESHGUI_MeshPatternDlg::onTextChanged (const QString& theNewText) if (aMesh) { QStringList aListId = QStringList::split(" ", theNewText, false); - + TColStd_MapOfInteger newIndices; - + for (int i = 0; i < aListId.count(); i++) { const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()); if (e && e->GetType() == (myType == Type_2d ? SMDSAbs_Face : SMDSAbs_Volume)) @@ -1279,6 +1281,8 @@ void SMESHGUI_MeshPatternDlg::onTextChanged (const QString& theNewText) } myBusy = false; + + displayPreview(); } //=======================================================================