]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Value of slider is badly initialized on first open.
authorgdd <gdd>
Tue, 22 Feb 2011 14:05:56 +0000 (14:05 +0000)
committergdd <gdd>
Tue, 22 Feb 2011 14:05:56 +0000 (14:05 +0000)
src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx

index 1bc2c54ddcbc176f4631dac7b2feb918fc5e8701..399ba9be9d506acc4cb79283a57076faae0c1e7b 100644 (file)
@@ -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;