개정판 4b03b7f7
issue #000: trim line fix data gui remain
Change-Id: I4e444f4bede54b41f74bb6eeff57b5ddbd4524b6
DTI_PID/DTI_PID/ItemTreeWidget.py | ||
---|---|---|
635 | 635 |
data = foundItem.data(0, self.TREE_DATA_ROLE) |
636 | 636 |
if data is not None and data is item: |
637 | 637 |
return foundItem |
638 |
elif type(item) is QEngineeringTrimLineNoTextItem: |
|
639 |
foundItems = self.findItems('Unknown Line', Qt.MatchExactly|Qt.MatchRecursive, 0) |
|
640 |
for foundItem in foundItems: |
|
641 |
data = foundItem.data(0, self.TREE_DATA_ROLE) |
|
642 |
if data is not None and data is item: |
|
643 |
return foundItem |
|
638 | 644 |
|
639 | 645 |
return None |
640 | 646 |
|
... | ... | |
727 | 733 |
if data is not None and data == item: |
728 | 734 |
self.setCurrentItem(fItem) |
729 | 735 |
return |
736 |
elif type(item) is QEngineeringTrimLineNoTextItem: |
|
737 |
foundItems = self.findItems('Unknown Line', Qt.MatchExactly|Qt.MatchRecursive, 0) |
|
738 |
if foundItems is not None: |
|
739 |
for fItem in foundItems: |
|
740 |
data = fItem.data(0, self.TREE_DATA_ROLE) |
|
741 |
if data is not None and data == item: |
|
742 |
self.setCurrentItem(fItem) |
|
743 |
return |
|
730 | 744 |
|
731 | 745 |
## Not found |
732 | 746 |
msg = QMessageBox() |
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
294 | 294 |
if updateProgress: updateProgress.emit(maxValue) |
295 | 295 |
|
296 | 296 |
### make trim lines |
297 |
pastTrim = docData.tracerLineNos |
|
298 |
for pastTrimIndex in reversed(range(len(pastTrim))): |
|
299 |
if type(pastTrim[pastTrimIndex]) is QEngineeringTrimLineNoTextItem: |
|
300 |
pastTrim[pastTrimIndex].explode() |
|
301 |
|
|
297 | 302 |
updateProgress.emit(-1) # reset progressbar |
298 | 303 |
displayMessage.emit('Unknown line Topology Construction') |
299 | 304 |
orphanLines = [line for line in self._lines if line.owner is None] |
... | ... | |
320 | 325 |
|
321 | 326 |
docData.tracerLineNos.append(trimLineNo) |
322 | 327 |
|
328 |
#(docData.tracerLineNos)) |
|
323 | 329 |
if updateProgress: updateProgress.emit(maxValue) |
324 | 330 |
except Exception as ex: |
325 | 331 |
from App import App |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1606 | 1606 |
self.itemTreeWidget.InitLineNoItems() |
1607 | 1607 |
|
1608 | 1608 |
# construct line no item |
1609 |
line_nos = [item for item in self.graphicsView.scene.items() if type(item) is QEngineeringLineNoTextItem]
|
|
1609 |
line_nos = AppDocData.instance().tracerLineNos
|
|
1610 | 1610 |
for line_no in line_nos: |
1611 | 1611 |
item = self.itemTreeWidget.addTreeItem(self.itemTreeWidget.root, line_no) |
1612 | 1612 |
connectedItems = line_no.getConnectedItems() |
... | ... | |
2306 | 2306 |
name = text.find('NAME').text |
2307 | 2307 |
item.transfer.onRemoved.connect(self.itemRemoved) |
2308 | 2308 |
self.addTextItemToScene(item) |
2309 |
docData.texts.append(item) |
|
2309 |
#docData.texts.append(item)
|
|
2310 | 2310 |
|
2311 | 2311 |
if name == 'TEXT': |
2312 | 2312 |
if uid is not None and attributeValue is not None: |
... | ... | |
2389 | 2389 |
for run_item in line_run.items: |
2390 | 2390 |
if issubclass(type(run_item), SymbolSvgItem): self.itemTreeWidget.addTreeItem(line_no_tree_item, run_item) |
2391 | 2391 |
|
2392 |
docData.tracerLineNos.append(line_no) |
|
2392 |
#docData.tracerLineNos.append(line_no)
|
|
2393 | 2393 |
|
2394 | 2394 |
self.progress.setValue(self.progress.value() + 1) |
2395 | 2395 |
QApplication.processEvents() |
DTI_PID/DTI_PID/Shapes/QEngineeringTrimLineNoTextItem.py | ||
---|---|---|
61 | 61 |
except Exception as ex: |
62 | 62 |
return None |
63 | 63 |
|
64 |
return node |
|
64 |
return node |
|
65 |
|
|
66 |
def explode(self): |
|
67 |
from App import App |
|
68 |
super().explode() |
|
69 |
treeWidget = App.mainWnd().itemTreeWidget |
|
70 |
treeWidget.findItemByData(self).parent().removeChild(treeWidget.findItemByData(self)) |
|
71 |
tracerLineNos = AppDocData.instance().tracerLineNos |
|
72 |
tracerLineNos.pop(tracerLineNos.index(self)) |
DTI_PID/DTI_PID/TextItemFactory.py | ||
---|---|---|
113 | 113 |
rgb = data.split(',') |
114 | 114 |
item.change_color(QColor(int(rgb[0]), int(rgb[1]), int(rgb[2])).name()) |
115 | 115 |
# up to here |
116 |
docData.tracerLineNos.append(item) |
|
116 | 117 |
else: |
117 | 118 |
item = self.create_note_no_text(textInfo) |
118 | 119 |
if item: |
... | ... | |
137 | 138 |
item = QEngineeringTextItem() |
138 | 139 |
item.setToolTip(text) |
139 | 140 |
item.setPlainText(text) |
141 |
docData.texts.append(item) |
|
140 | 142 |
except Exception as ex: |
141 | 143 |
from App import App |
142 | 144 |
|
내보내기 Unified diff