Salome HOME
Python 3 porting & Multi-study removing
[plugins/gmshplugin.git] / src / GUI / GMSHPluginGUI_HypothesisCreator.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 4deb8e8..fded766
@@ -1,4 +1,5 @@
-// Copyright (C) 2012-2013  ALNEOS
+// Copyright (C) 2012-2015  ALNEOS
+// Copyright (C) 2016  EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -30,7 +31,7 @@
 
 #include <SalomeApp_Tools.h>
 #include <LightApp_SelectionMgr.h>
-#include <SALOME_ListIteratorOfListIO.hxx>
+#include <SALOME_ListIO.hxx>
 
 #include <QComboBox>
 #include <QLabel>
@@ -245,7 +246,11 @@ QFrame* GMSHPluginGUI_HypothesisCreator::buildFrame()
   compoundHeaders << tr( "GMSH_COMPOUND_ENTRY_COLUMN" ) << tr( "GMSH_COMPOUND_NAME_COLUMN" );
   myCompoundTable->setHorizontalHeaderLabels(compoundHeaders);
   myCompoundTable->horizontalHeader()->hideSection(0);
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myCompoundTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+#else
+  myCompoundTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+#endif
   myCompoundTable->resizeColumnToContents(1);
   myCompoundTable->setAlternatingRowColors(true);
   myCompoundTable->verticalHeader()->hide();
@@ -535,10 +540,8 @@ bool GMSHPluginGUI_HypothesisCreator::readParamsFromWidgets( GmshHypothesisData&
 
 GeomSelectionTools* GMSHPluginGUI_HypothesisCreator::getGeomSelectionTools()
 {
-  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
-  if (myGeomSelectionTools == NULL || myGeomSelectionTools->getMyStudy() != aStudy) {
-    delete myGeomSelectionTools;
-    myGeomSelectionTools = new GeomSelectionTools(aStudy);
+  if (myGeomSelectionTools == NULL) {
+    myGeomSelectionTools = new GeomSelectionTools();
   }
   return myGeomSelectionTools;
 }