X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_CreateHypothesesDlg.cxx;h=19d6b90fa9686a0f3c85ca7a7f7c6e25912cc3dd;hb=8180647ca3a2e8982413db46c9b6b524367ef70e;hp=fd494fb60bc3562132467df521c9021614ae3fa6;hpb=c3bf92bd87b770fd81631a3853f7f5bb1ac6a4e8;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.cxx b/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.cxx index fd494fb60..19d6b90fa 100644 --- a/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.cxx @@ -25,15 +25,6 @@ // Module : SMESH // $Header$ -using namespace std; -#include "SMESHGUI_CreateHypothesesDlg.h" -#include "SMESHGUI.h" -#include "SALOME_ListIteratorOfListIO.hxx" - -#include "QAD_Application.h" -#include "QAD_Desktop.h" -#include "utilities.h" - // QT Includes #include #include @@ -42,6 +33,21 @@ using namespace std; #include #include +#include "QAD_Application.h" +#include "QAD_Desktop.h" + +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "SMESHGUI_CreateHypothesesDlg.h" +#include "SMESHGUI_HypothesesUtils.h" +#include "SMESHGUI_Hypotheses.h" +#include "SMESHGUI_Utils.h" +#include "SMESHGUI.h" + +#include "utilities.h" + +using namespace std; + //================================================================================= // class : SMESHGUI_CreateHypothesesDlg() // purpose : Constructs a SMESHGUI_CreateHypothesesDlg which is a child of 'parent', with the @@ -175,6 +181,8 @@ void SMESHGUI_CreateHypothesesDlg::ClickOnCancel() //================================================================================= void SMESHGUI_CreateHypothesesDlg::ClickOnApply() { + if (mySMESHGUI->ActiveStudyLocked()) + return; QListViewItem* item = ListAlgoDefinition->selectedItem(); if ( !item ) return; @@ -182,7 +190,7 @@ void SMESHGUI_CreateHypothesesDlg::ClickOnApply() MESSAGE("Apply " << aHypType); char* sHypType = (char*)aHypType.latin1(); - HypothesisData* aHypData = mySMESHGUI->GetHypothesisData(sHypType); + HypothesisData* aHypData = SMESH::GetHypothesisData(sHypType); if ( !aHypData ) return; QString aClientLibName = aHypData->ClientLibName; @@ -192,13 +200,13 @@ void SMESHGUI_CreateHypothesesDlg::ClickOnApply() { // Call hypothesis creation server method (without GUI) QString aHypName = aHypData->Label; - mySMESHGUI->CreateHypothesis(sHypType, aHypName, myIsAlgo); + SMESH::CreateHypothesis(sHypType, aHypName, myIsAlgo); } else { // Get hypotheses creator client (GUI) SMESHGUI_GenericHypothesisCreator* aCreator = - mySMESHGUI->GetHypothesisCreator(sHypType); + SMESH::GetHypothesisCreator(sHypType); // Create hypothesis/algorithm aCreator->CreateHypothesis(myIsAlgo, this); @@ -266,9 +274,9 @@ void SMESHGUI_CreateHypothesesDlg::onDoubleClicked(QListViewItem* i) void SMESHGUI_CreateHypothesesDlg::InitAlgoDefinition() { ListAlgoDefinition->clear(); - QStringList HypList = mySMESHGUI->GetAvailableHypotheses(myIsAlgo); + QStringList HypList = SMESH::GetAvailableHypotheses(myIsAlgo); for ( int i = 0; i < HypList.count(); ++i ) { - HypothesisData* aHypData = mySMESHGUI->GetHypothesisData( HypList[i] ); + HypothesisData* aHypData = SMESH::GetHypothesisData( HypList[i] ); QListViewItem* parentItem = 0; QListViewItem* childItem = ListAlgoDefinition->firstChild(); while ( childItem ) {