From: vtn Date: Wed, 12 Dec 2007 10:04:36 +0000 (+0000) Subject: NPAL284: Corrections for Bar Property dialog X-Git-Tag: V4_1_0rc3~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=49d43cd18150fa29af43fa7eab20b0519b3ffdaf;p=modules%2Fvisu.git NPAL284: Corrections for Bar Property dialog --- diff --git a/src/VISUGUI/VISU_msg_en.po b/src/VISUGUI/VISU_msg_en.po index 0ed7243d..f0d94d46 100644 --- a/src/VISUGUI/VISU_msg_en.po +++ b/src/VISUGUI/VISU_msg_en.po @@ -911,7 +911,7 @@ msgid "VisuGUI_TextPrefDlg::&Cancel" msgstr "" msgid "VisuGUI_TextPrefDlg::TIT_TEXT_PREF" -msgstr "Text property" +msgstr "Text properties" msgid "VisuGUI_TextPrefDlg::LBL_TITLE" msgstr "Title" @@ -935,7 +935,7 @@ msgid "VisuGUI_BarPrefDlg::&Cancel" msgstr "" msgid "VisuGUI_BarPrefDlg::TIT_BAR_PREF" -msgstr "Bar property" +msgstr "Bar properties" msgid "VisuGUI_BarPrefDlg::LBL_TITLE_W" msgstr "Title width (%)" @@ -964,6 +964,9 @@ msgstr "Format:" msgid "VisuGUI_BarPrefDlg::MSG_LABEL_FORMAT" msgstr "Labels format is invalid." +msgid "VisuGUI_BarPrefDlg::MSG_BIG_SCALE" +msgstr "The common (Title, Label, Bar) width or height should not be greater then 100%." + msgid "VisuGUI_BarPrefDlg::AUTO" msgstr "auto" diff --git a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx index f982e4ac..065a7478 100644 --- a/src/VISUGUI/VisuGUI_Prs3dDlg.cxx +++ b/src/VISUGUI/VisuGUI_Prs3dDlg.cxx @@ -486,7 +486,34 @@ void VisuGUI_BarPrefDlg::accept() tr("MSG_LABEL_FORMAT"), tr("BUT_OK")); } else { - QDialog::accept(); + if( + ( + TitleWidthSpin->value()+ + LabelWidthSpin->value()+ + BarWidthSpin->value() + > 100 + ) || + ( + TitleHeightSpin->value()+ + LabelHeightSpin->value()+ + BarHeightSpin->value() + > 100 + ) + ) { + SUIT_MessageBox::warn1( this,tr("WRN_VISU"), + tr("MSG_BIG_SCALE"), + tr("BUT_OK")); + } else { + myTitleWidth = TitleWidthSpin->value(); + myTitleHeight = TitleHeightSpin->value(); + myLabelWidth = LabelWidthSpin->value(); + myLabelHeight = LabelHeightSpin->value(); + myBarWidth = BarWidthSpin->value(); + myBarHeight = BarHeightSpin->value(); + myUnits = CBUnits->isChecked(); + myUnitsFormat = UnitsEdit->text(); + QDialog::accept(); + } } }