From: akl Date: Tue, 1 Mar 2011 07:23:37 +0000 (+0000) Subject: Fix of transparency on Mandriva2010: it didn't worked because of the returned 'testRe... X-Git-Tag: Start_BR_19998_21191~57 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=38130226cd2a107154ef8b1faab585f093ef61b3;p=modules%2Fgeom.git Fix of transparency on Mandriva2010: it didn't worked because of the returned 'testResult' argument was removed from 'GEOMBase::ConvertIOinGEOMAISShape' method. --- diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index dc3209760..e6c61565f 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -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 ); } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 399ba9be9..92f56b4fb 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -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 );