Added an item editor

This commit is contained in:
Veronica K. B. Olsen
2019-04-27 16:29:00 +02:00
parent 7c6393302a
commit bd24b58926
3 changed files with 113 additions and 0 deletions
+17
View File
@@ -24,6 +24,7 @@ from nw.gui.doceditor import GuiDocEditor
from nw.gui.docdetails import GuiDocDetails
from nw.gui.mainmenu import GuiMainMenu
from nw.gui.projecteditor import GuiProjectEditor
from nw.gui.itemeditor import GuiItemEditor
from nw.gui.statusbar import GuiMainStatus
from nw.project.project import NWProject
from nw.project.document import NWDoc
@@ -144,6 +145,22 @@ class GuiMain(QMainWindow):
self.theDocument.saveDocument(docHtml)
return
##
# Tree Item Actions
##
def editItem(self):
tHandle = self.treeView.getSelectedHandle()
logger.verbose("Requesting change to item %s" % tHandle)
if tHandle is None:
logger.warning("No item selected")
return
dlgProj = GuiItemEditor(self, self.theProject, tHandle)
dlgProj.exec_()
return
##
# Main Dialogs
##