From 0423cf636d0f9ad63ba259fe97faf0f74ea4f275 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 25 Oct 2007 17:05:28 +0000 Subject: [PATCH] Fix for Bug IPAL16749 MULTIPR: ?use imposed range? radio button is not saved for a new time stamp --- src/VISUGUI/VisuGUI_Prs3dDlg.cxx | 16 +++++++++------- src/VISU_I/VISU_ColoredPrs3d_i.cc | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) 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); -- 2.39.2