Settato il membro _effective_height (al fine di utilizzarlo) nella

put_paragraph(). Rimossa la put_paragraph() dalla validate() dei
messaggi custom in TForm.


git-svn-id: svn://10.65.10.50/trunk@3185 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1996-07-15 07:20:20 +00:00
parent 71a4d56d8f
commit aa62a48d4a

View File

@ -757,10 +757,7 @@ bool TForm_item::do_message(int num)
{ {
msg = m; msg = m;
if (*m == '_') if (*m == '_')
{
form().validate(*this, msg); form().validate(*this, msg);
put_paragraph(get());
}
else else
{ {
const TString16 cmd(msg.get()); // Get command const TString16 cmd(msg.get()); // Get command
@ -1376,13 +1373,16 @@ bool TForm_string::read()
void TForm_string::put_paragraph(const char* s) void TForm_string::put_paragraph(const char* s)
{ {
if (hidden()) return; if (hidden()) return;
const int h = height();
if (height() > 1) if (h > 1)
{ {
TParagraph_string p(s, width()); const int w = width();
TParagraph_string p(s, w);
int i = _prompt.not_empty() ? 1 : 0; int i = _prompt.not_empty() ? 1 : 0;
for (; (s = p.get()) != NULL && i < height(); i++) for (; (s = p.get()) != NULL && i < h; i++)
string_at(x(), _y+i, s); string_at(x(), _y+i, s);
_effective_height = i;
} }
else else
string_at(-1, _y, s); string_at(-1, _y, s);