Corretta gestione set_field_data nei listbox

git-svn-id: svn://10.65.10.50/trunk@461 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-10-26 09:14:44 +00:00
parent 189e99656e
commit e24268703c

View File

@ -1,4 +1,4 @@
// $Id: maskfld.cpp,v 1.36 1994-10-25 15:59:53 guy Exp $
// $Id: maskfld.cpp,v 1.37 1994-10-26 09:14:44 guy Exp $
#include <xvt.h>
#include <applicat.h>
@ -2769,12 +2769,15 @@ const char* TList_field::get_window_data() const
void TList_field::set_field_data(const char* data)
{
if (data == NULL || *data == '\0')
data = _codes.get(0);
int i = _codes.get_pos(data);
if (i < 0) i = 0;
_str = _codes.get(i);
_str = data;
if (_str.not_empty())
{
const int i = _codes.get_pos(_str);
if (i < 0)
_str = _codes.get(0);
}
else
_str = _codes.get(0);
}
bool TList_field::on_hit()