John's fix to the minipage dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3523 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-02-11 18:43:42 +00:00
parent 2c81992188
commit f2e66a940a
2 changed files with 14 additions and 5 deletions

View File

@ -1,4 +1,9 @@
2002-02-11 John Levon <moz@compsoc.man.ac.uk>
* FormMinipage.C: return SMI_VALID on other form changes
2002-02-10 Rob Lahaye <lahaye@users.sourceforge.net>
* forms/form_external.fd:
* form_external.C: change color2 of a few buttons into the
proper grey color.

View File

@ -95,14 +95,17 @@ ButtonPolicy::SMInput FormMinipage::input(FL_OBJECT * ob, long)
{
ButtonPolicy::SMInput action = ButtonPolicy::SMI_NOOP;
if (ob == dialog_->radio_top ||
ob == dialog_->radio_middle ||
ob == dialog_->radio_bottom ||
ob == dialog_->choice_width_units)
return ButtonPolicy::SMI_VALID;
// disallow senseless data
// warnings if input is senseless
//
string input = fl_get_input(dialog_->input_width);
bool invalid = false;
if (ob == dialog_->input_width) {
invalid = !isValidLength(input) && !isStrDbl(input);
string const input = getStringFromInput(dialog_->input_width);
bool const invalid = !isValidLength(input) && !isStrDbl(input);
if (invalid) {
fl_set_object_label(dialog_->text_warning,
_("Warning: Invalid Length!"));
@ -113,5 +116,6 @@ ButtonPolicy::SMInput FormMinipage::input(FL_OBJECT * ob, long)
action = ButtonPolicy::SMI_VALID;
}
}
return action;
}