]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix of transparency on Mandriva2010: it didn't worked because of the returned 'testRe...
authorakl <akl@opencascade.com>
Tue, 1 Mar 2011 07:23:37 +0000 (07:23 +0000)
committerakl <akl@opencascade.com>
Tue, 1 Mar 2011 07:23:37 +0000 (07:23 +0000)
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx

index dc3209760580a2260ca1cb8dec68d2bd7a54f82e..e6c61565f4562d99308e41a2f008a48d1843ed17 100644 (file)
@@ -463,11 +463,10 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
         
   else if ( isOCC ) {
     GEOMBase* gb = new GEOMBase();
-    Standard_Boolean found;
     Handle(GEOM_AISShape) aisShape;
    
-    aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found );
-    if( !found )
+    aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS );
+    if( aisShape.IsNull() )
       return;
     float transp = aisShape->Transparency();
 
@@ -483,8 +482,8 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
       return;
     Handle(AIS_InteractiveContext) ic = vm->getAISContext();
     for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), found );
-      if ( found ) {
+      aisShape = gb->ConvertIOinGEOMAISShape( It.Value() );
+      if ( !aisShape.IsNull() ) {
         ic->SetTransparency( aisShape, transp, false );
         ic->Redisplay( aisShape, Standard_False, Standard_True );
       }
index 399ba9be9d506acc4cb79283a57076faae0c1e7b..92f56b4fb2557aeded9e384b3ee10331557c9220 100644 (file)
@@ -293,16 +293,14 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency()
         
   else if ( isOCC ) {
     GEOMBase* gb = new GEOMBase();
-    Standard_Boolean found;
     Handle(GEOM_AISShape) aisShape;
     if ( myFirstInit ) {
       mySlider->setValue(mySlider->maximum());
       myFirstInit = false;
-      aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found );
-      if( !found )
+      aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS );
+      if( aisShape.IsNull() )
         return;
       int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5);
-      std::cout << "transp: " << transp << std::endl;
       mySlider->setValue(transp);
       ValueHasChanged();
       return;
@@ -314,8 +312,8 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency()
       return;
     Handle(AIS_InteractiveContext) ic = vm->getAISContext();
     for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), found );
-      if ( found ) {
+      aisShape = gb->ConvertIOinGEOMAISShape( It.Value() );
+      if ( !aisShape.IsNull() ) {
         ic->SetTransparency( aisShape, newValue, false );
         ic->Redisplay( aisShape, Standard_False, Standard_True );
        aStudy->setObjectProperty( aMgrId , It.Value()->getEntry(), TRANSPARENCY_PROP , newValue );