개정판 82e5790e
issue #501: apply just check box ui
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
263 | 263 |
|
264 | 264 |
item = QTreeWidgetItem(self.treeWidgetDrawingList.root, [file, drawing[0][2] if drawing and drawing[0] else '']) |
265 | 265 |
item.setIcon(0, QIcon(':newPrefix/image.png')) |
266 |
item.setFlags(item.flags() | Qt.ItemIsUserCheckable) |
|
267 |
item.setCheckState(0, Qt.Unchecked) |
|
266 | 268 |
|
267 | 269 |
self.treeWidgetDrawingList.root.setText(0, 'P&ID Drawings({})'.format(self.treeWidgetDrawingList.root.childCount())) |
268 | 270 |
self.treeWidgetDrawingList.expandItem(self.treeWidgetDrawingList.root) |
... | ... | |
857 | 859 |
appDocData.setCurrentPidSource(Image.open(self.path)) |
858 | 860 |
self.resultTreeWidget.setCurrentPID(appDocData.activeDrawing.name) |
859 | 861 |
|
862 |
drawingList = self.treeWidgetDrawingList.topLevelItem(0) |
|
863 |
for childIdex in range(drawingList.childCount()): |
|
864 |
drawingList.child(childIdex).setCheckState(0, Qt.Unchecked) |
|
865 |
for childIdex in range(drawingList.childCount()): |
|
866 |
child = drawingList.child(childIdex) |
|
867 |
if child.text(0).replace('.png', '') == appDocData.activeDrawing.name: |
|
868 |
child.setCheckState(0, Qt.Checked) |
|
869 |
break |
|
870 |
|
|
860 | 871 |
## Load data on xml |
861 | 872 |
path = os.path.join(appDocData.getCurrentProject().getTempPath(), appDocData.imgName + '.xml') |
862 | 873 |
if os.path.isfile(path): |
내보내기 Unified diff