From: dmv Date: Tue, 27 Jan 2009 12:06:30 +0000 (+0000) Subject: IPAL8829 Inaccurate msg box appears during creation presentation with zero value... X-Git-Tag: mergeto_trunk_16Feb09~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d7e51a085a2fc911355fbb410d496fa8bce27978;p=modules%2Fvisu.git IPAL8829 Inaccurate msg box appears during creation presentation with zero value in its field range. --- 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"),