개정판 68bcd6fe
issue #563: line no run manual edit function added
Change-Id: Ia6a84cee183d831a1e5d49689c949e0e5f84bb8f
DTI_PID/DTI_PID/Commands/SelectAttributeCommand.py | ||
---|---|---|
80 | 80 |
# self._item.attrs[self._attr] = str(item.uid) |
81 | 81 |
# self.onSuccess.emit() |
82 | 82 |
elif item is not None and (type(self._item) is not QEngineeringEndBreakItem) and (type(item) is QEngineeringLineNoTextItem) and self._attr.AttributeType == 'OWNER': |
83 |
if not item.runs: |
|
84 |
item.runs.append(QEngineeringRunItem()) |
|
83 |
inserted = False |
|
84 |
if item.runs: |
|
85 |
for run in item.runs: |
|
86 |
for index in range(len(run.items)): |
|
87 |
if run.items[index].is_connected(self._item): |
|
88 |
if index + 1 != len(run.items) and index != 0 and run.items[index + 1].is_connected(self._item): |
|
89 |
run.items.insert(index + 1, self._item) |
|
90 |
inserted = True |
|
91 |
break |
|
92 |
elif index + 1 == len(run.items): |
|
93 |
run.items.append(self._item) |
|
94 |
inserted = True |
|
95 |
break |
|
96 |
elif index == 0: |
|
97 |
run.items.insert(0, self._item) |
|
98 |
inserted = True |
|
99 |
break |
|
85 | 100 |
|
86 |
if 1 == len(item.runs): item.runs[0].items.append(self._item) |
|
101 |
if inserted: |
|
102 |
break |
|
103 |
if not inserted: |
|
104 |
item.runs.append(QEngineeringRunItem()) |
|
105 |
item.runs[-1].items.append(self._item) |
|
106 |
inserted = True |
|
107 |
else: |
|
108 |
item.runs.append(QEngineeringRunItem()) |
|
109 |
item.runs[0].items.append(self._item) |
|
110 |
inserted = True |
|
87 | 111 |
|
88 |
self._item.owner = item |
|
112 |
if inserted: |
|
113 |
if not item.conns and type(self._item) is QEngineeringLineItem: |
|
114 |
item.conns.append(self._item) |
|
115 |
self._item.owner = item |
|
89 | 116 |
self.onSuccess.emit() |
90 | 117 |
elif item is not None and (type(self._item) is QEngineeringEndBreakItem or issubclass(type(self._item), QEngineeringTextItem)) and (type(item) is QEngineeringLineItem or issubclass(type(item), SymbolSvgItem)) and self._attr.AttributeType == 'OWNER': |
91 | 118 |
self._item.owner = item |
DTI_PID/DTI_PID/Configuration_UI.py | ||
---|---|---|
937 | 937 |
self.pushButtonAddProperty.setText(_translate("ConfigurationDialog", "Add")) |
938 | 938 |
self.pushButtonLineNoAttribute.setText(_translate("ConfigurationDialog", "Attribute")) |
939 | 939 |
self.pushButtonDeleteProperty.setText(_translate("ConfigurationDialog", "Delete")) |
940 |
self.groupBoxEquipTag.setTitle(_translate("ConfigurationDialog", "Equipment Tag No"))
|
|
940 |
self.groupBoxEquipTag.setTitle(_translate("ConfigurationDialog", "Tag No")) |
|
941 | 941 |
self.pushButtonDeleteTagProperty.setText(_translate("ConfigurationDialog", "Delete")) |
942 | 942 |
self.pushButtonAddTagProperty.setText(_translate("ConfigurationDialog", "Add")) |
943 | 943 |
self.pushButtonTagNoAttribute.setText(_translate("ConfigurationDialog", "Attribute")) |
DTI_PID/DTI_PID/UI/Configuration.ui | ||
---|---|---|
633 | 633 |
<item row="4" column="1"> |
634 | 634 |
<widget class="QGroupBox" name="groupBoxEquipTag"> |
635 | 635 |
<property name="title"> |
636 |
<string>Equipment Tag No</string>
|
|
636 |
<string>Tag No</string> |
|
637 | 637 |
</property> |
638 | 638 |
<layout class="QGridLayout" name="gridLayout_34"> |
639 | 639 |
<item row="0" column="0"> |
... | ... | |
1868 | 1868 |
</connection> |
1869 | 1869 |
</connections> |
1870 | 1870 |
<buttongroups> |
1871 |
<buttongroup name="buttonGroup"/> |
|
1872 | 1871 |
<buttongroup name="buttonGroup_2"/> |
1873 | 1872 |
<buttongroup name="buttonGroup_7"/> |
1874 | 1873 |
<buttongroup name="buttonGroup_6"/> |
1875 | 1874 |
<buttongroup name="buttonGroup_4"/> |
1876 |
<buttongroup name="buttonGroup_3"/> |
|
1877 | 1875 |
<buttongroup name="buttonGroup_5"/> |
1878 | 1876 |
<buttongroup name="buttonGroup_8"/> |
1877 |
<buttongroup name="buttonGroup_3"/> |
|
1878 |
<buttongroup name="buttonGroup"/> |
|
1879 | 1879 |
</buttongroups> |
1880 | 1880 |
</ui> |
내보내기 Unified diff