Make sure open document is saved before we update preview or build manuscript (#1835)
This commit is contained in:
@@ -44,9 +44,7 @@ from novelwriter.core.item import NWItem
|
||||
from novelwriter.enum import nwBuildFmt
|
||||
from novelwriter.extensions.modified import NIconToolButton
|
||||
from novelwriter.extensions.simpleprogress import NProgressSimple
|
||||
from novelwriter.types import (
|
||||
QtAlignCenter, QtDialogClose, QtRoleAction, QtRoleReject, QtUserRole
|
||||
)
|
||||
from novelwriter.types import QtAlignCenter, QtDialogClose, QtRoleAction, QtRoleReject, QtUserRole
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -328,6 +326,9 @@ class GuiManuscriptBuild(QDialog):
|
||||
):
|
||||
return False
|
||||
|
||||
# Make sure editor content is saved before we start
|
||||
SHARED.mainGui.saveDocument()
|
||||
|
||||
docBuild = NWBuildDocument(SHARED.project, self._build)
|
||||
docBuild.queueAll()
|
||||
|
||||
|
||||
@@ -342,6 +342,9 @@ class GuiManuscript(QDialog):
|
||||
if not (build := self._getSelectedBuild()):
|
||||
return
|
||||
|
||||
# Make sure editor content is saved before we start
|
||||
SHARED.mainGui.saveDocument()
|
||||
|
||||
docBuild = NWBuildDocument(SHARED.project, build)
|
||||
docBuild.setPreviewMode(True)
|
||||
docBuild.queueAll()
|
||||
|
||||
Reference in New Issue
Block a user