146 self.value = VariableItem.unsized |
146 self.value = VariableItem.unsized |
147 else: |
147 else: |
148 self.value = VariableItem.noOfItemsStr.format(length_code) |
148 self.value = VariableItem.noOfItemsStr.format(length_code) |
149 |
149 |
150 if dtype != "str": |
150 if dtype != "str": |
151 self.valueShort = self.value |
151 if len(self.value) > 256: |
|
152 self.valueShort = QCoreApplication.translate( |
|
153 "VariableItem", "<double click to show value>" |
|
154 ) |
|
155 else: |
|
156 self.valueShort = self.value[:256] |
|
157 |
152 self.tooltip = str(self.value)[:256] |
158 self.tooltip = str(self.value)[:256] |
153 return |
159 return |
154 |
160 |
155 if VariableItem.rx_nonprintable.search(dvalue) is None: |
161 if VariableItem.rx_nonprintable.search(dvalue) is None: |
156 with contextlib.suppress(Exception): # secok |
162 with contextlib.suppress(Exception): # secok |