개정판 47af3d63
issue #563: fix eval size
Change-Id: I512bef2958e2d90303c80e725e69e4cd46747a89
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py | ||
---|---|---|
150 | 150 |
@property |
151 | 151 |
def EvaluatedSize(self): |
152 | 152 |
from EngineeringReducerItem import QEngineeringReducerItem |
153 |
from EngineeringLineNoTextItem import QEngineeringLineNoTextItem |
|
153 | 154 |
|
154 | 155 |
if self.Size: return self.Size |
155 |
if self.owner: |
|
156 |
if self.owner and issubclass(type(self.owner), QEngineeringLineNoTextItem):
|
|
156 | 157 |
matches = [run for run in self.owner.runs if self in run.items] |
157 | 158 |
if matches: |
158 | 159 |
at = matches[0].items.index(self) |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
215 | 215 |
@property |
216 | 216 |
def EvaluatedSize(self): |
217 | 217 |
from EngineeringReducerItem import QEngineeringReducerItem |
218 |
from EngineeringLineNoTextItem import QEngineeringLineNoTextItem |
|
219 |
|
|
218 | 220 |
try: |
219 | 221 |
if self.Size: return self.Size |
220 |
if self.owner: |
|
222 |
if self.owner and issubclass(type(self.owner), QEngineeringLineNoTextItem):
|
|
221 | 223 |
matches = [run for run in self.owner.runs if self in run.items] |
222 | 224 |
if matches: |
223 | 225 |
at = matches[0].items.index(self) |
... | ... | |
257 | 259 |
|
258 | 260 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
259 | 261 |
sys.exc_info()[-1].tb_lineno) |
260 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
262 |
App.mainWnd().addMessage.emit(MessageType.Error, str(self.uid) + self.name + message)
|
|
261 | 263 |
|
262 | 264 |
def validate(self): |
263 | 265 |
''' |
minorTools/xmlTextSearcher.py | ||
---|---|---|
3 | 3 |
def finder(): |
4 | 4 |
print("finder start") |
5 | 5 |
|
6 |
targetText = ['AttrAt="0" Attribute="tag-sp" AttributeType="Text Item" DisplayAttribute="SeqNumber" Expression="item.text()" Freeze="True" Length="" UID="81400489-ef7f-40f3-855f-256c2ffc7329">']
|
|
6 |
targetText = ['224d0e6f25c-648f-440a-b135-812d4b2c06e2']
|
|
7 | 7 |
path = 'W:\ID2_Project\REB\Temp' |
8 | 8 |
|
9 | 9 |
print("target : " + str(len(targetText))) |
... | ... | |
137 | 137 |
if __name__ == '__main__': |
138 | 138 |
selection = input("select fuction(changer = 1, finder = 2, adder = 3) : ") |
139 | 139 |
if selection == '1': |
140 |
pass |
|
141 | 140 |
changer() |
142 | 141 |
elif selection == '2': |
143 |
pass |
|
144 | 142 |
finder() |
145 | 143 |
elif selection == '3': |
146 | 144 |
adder() |
내보내기 Unified diff