개정판 11ae4ec5
issue #503: fix area delete bug
DTI_PID/DTI_PID/ConfigurationAreaDialog.py | ||
---|---|---|
148 | 148 |
item = QTableWidgetItem('({},{}),({},{})'.format(area.x, area.y, area.width, area.height)) |
149 | 149 |
item.setFlags(Qt.ItemIsEnabled) |
150 | 150 |
item.tag = boundingBox |
151 |
self.ui.tableWidgetEquipmentDescArea.setItem(row, 2, item)
|
|
151 |
self.ui.tableWidgetEquipmentDescArea.setItem(row, 1, item)
|
|
152 | 152 |
|
153 | 153 |
row += 1 |
154 | 154 |
|
... | ... | |
282 | 282 |
''' |
283 | 283 |
try: |
284 | 284 |
row = self.ui.tableWidgetTitleBlockArea.currentRow() |
285 |
if row is -1: |
|
286 |
return |
|
285 | 287 |
self.removeArea(self.ui.tableWidgetTitleBlockArea.item(row, 2).tag) |
286 | 288 |
self.ui.tableWidgetTitleBlockArea.removeRow(row) |
287 | 289 |
except Exception as ex: |
... | ... | |
319 | 321 |
def onDeleteEquipmentDescArea(self): |
320 | 322 |
try: |
321 | 323 |
row = self.ui.tableWidgetEquipmentDescArea.currentRow() |
322 |
self.removeArea(self.ui.tableWidgetEquipmentDescArea.item(row, 2).tag) |
|
324 |
if row is -1: |
|
325 |
return |
|
326 |
self.removeArea(self.ui.tableWidgetEquipmentDescArea.item(row, 1).tag) |
|
323 | 327 |
self.ui.tableWidgetEquipmentDescArea.removeRow(row) |
324 | 328 |
except Exception as ex: |
325 | 329 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
... | ... | |
420 | 424 |
item = QTableWidgetItem(strArea) |
421 | 425 |
item.setFlags(Qt.ItemIsEnabled) |
422 | 426 |
item.tag = boundingBox |
423 |
self.ui.tableWidgetEquipmentDescArea.setItem(row, 2, item)
|
|
427 |
self.ui.tableWidgetEquipmentDescArea.setItem(row, 1, item)
|
|
424 | 428 |
self.ui.tableWidgetEquipmentDescArea.resizeColumnsToContents() |
425 | 429 |
# up to here |
426 | 430 |
elif self._cmd.tag is self.ui.tableWidgetTitleBlockArea: |
DTI_PID/DTI_PID/ItemPropertyTableWidget.py | ||
---|---|---|
212 | 212 |
self.setItem(5, 0, QTableWidgetItem("OWNER")) |
213 | 213 |
elif type(item) is QEngineeringNoteItem: |
214 | 214 |
self.setRowCount(1) |
215 |
|
|
216 |
widgetItem = QTableWidgetItem("노트번호") |
|
217 |
self.setItem(0, 0, widgetItem) |
|
215 |
self.setItem(0, 0, QTableWidgetItem("노트번호")) |
|
216 |
self.setItem(1, 0, QTableWidgetItem("설명")) |
|
218 | 217 |
elif type(item) is QEngineeringLineNoTextItem: |
219 | 218 |
self.setRowCount(1) |
220 | 219 |
self.setItem(0, 0, QTableWidgetItem("UID")) |
내보내기 Unified diff