개정판 3d90e475
issue #000: fix drawing occupied
Change-Id: Ida74ecffe247a101663b6f2bb74a6c2764c97e74
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
142 | 142 |
@date 2018.09.06 |
143 | 143 |
''' |
144 | 144 |
|
145 |
def clear(self): |
|
145 |
def clear(self, past=None):
|
|
146 | 146 |
from QEngineeringInstLineNoTextItem import QEngineeringInstLineNoTextItem |
147 | 147 |
|
148 |
if self.activeDrawing and self.activeDrawing.UID: |
|
148 |
if self.activeDrawing and self.activeDrawing.UID and self.activeDrawing.UID != past:
|
|
149 | 149 |
self.clear_occupying_drawing(self.activeDrawing.UID) |
150 | 150 |
|
151 | 151 |
self._imgFilePath = None |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1507 | 1507 |
self.path = self.graphicsView.loadImageFromFile(drawing) |
1508 | 1508 |
if os.path.isfile(self.path): |
1509 | 1509 |
self.onCommandRejected() |
1510 |
app_doc_data.clear() |
|
1510 |
app_doc_data.clear(past=drawing.UID)
|
|
1511 | 1511 |
|
1512 | 1512 |
app_doc_data.setImgFilePath(self.path) |
1513 | 1513 |
app_doc_data.activeDrawing = drawing |
내보내기 Unified diff