mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-19 00:10:37 +05:00
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:
parent
e0257a3b5c
commit
38130226cd
@ -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 );
|
||||
}
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user