개정판 34ed75c4
issue #563: add connected symbol's attr using
Change-Id: I92ad4992acc130a5de1df6850b443677b48e7cf3
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
1579 | 1579 |
type(item) is QEngineeringUnknownItem) and item.type != 'Notes' and not ( |
1580 | 1580 |
type(item) is QEngineeringEndBreakItem): |
1581 | 1581 |
symbols.append(item) |
1582 |
elif type(item) is QEngineeringLineNoTextItem: |
|
1582 |
elif type(item) is QEngineeringLineNoTextItem and not item.runs:
|
|
1583 | 1583 |
lineNos.append(item) |
1584 | 1584 |
elif issubclass(type(item), QEngineeringTextItem): |
1585 | 1585 |
item.owner = None |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
2023 | 2023 |
dy = item.origin[1] - self.origin[1] |
2024 | 2024 |
length = math.sqrt(dx*dx + dy*dy) |
2025 | 2025 |
new_codes.append([length, value[3]]) |
2026 |
else:
|
|
2026 |
elif len(value[2]) == 1:
|
|
2027 | 2027 |
attr_value = [attr for attr in value[2] if 'attr(' in attr][0].replace('attr(', '')[:-1] |
2028 | 2028 |
for key, _value in self.attrs.items(): |
2029 | 2029 |
if _value == attr_value: |
2030 | 2030 |
new_codes.append([0, value[3]]) |
2031 |
elif len(value[2]) == 2: |
|
2032 |
for item in items: |
|
2033 |
if old_code in value[1] and item.name in value[2]: |
|
2034 |
dx = item.origin[0] - self.origin[0] |
|
2035 |
dy = item.origin[1] - self.origin[1] |
|
2036 |
length = math.sqrt(dx*dx + dy*dy) |
|
2037 |
|
|
2038 |
attr_value = [attr for attr in value[2] if 'attr(' in attr][0].replace('attr(', '')[:-1] |
|
2039 |
for key, _value in item.attrs.items(): |
|
2040 |
if _value == attr_value: |
|
2041 |
new_codes.append([length, value[3]]) |
|
2031 | 2042 |
|
2032 | 2043 |
for value in table.values: |
2033 | 2044 |
if old_code in value[1] and len(value[2]) == 1 and value[2][0] == '': |
내보내기 Unified diff