From 49d43cd18150fa29af43fa7eab20b0519b3ffdaf Mon Sep 17 00:00:00 2001 From: vtn Date: Wed, 12 Dec 2007 10:04:36 +0000 Subject: [PATCH] NPAL284: Corrections for Bar Property dialog --- src/VISUGUI/VISU_msg_en.po | 7 +++++-- src/VISUGUI/VisuGUI_Prs3dDlg.cxx | 29 ++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) 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(); + } } } -- 2.39.2