From 5c0f6c6e7068f807002e8fd041fb970c91f15e46 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 24 Mar 2008 12:48:46 +0000 Subject: [PATCH] Not activated ipmose range fields fixed (bug 19314). --- src/VISUGUI/VisuGUI_Prs3dDlg.cxx | 25 ++++++++++++++++++++++++- src/VISUGUI/VisuGUI_Prs3dDlg.h | 4 +++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx index 3625210a..681cc9e5 100644 --- a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx @@ -822,7 +822,10 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane( QWidget* parent, bool thePreview ) myBarDlg->setUnitsVisible(aResourceMgr->booleanValue("VISU", propertyName + "display_units", true)); // signals and slots connections =========================================== - connect( RangeGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( changeRange( int ) ) ); + // connect( RangeGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( changeRange( int ) ) ); + connect( RBFrange, SIGNAL( toggled( bool ) ), this, SLOT( onFieldRange( bool ) ) ); + connect( RBIrange, SIGNAL( toggled( bool ) ), this, SLOT( onImposedRange( bool ) ) ); + connect( myModeCombo, SIGNAL( activated( int ) ), this, SLOT( changeScalarMode( int ) ) ); connect( OrientGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( changeDefaults( int ) ) ); connect( XSpin, SIGNAL( valueChanged( double ) ), this, SLOT( XYChanged( double ) ) ); @@ -1374,6 +1377,26 @@ void VisuGUI_ScalarBarPane::changeDefaults( int ) /*! Called when Range mode is changed */ +void VisuGUI_ScalarBarPane::onFieldRange( bool isOn ) +{ + if (isOn) { + myScalarMap->SetSourceRange(); + MinEdit->setEnabled( false ); + MaxEdit->setEnabled( false ); + changeScalarMode(myModeCombo->currentIndex()); + } +} + +void VisuGUI_ScalarBarPane::onImposedRange( bool isOn ) +{ + if (isOn) { + myScalarMap->SetRange(myScalarMap->GetMin(), myScalarMap->GetMax()); + MinEdit->setEnabled( true ); + MaxEdit->setEnabled( true ); + changeScalarMode(myModeCombo->currentIndex()); + } +} + void VisuGUI_ScalarBarPane::changeRange( int ) { if ( RBFrange->isChecked() ) { diff --git a/src/VISUGUI/VisuGUI_Prs3dDlg.h b/src/VISUGUI/VisuGUI_Prs3dDlg.h index 75f3a808..86c0705a 100644 --- a/src/VISUGUI/VisuGUI_Prs3dDlg.h +++ b/src/VISUGUI/VisuGUI_Prs3dDlg.h @@ -220,7 +220,9 @@ class VisuGUI_ScalarBarPane : public QWidget//QVBox private slots: void changeDefaults( int ); - void changeRange( int ); + void changeRange( int ); + void onFieldRange( bool ); + void onImposedRange( bool ); void XYChanged( double ); void changeScalarMode( int ); void onTextPref(); -- 2.39.2