프로젝트

일반

사용자정보

개정판 34b1790c

ID34b1790c1cef2c0fb92b5e1c48b61bcf9c1c7b83
상위 d3b7de6d
하위 49a0dd42, 07e25372

함의성이(가) 5년 이상 전에 추가함

issue #000: fix Template db, drawing list, configuration table

Change-Id: Idef5a08fc1253f7fabbbbbbeb231f8e58664301e

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
1264 1264
                        else:
1265 1265
                            if sql is not None and 2 == len(sql):
1266 1266
                                cursor.execute(self.project.database.to_sql(sql[0]), sql[1])
1267
                self.configTable = None # reset config table
1267
                self._configs = None # reset config table
1268 1268
                conn.commit()
1269 1269
            # Catch the exception
1270 1270
            except Exception as ex:
DTI_PID/DTI_PID/ConfigurationAreaDialog.py
686 686
            # up to here
687 687

  
688 688
            docData.saveConfigs(configs)
689
            docData.configTable = None
690 689

  
691 690
            self.isAccepted = True
692 691
        except Exception as ex:
DTI_PID/DTI_PID/ConfigurationDialog.py
729 729
            docData.lineTypeConfigs = None  # clear line type configurations
730 730
            NominalPipeSizeTable.instance().pipe_sizes = None    # clear nominal pipe size table
731 731

  
732
            docData.configTable = None
733 732
        except Exception as ex:
734 733
            from App import App
735 734
            from AppDocData import MessageType
DTI_PID/DTI_PID/Drawing.py
20 20
        self._datetime = datetime
21 21
        ''' set drawing uid '''
22 22
        if not uid:
23
            drawings = app_doc_data.getDrawings()
24
            drawing = [drawing for drawing in drawings if self.name == os.path.splitext(drawing.name)[0]]
25
            self.UID = drawing[0].UID if drawing else uuid.uuid4()
26
            self._datetime = drawing[0].datetime
23
            self.UID = None
24
            #drawings = app_doc_data.getDrawings()
25
            #drawing = [drawing for drawing in drawings if self.name == os.path.splitext(drawing.name)[0]]
26
            #self.UID = drawing[0].UID if drawing else uuid.uuid4()
27
            #self._datetime = drawing[0].datetime if drawing else None
27 28
        else:
28 29
            self.UID = uid
29 30
        self._attrs = [['Drawing No', ''], ['Rev No', ''], ['Unit', '']] # attributes
DTI_PID/DTI_PID/ItemDataFormatDialog.py
454 454
            configs.append(Config('Order', key, value))
455 455
            
456 456
            docData.saveConfigs(configs)
457
            docData.configTable = None
458 457

  
459 458
        reply = QMessageBox.information(self, self.tr('Information'), self.tr('Save Success!'), QMessageBox.Ok, QMessageBox.Cancel)
460 459
        if reply == QMessageBox.Ok:
DTI_PID/DTI_PID/MainWindow.py
427 427
        @author     humkyung
428 428
        @date       18.11.02
429 429
        """
430
        from Drawing import Drawing
430 431

  
431 432
        try:
432 433
            appDocData = AppDocData.instance()
......
442 443
                if not drawing or not drawing[0].UID:
443 444
                    drawings.append(Drawing(None, file, None))
444 445

  
445
                item = QTreeWidgetItem(self.treeWidgetDrawingList.root, [file, drawing[0].datetime])
446
                item = QTreeWidgetItem(self.treeWidgetDrawingList.root, [file, drawing[0].datetime if drawing else None])
446 447
                item.setIcon(0, QIcon(':newPrefix/image.png'))
447 448
                item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
448 449
                item.setCheckState(0, Qt.Unchecked)

내보내기 Unified diff

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