프로젝트

일반

사용자정보

개정판 77616eee

ID77616eeea57481e1706cec36d0d45e23025d67b3
상위 469c42f1
하위 4d80748d, 5b59afff

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

issue #1190: testing drawing exclusive access

Change-Id: I4260e64ceecbc6c6d495662015415bff9cabe790

차이점 보기:

DTI_PID/DTI_PID/MainWindow.py
104 104
        self.statusbar.addPermanentWidget(self.labelStatus) 
105 105

  
106 106
        docData = AppDocData.instance()
107
        docData.clear()
107 108
        project = docData.getCurrentProject()
108 109
        _translate = QCoreApplication.translate
109 110
        version = QCoreApplication.applicationVersion()
......
293 294

  
294 295
        return QWidget.eventFilter(self, source, event)
295 296

  
297
    def closeEvent(self, event):
298
        AppDocData.instance().clear()
299

  
296 300
    def inconsistencyTableKeyPressEvent(self, event):
297 301
        try:
298 302
            row = self.tableWidgetInconsistency.selectedIndexes()[0].row()
......
1143 1147
            
1144 1148
            self.path = self.graphicsView.loadImageFromFile(project.getDrawingFilePath(), path if type(path) is str else '')
1145 1149
            if os.path.isfile(self.path):
1146
                appDocData.clear()
1147 1150
                self.onCommandRejected()
1151
                appDocData.clear()
1148 1152

  
1149 1153
                appDocData.setImgFilePath(self.path)
1150 1154
                appDocData.activeDrawing = Drawing(None, appDocData.imgName, None)
1155
                if not appDocData.set_occupying_drawing(appDocData.activeDrawing.UID):
1156
                    QMessageBox.about(self.graphicsView, self.tr("Notice"), self.tr("The drawing is locked for editing by another user"))
1157
                    return
1151 1158
                appDocData.activeDrawing.set_pid_source(Image.open(self.path))
1152 1159
                self.itemTreeWidget.setCurrentPID(appDocData.activeDrawing.name)
1153 1160

  

내보내기 Unified diff

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