From 1c95e7a5807c0f47bcca5f2cc3fc35c4218016e2 Mon Sep 17 00:00:00 2001 From: villa Date: Tue, 25 Jun 1996 08:33:01 +0000 Subject: [PATCH] Correzione listbox in msksheet git-svn-id: svn://10.65.10.50/trunk@3083 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/msksheet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/msksheet.cpp b/include/msksheet.cpp index 3cbecbc68..c33c9de08 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -709,7 +709,8 @@ const char* TSpreadsheet::copy_cell2field(XI_OBJ* cell) txt = xi_get_text(cell, NULL, -1); if (_edit_field->is_editable()) { - const TString& val = ((TEditable_field*)_edit_field)->win2raw(txt); + const char* val = _edit_field->is_kind_of(CLASS_LIST_FIELD) ? txt : + (const char*)((TEditable_field*)_edit_field)->win2raw(txt); _edit_field->set(val); _edit_field->set_dirty(); // Get it dirty! } @@ -786,7 +787,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev) src = row(rec).get(col); // Set value for cell if (src && *src) { - if (maxlen == 3 && e->is_kind_of(CLASS_LIST_FIELD)) + if (/*maxlen == 3 && */ e->is_kind_of(CLASS_LIST_FIELD)) /* src = src */; // Leave code as is else src = e->raw2win(src); // Get formatted string