From ca6affd09c2518f3b7d53cdaedc6055041fff45d Mon Sep 17 00:00:00 2001 From: gdd Date: Tue, 22 Feb 2011 14:05:56 +0000 Subject: [PATCH] Value of slider is badly initialized on first open. --- src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 1bc2c54dd..399ba9be9 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -123,7 +123,7 @@ GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg( QWidget* parent ) //mySlider->setValue( 5 ); mySlider->setTracking(false); - mySlider->setTickPosition( QSlider::TicksLeft ); + mySlider->setTickPosition( QSlider::TicksAbove ); GroupC1Layout->addWidget( mySlider, 1, 0, 1, 3 ); /*************************************************************************/ @@ -296,11 +296,13 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency() Standard_Boolean found; Handle(GEOM_AISShape) aisShape; if ( myFirstInit ) { + mySlider->setValue(mySlider->maximum()); myFirstInit = false; aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found ); if( !found ) return; int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5); + std::cout << "transp: " << transp << std::endl; mySlider->setValue(transp); ValueHasChanged(); return; -- 2.39.2