Salome HOME
Preparation of intermediate revision
[modules/geom.git] / src / GEOMBase / GEOMBase_Skeleton.cxx
index ad5d365d01fad75c413fc096e987ed8c309ac706..731a67ca078b145adb2f9c82f585edc25bd5658b 100644 (file)
@@ -173,6 +173,7 @@ void GEOMBase_Skeleton::updateAttributes( GEOM::GEOM_Object_ptr theObj,
   SALOMEDS::AttributeString_var aStringAttrib = SALOMEDS::AttributeString::_narrow(anAttr);
 
   std::string aValue = aStringAttrib->Value();
+  /* ouv: temporarily disabled
   if( aValue != "" )
     aValue += "|";
   for( int i = 0, n = theParameters.count(); i < n; i++ ) {
@@ -182,6 +183,7 @@ void GEOMBase_Skeleton::updateAttributes( GEOM::GEOM_Object_ptr theObj,
     if(i != n-1)
       aValue += ":";
   }
+  */
   aStringAttrib->SetValue(aValue.c_str());
 }
 
@@ -289,12 +291,37 @@ int GEOMBase_Skeleton::getConstructorId() const
   return -1;
 }
 
+//=================================================================================
+// function : setConstructorId( id )
+// purpose  :
+//=================================================================================
 void GEOMBase_Skeleton::setConstructorId( const int id )
 {
   if ( myRBGroup && myRBGroup->button( id ) )
     myRBGroup->button( id )->setChecked( true );
 }
 
+//=================================================================================
+// function : unsetConstructorId
+// purpose  :
+//=================================================================================
+void GEOMBase_Skeleton::unsetConstructorId()
+{
+  // 0020428: EDF 906 GEOM : Performance for Group creation in GEOM
+  // uncheck all buttons
+  // workaround, because setChecked( false ) does not result in Qt4
+  bool isExclusive = myRBGroup->exclusive();
+  myRBGroup->setExclusive( false );
+  QList<QAbstractButton*> btnList = myRBGroup->buttons();
+  for ( int j = 0; j < 2; j++ )
+  {
+    QList<QAbstractButton*>::const_iterator it = btnList.constBegin();
+    for ( ; it != btnList.constEnd(); ++it )
+      (*it)->setCheckable( j == 1 );
+  }
+  myRBGroup->setExclusive( isExclusive );
+}
+
 //=================================================================================
 // function : ClickOnHelp()
 // purpose  :