From: apo Date: Thu, 25 Oct 2007 17:05:28 +0000 (+0000) Subject: Fix for Bug IPAL16749 X-Git-Tag: mergeto_BR_Dev_For_4_0_29Oct07~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0423cf636d0f9ad63ba259fe97faf0f74ea4f275;p=modules%2Fvisu.git Fix for Bug IPAL16749 MULTIPR: ?use imposed range? radio button is not saved for a new time stamp --- diff --git a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx index 3eb42d6d..f45f02dd 100644 --- a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx @@ -450,7 +450,6 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent): connect( WidthSpin, SIGNAL( valueChanged( double ) ), this, SLOT( updatePreview() )); connect( HeightSpin, SIGNAL( valueChanged( double ) ), this, SLOT( updatePreview() )); connect( CBLog, SIGNAL( toggled( bool ) ), this, SLOT( updatePreview() )); - changeRange( 0 ); changeDefaults( 0 ); myIsStoreTextProp = false; myBusy = false; @@ -794,9 +793,11 @@ void VisuGUI_ScalarBarPane::changeDefaults( int ) void VisuGUI_ScalarBarPane::changeRange( int ) { if ( RBFrange->isChecked() ) { + myScalarMap->SetSourceRange(); MinEdit->setEnabled( false ); MaxEdit->setEnabled( false ); } else { + myScalarMap->SetRange(myScalarMap->GetMin(), myScalarMap->GetMax()); MinEdit->setEnabled( true ); MaxEdit->setEnabled( true ); } @@ -828,12 +829,13 @@ void VisuGUI_ScalarBarPane::XYChanged( double ) */ void VisuGUI_ScalarBarPane::changeScalarMode( int theMode ) { - if ( myScalarMap ) { - if ( RBFrange->isChecked() ) { - MinEdit->setText( QString::number( myScalarMap->GetComponentMin(theMode) ) ); - MaxEdit->setText( QString::number( myScalarMap->GetComponentMax(theMode) ) ); - } + if ( RBFrange->isChecked() ) { + MinEdit->setText( QString::number( myScalarMap->GetComponentMin(theMode) ) ); + MaxEdit->setText( QString::number( myScalarMap->GetComponentMax(theMode) ) ); } + + myScalarMap->SetScalarMode(theMode); + updatePreview(); } @@ -852,7 +854,7 @@ void VisuGUI_ScalarBarPane::setRange( double imin, double imax, bool sbRange ) else RBFrange->setChecked( true ); - changeRange( 0 ); + changeRange( sbRange ); } diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 7b2c2a6c..97703c66 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -268,7 +268,7 @@ VISU::ColoredPrs3d_i GetSpecificPL()->Init(); // To update scalar range according to the new input - if(!IsRangeFixed() || theReInit) + if(!IsRangeFixed() && theReInit) SetSourceRange(); GetCResult()->ConnectObserver(this, myResultConnection);