Fix of transparency on Mandriva2010: it didn't worked because of the returned 'testResult' argument was removed from 'GEOMBase::ConvertIOinGEOMAISShape' method.

This commit is contained in:
akl 2011-03-01 07:23:37 +00:00
parent e0257a3b5c
commit 38130226cd
2 changed files with 8 additions and 11 deletions

View File

@ -463,11 +463,10 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
else if ( isOCC ) { else if ( isOCC ) {
GEOMBase* gb = new GEOMBase(); GEOMBase* gb = new GEOMBase();
Standard_Boolean found;
Handle(GEOM_AISShape) aisShape; Handle(GEOM_AISShape) aisShape;
aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found ); aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS );
if( !found ) if( aisShape.IsNull() )
return; return;
float transp = aisShape->Transparency(); float transp = aisShape->Transparency();
@ -483,8 +482,8 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
return; return;
Handle(AIS_InteractiveContext) ic = vm->getAISContext(); Handle(AIS_InteractiveContext) ic = vm->getAISContext();
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), found ); aisShape = gb->ConvertIOinGEOMAISShape( It.Value() );
if ( found ) { if ( !aisShape.IsNull() ) {
ic->SetTransparency( aisShape, transp, false ); ic->SetTransparency( aisShape, transp, false );
ic->Redisplay( aisShape, Standard_False, Standard_True ); ic->Redisplay( aisShape, Standard_False, Standard_True );
} }

View File

@ -293,16 +293,14 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency()
else if ( isOCC ) { else if ( isOCC ) {
GEOMBase* gb = new GEOMBase(); GEOMBase* gb = new GEOMBase();
Standard_Boolean found;
Handle(GEOM_AISShape) aisShape; Handle(GEOM_AISShape) aisShape;
if ( myFirstInit ) { if ( myFirstInit ) {
mySlider->setValue(mySlider->maximum()); mySlider->setValue(mySlider->maximum());
myFirstInit = false; myFirstInit = false;
aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found ); aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS );
if( !found ) if( aisShape.IsNull() )
return; return;
int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5); int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5);
std::cout << "transp: " << transp << std::endl;
mySlider->setValue(transp); mySlider->setValue(transp);
ValueHasChanged(); ValueHasChanged();
return; return;
@ -314,8 +312,8 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency()
return; return;
Handle(AIS_InteractiveContext) ic = vm->getAISContext(); Handle(AIS_InteractiveContext) ic = vm->getAISContext();
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), found ); aisShape = gb->ConvertIOinGEOMAISShape( It.Value() );
if ( found ) { if ( !aisShape.IsNull() ) {
ic->SetTransparency( aisShape, newValue, false ); ic->SetTransparency( aisShape, newValue, false );
ic->Redisplay( aisShape, Standard_False, Standard_True ); ic->Redisplay( aisShape, Standard_False, Standard_True );
aStudy->setObjectProperty( aMgrId , It.Value()->getEntry(), TRANSPARENCY_PROP , newValue ); aStudy->setObjectProperty( aMgrId , It.Value()->getEntry(), TRANSPARENCY_PROP , newValue );