From b705a79b86672cb7c55b424693b75151a5d2bcb1 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 9 Mar 2011 09:33:08 +0000 Subject: [PATCH] Fix problem of change transparency operation: initial transparency is set incorrectly in the dialog box in some cases --- src/GEOMToolsGUI/GEOMToolsGUI_1.cxx | 4 ++-- src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 51d48cfbc..a37613070 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -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 ); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 92f56b4fb..adea69bd2 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -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 );