Filename of current image is used as default name when saving label data

This commit is contained in:
Mark Shilton 2016-02-12 13:23:12 +00:00
parent 1981da9b22
commit 28062bafc4

View File

@ -920,7 +920,7 @@ class MainWindow(QMainWindow, WindowMixin):
caption = '%s - Choose File' % __appname__ caption = '%s - Choose File' % __appname__
filters = 'File (*%s)' % LabelFile.suffix filters = 'File (*%s)' % LabelFile.suffix
openDialogPath = self.currentPath() openDialogPath = self.currentPath()
dlg = (self, caption, openDialogPath, filters) dlg = QFileDialog(self, caption, openDialogPath, filters)
dlg.setDefaultSuffix(LabelFile.suffix[1:]) dlg.setDefaultSuffix(LabelFile.suffix[1:])
dlg.setAcceptMode(QFileDialog.AcceptSave) dlg.setAcceptMode(QFileDialog.AcceptSave)
dlg.setConfirmOverwrite(True) dlg.setConfirmOverwrite(True)