Performance improvements to Build and Writing Stats, and making sure only one of each can be opened
This commit is contained in:
+15
-2
@@ -48,6 +48,7 @@ from nw.gui import (
|
||||
)
|
||||
from nw.core import NWProject, NWDoc, NWIndex
|
||||
from nw.constants import nwItemType, nwItemClass, nwAlert
|
||||
from nw.common import getGuiItem
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -816,9 +817,15 @@ class GuiMain(QMainWindow):
|
||||
logger.error("No project open")
|
||||
return
|
||||
|
||||
dlgBuild = GuiBuildNovel(self, self.theProject)
|
||||
dlgBuild = getGuiItem("GuiBuildNovel")
|
||||
if dlgBuild is None:
|
||||
dlgBuild = GuiBuildNovel(self, self.theProject)
|
||||
|
||||
dlgBuild.setModal(False)
|
||||
dlgBuild.show()
|
||||
qApp.processEvents()
|
||||
dlgBuild.viewCachedDoc()
|
||||
|
||||
return
|
||||
|
||||
def showWritingStatsDialog(self):
|
||||
@@ -828,9 +835,15 @@ class GuiMain(QMainWindow):
|
||||
logger.error("No project open")
|
||||
return
|
||||
|
||||
dlgStats = GuiWritingStats(self, self.theProject)
|
||||
dlgStats = getGuiItem("GuiWritingStats")
|
||||
if dlgStats is None:
|
||||
dlgStats = GuiWritingStats(self, self.theProject)
|
||||
|
||||
dlgStats.setModal(False)
|
||||
dlgStats.show()
|
||||
qApp.processEvents()
|
||||
dlgStats.populateGUI()
|
||||
|
||||
return
|
||||
|
||||
def showAboutNWDialog(self):
|
||||
|
||||
Reference in New Issue
Block a user