Исправлен ввод в поля таблицы

Исправлено преобразование комментариев в значения для multichoice
master-3.5 3.5.5.2
parent 78d378cc1c
commit 7317392898

@ -26,6 +26,7 @@ from more import show_msg, LabelWordWrap, MultipleChoice, SelectTable, \
ReadonlyCheckBox, get_view_params, ImageLabel, SelectList, \
QComboWgt, _print, get_system_rgb, ParameterWindow
from sudsds import WebFault
from calculate.lib.utils.text import _u8
from calculate.lib.utils.tools import Sizes
from SelectTable import SelectedTableWidget
from ReturnMessage import ReturnedMessage
@ -2537,9 +2538,11 @@ class MainFrame(QtGui.QWidget):
elif typefield in ['multichoice', 'multichoice_add']:
val_list = text.split(',')
res_list = []
val_list = [_u8(x) for x in val_list]
if ChoiceValue.comments and \
hasattr(ChoiceValue.comments, 'string'):
comment_list = ChoiceValue.comments.string
comment_list = [_u8(x) for x in comment_list]
values_list = ChoiceValue.values.string
for val in val_list:
if val in comment_list:
@ -2550,10 +2553,10 @@ class MainFrame(QtGui.QWidget):
else:
res_list = val_list
if not res_list:
text = ''
else:
text = ','.join(res_list)
if not res_list:
text = ''
else:
text = ','.join(res_list)
elif typefield in ['check', 'check_tristate']:
text = self.view_dict[field.name].item(i, j).data(1)

Loading…
Cancel
Save