mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-31 10:50:33 +05:00
Value of slider is badly initialized on first open.
This commit is contained in:
parent
4c9bc281db
commit
ca6affd09c
@ -123,7 +123,7 @@ GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg( QWidget* parent )
|
|||||||
//mySlider->setValue( 5 );
|
//mySlider->setValue( 5 );
|
||||||
mySlider->setTracking(false);
|
mySlider->setTracking(false);
|
||||||
|
|
||||||
mySlider->setTickPosition( QSlider::TicksLeft );
|
mySlider->setTickPosition( QSlider::TicksAbove );
|
||||||
GroupC1Layout->addWidget( mySlider, 1, 0, 1, 3 );
|
GroupC1Layout->addWidget( mySlider, 1, 0, 1, 3 );
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
@ -296,11 +296,13 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency()
|
|||||||
Standard_Boolean found;
|
Standard_Boolean found;
|
||||||
Handle(GEOM_AISShape) aisShape;
|
Handle(GEOM_AISShape) aisShape;
|
||||||
if ( myFirstInit ) {
|
if ( myFirstInit ) {
|
||||||
|
mySlider->setValue(mySlider->maximum());
|
||||||
myFirstInit = false;
|
myFirstInit = false;
|
||||||
aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found );
|
aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found );
|
||||||
if( !found )
|
if( !found )
|
||||||
return;
|
return;
|
||||||
int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5);
|
int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5);
|
||||||
|
std::cout << "transp: " << transp << std::endl;
|
||||||
mySlider->setValue(transp);
|
mySlider->setValue(transp);
|
||||||
ValueHasChanged();
|
ValueHasChanged();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user