개정판 5f0266c3
issue #000: note and table fix
Change-Id: I33a5eaec018504ad2fa5fdff50440b2de95dd931
DTI_PID/DTI_PID/ItemPropertyTableWidget.py | ||
---|---|---|
723 | 723 |
def cellChangedEvent(self, row, column): |
724 | 724 |
try: |
725 | 725 |
if column == 1: |
726 |
data = self.item(row, 0).data(Qt.UserRole) |
|
726 |
item = self.item(row, 0) |
|
727 |
data = self.item(row, 0).data(Qt.UserRole) if item is not None else None |
|
727 | 728 |
if data is not None and not data.is_selectable: |
728 | 729 |
if self._item: |
729 | 730 |
if data.AttributeType != 'Boolean': |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
213 | 213 |
return True if symbol contains given point else return False |
214 | 214 |
""" |
215 | 215 |
rect = self.sceneBoundingRect() |
216 |
minX = rect.x() - margin |
|
217 |
minY = rect.y() - margin |
|
218 |
maxX = minX + rect.width() + margin |
|
219 |
maxY = minY + rect.height() + margin |
|
216 |
allowed_error = 0.1 |
|
217 |
|
|
218 |
if abs(rect.x() - 0) <= allowed_error and abs(rect.y() - 0) <= allowed_error: |
|
219 |
minX = self.loc[0] - margin |
|
220 |
minY = self.loc[1] - margin |
|
221 |
maxX = minX + self.size[0] + margin |
|
222 |
maxY = minY + self.size[1] + margin |
|
223 |
else: |
|
224 |
minX = rect.x() - margin |
|
225 |
minY = rect.y() - margin |
|
226 |
maxX = minX + rect.width() + margin |
|
227 |
maxY = minY + rect.height() + margin |
|
228 |
|
|
229 |
#print([minX, minY, maxX, maxY]) |
|
220 | 230 |
|
221 | 231 |
return True if (pt[0] >= minX and pt[0] <= maxX and pt[1] >= minY and pt[1] <= maxY) else False |
222 | 232 |
|
내보내기 Unified diff