Salome HOME
Additional minor fix of issue 0017431: unset the MODAL behavior for the 'Basic Proper...
[modules/geom.git] / src / GenerationGUI / GenerationGUI_RevolDlg.cxx
index 25872683d28172aa800bf6662eb4d35cd965c90d..8f9a6008e97668248e8d2fd5f64c0c6c145bcdcf 100644 (file)
@@ -118,7 +118,9 @@ void GenerationGUI_RevolDlg::Init()
 
   double SpecificStep = 5;
   /* min, max, step and decimals for spin boxes & initial values */
-  initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
+  //initSpinBox( GroupPoints->SpinBox_DX, COORD_MIN, COORD_MAX, SpecificStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
+  // 05.06.2008 skl for IPAL12958
+  initSpinBox( GroupPoints->SpinBox_DX, 0.0, 360.0, SpecificStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
   GroupPoints->SpinBox_DX->setValue( 45.0 );
 
   /* signals and slots connections */
@@ -216,7 +218,11 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
   erasePreview();
   myEditCurrentArgument->setText( "" );
   
-  if ( IObjectCount() != 1 ) {
+  LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
+  SALOME_ListIO aSelList;
+  aSelMgr->selectedObjects(aSelList);
+
+  if (aSelList.Extent() != 1) {
     if ( myEditCurrentArgument == GroupPoints->LineEdit1 )
       myOkBase = false;        
     else if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
@@ -226,7 +232,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
   
   // nbSel == 1
   Standard_Boolean testResult = Standard_False;
-  GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult );
+  GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
   QString aName = GEOMBase::GetName( aSelectedObject );
   
   if ( !testResult )
@@ -247,9 +253,8 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
       TopoDS_Shape aShape;
       
       if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
-       LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
        TColStd_IndexedMapOfInteger aMap;
-       aSelMgr->GetIndexes( firstIObject(), aMap );
+       aSelMgr->GetIndexes(aSelList.First(), aMap);
        if ( aMap.Extent() == 1 ) {
          
          int anIndex = aMap( 1 );
@@ -287,7 +292,6 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
   displayPreview();
 }
 
-
 //=================================================================================
 // function : SetEditCurrentArgument()
 // purpose  :