Salome HOME
IMP 10199 (add Volume Control)
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Selection.cxx
index 014e88a5a224c77011c207fe20d021266716e1a1..33f01403f46fb1df5a0e5ee31d98d3b923a7f1d4 100644 (file)
@@ -84,12 +84,16 @@ QtxValue SMESHGUI_Selection::param( const int ind, const QString& p ) const
   else if ( p=="displayMode" )   val = QtxValue( displayMode( ind ) );
   else if ( p=="isComputable" )  val = QtxValue( isComputable( ind ) );
   else if ( p=="hasReference" )  val = QtxValue( hasReference( ind ) );
   else if ( p=="displayMode" )   val = QtxValue( displayMode( ind ) );
   else if ( p=="isComputable" )  val = QtxValue( isComputable( ind ) );
   else if ( p=="hasReference" )  val = QtxValue( hasReference( ind ) );
-  else if ( p=="isVisible" )     val = QtxValue( isVisible( ind ) );
+//  else if ( p=="isVisible" )     val = QtxValue( isVisible( ind ) );
 
   // printf( "--> param() : [%s] = %s (%s)\n", p.latin1(), val.toString().latin1(), val.typeName() );
   //if ( val.type() == QVariant::List )
   //cout << "size: " << val.toList().count() << endl;
 
   // printf( "--> param() : [%s] = %s (%s)\n", p.latin1(), val.toString().latin1(), val.typeName() );
   //if ( val.type() == QVariant::List )
   //cout << "size: " << val.toList().count() << endl;
-  return val;
+
+  if( val.isValid() )
+    return val;
+  else
+    return SalomeApp_Selection::param( ind, p );
 }
 
 //=======================================================================
 }
 
 //=======================================================================
@@ -214,6 +218,7 @@ QString SMESHGUI_Selection::controlMode( int ind ) const
     case SMESH_Actor::eMultiConnection:   return "eMultiConnection";
     case SMESH_Actor::eMultiConnection2D: return "eMultiConnection2D";
     case SMESH_Actor::eArea:              return "eArea";
     case SMESH_Actor::eMultiConnection:   return "eMultiConnection";
     case SMESH_Actor::eMultiConnection2D: return "eMultiConnection2D";
     case SMESH_Actor::eArea:              return "eArea";
+    case SMESH_Actor::eVolume3D:          return "eVolume3D";
     case SMESH_Actor::eTaper:             return "eTaper";
     case SMESH_Actor::eAspectRatio:       return "eAspectRatio";
     case SMESH_Actor::eAspectRatio3D:     return "eAspectRatio3D";
     case SMESH_Actor::eTaper:             return "eTaper";
     case SMESH_Actor::eAspectRatio:       return "eAspectRatio";
     case SMESH_Actor::eAspectRatio3D:     return "eAspectRatio3D";
@@ -346,6 +351,9 @@ int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
   if( objComponent->ComponentDataType()!="SMESH" )
     return -1;
 
   if( objComponent->ComponentDataType()!="SMESH" )
     return -1;
 
+  if( objComponent->GetIOR()==obj->GetIOR() )
+    return COMPONENT;
+
   int aLevel = obj->Depth() - objComponent->Depth(),
       aFTag = objFather->Tag(),
       anOTag = obj->Tag(),
   int aLevel = obj->Depth() - objComponent->Depth(),
       aFTag = objFather->Tag(),
       anOTag = obj->Tag(),
@@ -427,6 +435,8 @@ QString SMESHGUI_Selection::typeName( const int t )
     return "Mesh compound";
   case GROUP:
     return "Group";
     return "Mesh compound";
   case GROUP:
     return "Group";
+  case COMPONENT:
+    return "Component";
   default:
     return "Unknown";
   }
   default:
     return "Unknown";
   }