Salome HOME
Merge from V6_main 01/04/2013
[plugins/netgenplugin.git] / src / GUI / NETGENPluginGUI_HypothesisCreator.cxx
index 58f599f5a682b2acea1aa6f4fed9af3c8ec68950..7a0a094b27613b61f9ddeb9daae83b0b03e2d6c5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -79,9 +79,7 @@ enum {
   LSZ_BTNS = 0,
   LSZ_VERTEX_BTN,
   LSZ_EDGE_BTN,
-#ifdef NETGEN_NEW
   LSZ_FACE_BTN,
-#endif
   LSZ_SEPARATOR2,
   LSZ_REMOVE_BTN
 };
@@ -206,7 +204,7 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame()
     row++;
   }
   myAllowQuadrangles = 0;
-  if ( true /*myIs2D*/ ) // issue 0021676
+  if ( myIs2D || !myIsONLY ) // issue 0021676
   {
     myAllowQuadrangles = new QCheckBox( tr( "NETGEN_ALLOW_QUADRANGLES" ), GroupC1 );
     aGroupLayout->addWidget( myAllowQuadrangles, row, 0 );
@@ -241,10 +239,8 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame()
     localSizeLayout->addWidget(addVertexButton, LSZ_VERTEX_BTN, 1, 1, 1);
     QPushButton* addEdgeButton = new QPushButton(tr("NETGEN_LSZ_EDGE"), localSizeGroup);
     localSizeLayout->addWidget(addEdgeButton, LSZ_EDGE_BTN, 1, 1, 1);
-#ifdef NETGEN_NEW
     QPushButton* addFaceButton = new QPushButton(tr("NETGEN_LSZ_FACE"), localSizeGroup);
     localSizeLayout->addWidget(addFaceButton, LSZ_FACE_BTN, 1, 1, 1);
-#endif
 
     QFrame *line2 = new QFrame(localSizeGroup);
     line2->setFrameShape(QFrame::HLine);
@@ -256,9 +252,7 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame()
 
     connect( addVertexButton, SIGNAL(clicked()), this, SLOT(onAddLocalSizeOnVertex()));
     connect( addEdgeButton, SIGNAL(clicked()), this, SLOT(onAddLocalSizeOnEdge()));
-#ifdef NETGEN_NEW
     connect( addFaceButton, SIGNAL(clicked()), this, SLOT(onAddLocalSizeOnFace()));
-#endif
     connect( removeButton, SIGNAL(clicked()), this, SLOT(onRemoveLocalSizeOnShape()));
     connect( myLocalSizeTable, SIGNAL(cellChanged(int, int)), this, SLOT(onSetLocalSize(int, int)));
 
@@ -389,13 +383,13 @@ bool NETGENPluginGUI_HypothesisCreator::readParamsFromHypo( NetgenHypothesisData
   h_data.myMinSize = h->GetMinSize();
   h_data.myMinSizeVar = getVariableName("SetMinSize");
 
-  if ( myIs2D )
+  //if ( myIs2D )
     {
-      NETGENPlugin::NETGENPlugin_Hypothesis_2D_var h_2d =
-        NETGENPlugin::NETGENPlugin_Hypothesis_2D::_narrow( initParamsHypothesis() );
+      NETGENPlugin::NETGENPlugin_Hypothesis_var h =
+        NETGENPlugin::NETGENPlugin_Hypothesis::_narrow( initParamsHypothesis() );
 
-      if ( !h_2d->_is_nil() )
-        h_data.myAllowQuadrangles = h_2d->GetQuadAllowed();
+      if ( !h->_is_nil() )
+        h_data.myAllowQuadrangles = h->GetQuadAllowed();
     }
   
   NETGENPluginGUI_HypothesisCreator* that = (NETGENPluginGUI_HypothesisCreator*)this;