프로젝트

일반

사용자정보

개정판 c7a0bb20

IDc7a0bb20bde8633164b8e8bbdb0e7f711cff149c
상위 8b1a59d5
하위 5f0266c3

백흠경이(가) 5년 이상 전에 추가함

issue #000: fixed an error that user can't reset symbol's owner

Change-Id: I40a628da090130038dd4b12c34f11ad75124ea01

차이점 보기:

DTI_PID/DTI_PID/ItemPropertyTableWidget.py
458 458
                self.setItem(3, 1, QTableWidgetItem(str(round(math.degrees(self._item.angle)))))
459 459
                self.setItem(4, 1, QTableWidgetItem(str(self._item.origin)))
460 460
                owner_item = QTableWidgetItem('{}'.format('None' if self._item.owner is None else str(self._item.owner)))
461
                owner_item.setFlags(Qt.ItemIsEnabled|Qt.ItemIsSelectable)
461 462
                icon = QtGui.QIcon()
462 463
                icon.addPixmap(QtGui.QPixmap(":/newPrefix/doubleclick.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
463 464
                owner_item.setIcon(icon)
......
661 662
        if event.key() == Qt.Key_Delete:
662 663
            items = self.mainWindow.graphicsView.scene.selectedItems()
663 664
            selectedIndexes = self.selectedIndexes()
664
            if len(items) == 1 and len(selectedIndexes) == 1 and type(items[0]) is not QEngineeringLineItem and type(items[0]) is not QEngineeringSpecBreakItem and self.item(selectedIndexes[0].row(), 0).text().find('CONN') is not 0:
665
            if selectedIndexes[0].column() == 1 and self.item(selectedIndexes[0].row(), 0).text() == 'OWNER':
666
                items[0].owner = None
667
                self.show_item_property(items[0])
668
            elif len(items) == 1 and len(selectedIndexes) == 1 and type(items[0]) is not QEngineeringLineItem and type(items[0]) is not QEngineeringSpecBreakItem and self.item(selectedIndexes[0].row(), 0).text().find('CONN') is not 0:
665 669
                if selectedIndexes[0].column() == 1:
666 670
                    attributeStr = self.item(selectedIndexes[0].row(), 0).text()
667 671
                    items[0].removeSelfAttr(attributeStr)
668 672
                    self.mainWindow.refreshResultPropertyTableWidget()
669 673
            elif len(items) == 1 and len(selectedIndexes) == 1 and (type(items[0]) is QEngineeringLineItem or issubclass(type(items[0]), SymbolSvgItem)):
670 674
                key_cell = self.item(selectedIndexes[0].row(), 0)
671
                if selectedIndexes[0].column() == 1 and key_cell.text() == 'OWNER':
672
                    items[0].owner = None
673
                elif selectedIndexes[0].column() == 1 and key_cell.text().find('CONN') is 0:
675
                if selectedIndexes[0].column() == 1 and key_cell.text().find('CONN') is 0:
674 676
                    selectedUID = self.item(selectedIndexes[0].row(), 1).text()
675 677
                    connNum = int(key_cell.text().replace('CONN', ''))
676 678
                    items[0].connectors[connNum - 1].connectedItem = None

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)