|
|
@ -272,7 +272,7 @@ class VarButtonDelegate(QItemDelegate):
|
|
|
|
if dataType in ['Float', 'DS-36', 'Unsigned16', 'Unsigned8']:
|
|
|
|
if dataType in ['Float', 'DS-36', 'Unsigned16', 'Unsigned8']:
|
|
|
|
pattern = re.compile(r'^[+-]?(\d+(\.\d*)?|\.\d+)$')
|
|
|
|
pattern = re.compile(r'^[+-]?(\d+(\.\d*)?|\.\d+)$')
|
|
|
|
for value in values:
|
|
|
|
for value in values:
|
|
|
|
if not value or re.findall(pattern, str(value)):
|
|
|
|
if not value or not re.findall(pattern, str(value)):
|
|
|
|
reply = QMessageBox.question(self.parent(),
|
|
|
|
reply = QMessageBox.question(self.parent(),
|
|
|
|
'警告',
|
|
|
|
'警告',
|
|
|
|
"请输入强制值或数字",
|
|
|
|
"请输入强制值或数字",
|
|
|
|