개정판 925e75b0
fix linetype change
Change-Id: I4b42c2a2e80589d9d2218c64a574deb5bbf6b997
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py | ||
---|---|---|
2096 | 2096 |
|
2097 | 2097 |
index = 0 |
2098 | 2098 |
lineTypeActions = [] |
2099 |
typeNames = [] |
|
2099 | 2100 |
for condition in reversed(LineTypeConditions.items()): |
2100 | 2101 |
lineTypeActions.append(QAction(condition.name, None)) |
2101 |
lineTypeActions[index].triggered.connect(lambda:self.contextLineType(condition.name))
|
|
2102 |
typeNames.append(condition.name)
|
|
2102 | 2103 |
lineTypeChangeMenu.addAction(lineTypeActions[index]) |
2103 | 2104 |
index = index + 1 |
2104 | 2105 |
|
2106 |
binding = [lambda index=index: lineTypeActions[index].triggered.connect(lambda: self.contextLineType(typeNames[index])) for index in range(len(lineTypeActions))] |
|
2107 |
|
|
2108 |
for index in range(len(lineTypeActions)): |
|
2109 |
binding[index]() |
|
2110 |
|
|
2105 | 2111 |
menu.addMenu(lineTypeChangeMenu) |
2106 | 2112 |
|
2107 | 2113 |
deleteAction = QAction('Delete(E)', None) |
내보내기 Unified diff