개정판 bf9d6375
fix size
Change-Id: I06f34a5d5bd9334f7421c7c4b9f7d0b728a282cd
DTI_PID/DTI_PID/Commands/SaveWorkCommand.py | ||
---|---|---|
94 | 94 |
from xml.etree import ElementTree |
95 | 95 |
ElementTree.ElementTree(xml).write(path) |
96 | 96 | |
97 |
resultStr = '[저장 결과]'
|
|
97 |
resultStr = '[Save Results]'
|
|
98 | 98 |
for item in result.items(): |
99 | 99 |
itemName = str(item[0]) |
100 | 100 |
itemSuccessCount = str(item[1][0]) |
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
343 | 343 | |
344 | 344 |
matches = [assoc for assoc in self.associations() if type(assoc) is QEngineeringSizeTextItem] |
345 | 345 |
if matches: |
346 |
attrs = [attr for attr in self.getAttributes().keys() if attr.AttributeType == 'Size Text Item']
|
|
346 |
attrs = [attr for attr in self.getTargetAttributes() if attr.AttributeType == 'Size Text Item']
|
|
347 | 347 |
if attrs: |
348 | 348 |
return matches[0].mainSize |
349 | 349 | |
... | ... | |
614 | 614 |
|
615 | 615 |
return '' |
616 | 616 | |
617 |
def getTargetAttributes(self): |
|
618 |
"""get target attributes""" |
|
619 |
from AppDocData import AppDocData |
|
620 |
from EngineeringLineItem import QEngineeringLineItem |
|
621 |
from EngineeringVendorItem import QEngineeringVendorItem |
|
622 |
from EngineeringLineNoTextItem import QEngineeringLineNoTextItem |
|
623 |
from EngineeringSpecBreakItem import QEngineeringSpecBreakItem |
|
624 |
from QEngineeringTagNoTextItem import QEngineeringTagNoTextItem |
|
625 | ||
626 |
""" get attributes of item from database """ |
|
627 |
app_doc_data = AppDocData.instance() |
|
628 |
if type(self) is QEngineeringLineItem: |
|
629 |
symbolAttrs = app_doc_data.getSymbolAttribute('Line') |
|
630 |
elif type(self) is QEngineeringVendorItem: |
|
631 |
symbolAttrs = app_doc_data.getSymbolAttribute('Package') |
|
632 |
elif type(self) is QEngineeringLineNoTextItem: |
|
633 |
symbolAttrs = app_doc_data.getSymbolAttribute('Line No') |
|
634 |
self.getLineNoAttributes(_attrs) |
|
635 |
elif type(self) is QEngineeringTagNoTextItem: |
|
636 |
self.getTagNoAttributes(_attrs) |
|
637 |
self.attrs = _attrs |
|
638 |
return self.attrs |
|
639 |
else: |
|
640 |
symbolAttrs = app_doc_data.getSymbolAttribute(self.type) |
|
641 | ||
642 |
targetAttrs = [] |
|
643 |
if not (type(self) is QEngineeringLineItem or type(self) is QEngineeringVendorItem or |
|
644 |
type(self) is QEngineeringLineNoTextItem or type(self) is QEngineeringTagNoTextItem): |
|
645 |
for attr in symbolAttrs: |
|
646 |
if not attr.Target and not type(self) is QEngineeringSpecBreakItem: |
|
647 |
continue |
|
648 |
if attr.Target is None or attr.Target == 'ALL' or \ |
|
649 |
type(self) is QEngineeringSpecBreakItem or \ |
|
650 |
[target for target in attr.Target.split(',') if self.dbUid == int(target)]: |
|
651 |
targetAttrs.append(attr) |
|
652 |
else: |
|
653 |
targetAttrs = symbolAttrs |
|
654 |
|
|
655 |
return targetAttrs |
|
656 | ||
617 | 657 |
def getAttributes(self, findOwner=False): |
618 | 658 |
"""calculate all attributes of item""" |
619 | 659 |
import re |
... | ... | |
630 | 670 |
_attrs = {} |
631 | 671 |
try: |
632 | 672 |
from AppDocData import AppDocData |
633 |
#from SymbolSvgItem import SymbolSvgItem |
|
634 |
#from EngineeringTextItem import QEngineeringTextItem |
|
635 | 673 |
from EngineeringLineItem import QEngineeringLineItem |
636 | 674 |
from EngineeringVendorItem import QEngineeringVendorItem |
637 | 675 |
from EngineeringLineNoTextItem import QEngineeringLineNoTextItem |
내보내기 Unified diff