Merge pull request #14 from vkbo/side_preview

Bugfix
This commit is contained in:
Veronica K. Berglyd Olsen
2019-05-18 18:37:12 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -254,7 +254,7 @@ class GuiMainMenu(QMenuBar):
menuItem = QAction(QIcon.fromTheme("text-html"), "View Document", self)
menuItem.setStatusTip("View Document in HTML")
menuItem.setShortcut("Ctrl+R")
menuItem.triggered.connect(self.theParent.viewDocument)
menuItem.triggered.connect(lambda : self.theParent.viewDocument(None))
self.docuMenu.addAction(menuItem)
# # Document > Separator
+4
View File
@@ -245,6 +245,10 @@ class GuiMain(QMainWindow):
return False
tItem = self.theProject.getItem(tHandle)
if tItem is None:
logger.warning("Item not found")
return False
if tItem.itemType == nwItemType.FILE:
logger.debug("Generating preview for item %s" % tHandle)
aDoc = ToHtml(self.theProject, self)