From d7e51a085a2fc911355fbb410d496fa8bce27978 Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 27 Jan 2009 12:06:30 +0000 Subject: [PATCH] IPAL8829 Inaccurate msg box appears during creation presentation with zero value in its field range. --- src/VISUGUI/VisuGUI_Prs3dDlg.cxx | 14 ++++++++++---- src/VISUGUI/VisuGUI_Table3dDlg.cxx | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx index faae8fbe..8372ddb2 100644 --- a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx @@ -1583,10 +1583,16 @@ bool VisuGUI_ScalarBarPane::check() tr("WRN_LOGARITHMIC_RANGE"), tr("BUT_OK")); } else { - SUIT_MessageBox::warning( this, - tr("WRN_VISU"), - tr("WRN_LOGARITHMIC_FIELD_RANGE"), - tr("BUT_OK")); + if ( minVal == 0 || maxVal == 0 ) + SUIT_MessageBox::warning( this, + tr("WRN_VISU"), + tr("WRN_LOGARITHMIC_RANGE"), + tr("BUT_OK")); + else + SUIT_MessageBox::warning( this, + tr("WRN_VISU"), + tr("WRN_LOGARITHMIC_FIELD_RANGE"), + tr("BUT_OK")); RBIrange->setChecked(true); changeRange(1); } diff --git a/src/VISUGUI/VisuGUI_Table3dDlg.cxx b/src/VISUGUI/VisuGUI_Table3dDlg.cxx index bc38e937..01224f5a 100644 --- a/src/VISUGUI/VisuGUI_Table3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Table3dDlg.cxx @@ -674,7 +674,7 @@ bool VisuGUI_TableScalarBarPane::check() // check if logarithmic mode is on and check imposed range to not contain negative values if ( CBLog->isChecked() ) { - if ( minVal <= 0.0 ) { + if ( minVal <= 0.0 || maxVal <= 0.0) { if ( RBIrange->isChecked() ) { SUIT_MessageBox::warning( this, tr("WRN_VISU"), -- 2.39.2