X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MeshOp.cxx;h=10366f210c28e569e26ad3d491c402323a552968;hp=0b7f02dd7f25620476b9ae44480a8e3133dfee6c;hb=HEAD;hpb=3b570ddfbea2964cea7fe285a5722c45bf0675ee diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 0b7f02dd7..50132b41e 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -125,6 +125,57 @@ LightApp_Dialog* SMESHGUI_MeshOp::dlg() const return myDlg; } +//================================================================================ +/*! + * \brief Log meshers info +*/ +//================================================================================ +void SMESHGUI_MeshOp::logSmeshParams() +{ + QString mesherType; + int curMeshType = myDlg->currentMeshType(); + switch ( curMeshType ) { + case MT_ANY: + mesherType = "Any"; + break; + case MT_TRIANGULAR: + mesherType = "Triangular"; + break; + case MT_QUADRILATERAL: + mesherType = "Quadrilateral"; + break; + case MT_TETRAHEDRAL: + mesherType = "Tetrahedral"; + break; + case MT_HEXAHEDRAL: + mesherType = "Hexahedral"; + break; + default: + mesherType = ""; + } + + QString aMessage = QString("Mesh type is %1").arg(mesherType); + CAM_Application::logStructuredUserEvent( "Mesh", + "create mesh", + "", + "", + aMessage); + + for ( int dim = 0; dim <= 3; ++dim ) + { + HypothesisData * curAlgo = hypData( dim, Algo, currentHyp( dim, Algo )); + if(curAlgo) + { + aMessage = QString("%1D algorithm is %2").arg(dim).arg(curAlgo->Label); + CAM_Application::logStructuredUserEvent( "Mesh", + "create mesh", + "", + "", + aMessage); + } + } +} + //================================================================================ /*! * \brief Creates or edits mesh @@ -182,6 +233,7 @@ bool SMESHGUI_MeshOp::onApply() { if ( myToCreate ) setDefaultName(); + //connect(aAction, SIGNAL(triggered(bool)), this, SLOT(logSmeshParams())); } else { @@ -190,6 +242,7 @@ bool SMESHGUI_MeshOp::onApply() SUIT_MessageBox::warning( myDlg, tr( "SMESH_ERROR" ), aMess ); } + logSmeshParams(); myHypoSet = 0; return aResult; @@ -1292,6 +1345,7 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim, initHypCreator( aCreator ); myDlg->setEnabled( false ); + myDlg->hide(); aCreator->create(initParamHyp, aHypName, myDlg, this, SLOT( onHypoCreated( int ) ) ); dialog = true; } @@ -1323,6 +1377,7 @@ void SMESHGUI_MeshOp::onHypoCreated( int result ) int obj = myDlg->getActiveObject(); onActivateObject( obj ); // Issue 0020170. Restore filters myDlg->setEnabled( true ); + myDlg->show(); } _PTR(SComponent) aFather = SMESH::getStudy()->FindComponent("SMESH"); @@ -1379,6 +1434,7 @@ void SMESHGUI_MeshOp::onEditHyp( const int theHypType, const int theIndex ) removeCustomFilters(); // Issue 0020170 myDlg->setEnabled( false ); + myDlg->hide(); aCreator->edit( aHyp.in(), aHypItem.second, dlg(), this, SLOT( onHypoEdited( int ) ) ); } @@ -1397,6 +1453,7 @@ void SMESHGUI_MeshOp::onHypoEdited( int /*result*/ ) int obj = myDlg->getActiveObject(); onActivateObject( obj ); // Issue 0020170. Restore filters myDlg->setEnabled( true ); + myDlg->show(); } //================================================================================