Salome HOME
Merge V9_dev branch into master
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_BuildCompoundDlg.cxx
index 0f6172b0565506a732e4237573ed02707a56e458..1791c6b3a019bcd6826094ed8f59d6dcf16ba082 100644 (file)
@@ -135,7 +135,7 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
   CheckBoxMerge = new QCheckBox(tr("MERGE_NODES_AND_ELEMENTS"), GroupArgs);
 
   TextLabelTol = new QLabel(tr("SMESH_TOLERANCE"), GroupArgs);
-  TextLabelTol->setAlignment(Qt::AlignCenter);
+  //TextLabelTol->setAlignment(Qt::AlignCenter);
   SpinBoxTol = new SMESHGUI_SpinBox(GroupArgs);
   SpinBoxTol->RangeStepAndValidator(0.0, COORD_MAX, 0.00001, "len_tol_precision" );
 
@@ -146,8 +146,8 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
   GroupArgsLayout->addWidget(ComboBoxUnion,   1, 3);
   GroupArgsLayout->addWidget(CheckBoxCommon,  2, 0, 1, 4);
   GroupArgsLayout->addWidget(CheckBoxMerge,   3, 0, 1, 4);
-  GroupArgsLayout->addWidget(TextLabelTol,    4, 0, 1, 2);
-  GroupArgsLayout->addWidget(SpinBoxTol,      4, 2, 1, 2);
+  GroupArgsLayout->addWidget(TextLabelTol,    4, 0);
+  GroupArgsLayout->addWidget(SpinBoxTol,      4, 1, 1, 3);
 
   /***************************************************************/
   GroupButtons = new QGroupBox(this);
@@ -179,7 +179,7 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
   aTopLayout->addWidget(GroupArgs);
   aTopLayout->addWidget(GroupButtons);
 
-  myHelpFileName = "building_compounds_page.html";
+  myHelpFileName = "building_compounds.html";
 
   Init(); // Initialisations
 }
@@ -250,10 +250,7 @@ QString SMESHGUI_BuildCompoundDlg::GetDefaultName(const QString& theOperation)
   QString aName = "";
 
   // collect all object names of SMESH component
-  SalomeApp_Study* appStudy =
-    dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
-  if ( !appStudy ) return aName;
-  _PTR(Study) aStudy = appStudy->studyDS();
+  _PTR(Study) aStudy = SMESH::getStudy();
 
   std::set<std::string> aSet;
   _PTR(SComponent) aMeshCompo (aStudy->FindComponent("SMESH"));
@@ -283,12 +280,14 @@ QString SMESHGUI_BuildCompoundDlg::GetDefaultName(const QString& theOperation)
 //=================================================================================
 bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
 {
-  if (mySMESHGUI->isActiveStudyLocked())
+  if (SMESHGUI::isStudyLocked())
     return false;
 
   if (!isValid())
     return false;
 
+  SUIT_OverrideCursor aWaitCursor;
+
   SMESH::SMESH_Mesh_var aMesh;
 
   if (!myMesh->_is_nil())
@@ -298,7 +297,6 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
 
     QStringList anEntryList;
     try {
-      SUIT_OverrideCursor aWaitCursor;
 
       aMesh = myMeshArray[0]->GetMesh();
       aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
@@ -334,7 +332,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
       SMESH::UpdateView();
 
       _PTR(SObject) aSO = SMESH::FindSObject(aMesh.in());
-      if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) ) {
+      if ( SMESH_Actor* anActor = SMESH::CreateActor( aSO->GetID().c_str()) ) {
         SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
         SMESH::UpdateView();
       }