mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
Fix problem of change transparency operation: initial transparency is set incorrectly in the dialog box in some cases
This commit is contained in:
parent
aaaf656e0d
commit
b705a79b86
@ -465,7 +465,7 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
|
||||
GEOMBase* gb = new GEOMBase();
|
||||
Handle(GEOM_AISShape) aisShape;
|
||||
|
||||
aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS );
|
||||
aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, true );
|
||||
if( aisShape.IsNull() )
|
||||
return;
|
||||
float transp = aisShape->Transparency();
|
||||
@ -482,7 +482,7 @@ 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() );
|
||||
aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), true );
|
||||
if ( !aisShape.IsNull() ) {
|
||||
ic->SetTransparency( aisShape, transp, false );
|
||||
ic->Redisplay( aisShape, Standard_False, Standard_True );
|
||||
|
@ -297,7 +297,7 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency()
|
||||
if ( myFirstInit ) {
|
||||
mySlider->setValue(mySlider->maximum());
|
||||
myFirstInit = false;
|
||||
aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS );
|
||||
aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, true );
|
||||
if( aisShape.IsNull() )
|
||||
return;
|
||||
int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5);
|
||||
@ -312,7 +312,7 @@ 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() );
|
||||
aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), true );
|
||||
if ( !aisShape.IsNull() ) {
|
||||
ic->SetTransparency( aisShape, newValue, false );
|
||||
ic->Redisplay( aisShape, Standard_False, Standard_True );
|
||||
|
Loading…
Reference in New Issue
Block a user