개정판 fd332e20
add evaluatedBidirectional funct
Change-Id: Ice238b7f21281a492627b0897a650cfa335d8f94
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py | ||
---|---|---|
2166 | 2166 |
|
2167 | 2167 |
QGraphicsLineItem.mouseReleaseEvent(self, event) |
2168 | 2168 |
|
2169 |
def evaluatedBidirectional(self): |
|
2170 |
isBidirectional = self.prop('Bidirectional') |
|
2171 |
if isBidirectional: |
|
2172 |
return True |
|
2173 |
|
|
2174 |
if self.owner: |
|
2175 |
matches = [run for run in self.owner.runs if self in run.items] |
|
2176 |
if matches: |
|
2177 |
for line in [item for item in matches[0].items if type(item) is QEngineeringLineItem and item is not self]: |
|
2178 |
if line.prop('Bidirectional'): |
|
2179 |
return True |
|
2180 |
|
|
2181 |
return False |
|
2182 |
|
|
2169 | 2183 |
def contextMenuEvent(self, event): |
2170 | 2184 |
from LineTypeConditions import LineTypeConditions |
2171 | 2185 |
|
내보내기 Unified diff