mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-04-27 01:32:07 +12:00
apply patch per PR feedback to avoid segfault (fixes olivierkes#950)
This commit is contained in:
parent
5a6d68e139
commit
750b96e18e
|
@ -63,6 +63,6 @@ def loadProject(project):
|
|||
LOGGER.info("Detected file format version: {}. Zip: {}.".format(version, isZip))
|
||||
|
||||
if version == 0:
|
||||
v0.loadProject(project)
|
||||
return v0.loadProject(project)
|
||||
else:
|
||||
v1.loadProject(project, zip=isZip)
|
||||
return v1.loadProject(project, zip=isZip)
|
||||
|
|
|
@ -430,13 +430,13 @@ def saveProject(zip=None):
|
|||
filesWithPermissionErrors.append(project)
|
||||
|
||||
if len(filesWithPermissionErrors) > 0:
|
||||
dlg = ListDialog()
|
||||
dlg = ListDialog(mw)
|
||||
dlg.setModal(True)
|
||||
dlg.setWindowTitle(dlg.tr("Files not saved"))
|
||||
dlg.label.setText(dlg.tr("The following files were not saved and appear to be open in another program"))
|
||||
for f in filesWithPermissionErrors:
|
||||
QListWidgetItem(f, dlg.listWidget)
|
||||
dlg.exec()
|
||||
dlg.open()
|
||||
|
||||
if project in filesWithPermissionErrors:
|
||||
return False
|
||||
|
@ -920,13 +920,13 @@ def loadProject(project, zip=None):
|
|||
mdl.rootItem.checkIDs()
|
||||
|
||||
if len(filesWithPermissionErrors) > 0:
|
||||
dlg = ListDialog()
|
||||
dlg = ListDialog(mw)
|
||||
dlg.setModal(True)
|
||||
dlg.setWindowTitle(dlg.tr("Files not loaded"))
|
||||
dlg.label.setText(dlg.tr("The following files were not loaded and appear to be open in another program"))
|
||||
for f in filesWithPermissionErrors:
|
||||
QListWidgetItem(f, dlg.listWidget)
|
||||
dlg.exec()
|
||||
dlg.open()
|
||||
|
||||
return errors
|
||||
|
||||
|
|
Loading…
Reference in a new issue