Rename the main GUI function for editing an item
This commit is contained in:
@@ -2746,7 +2746,7 @@ class GuiDocEditHeader(QWidget):
|
||||
def _editDocument(self):
|
||||
"""Open the edit item dialog from the main GUI.
|
||||
"""
|
||||
self.mainGui.editItem(self._docHandle)
|
||||
self.mainGui.editItemLabel(self._docHandle)
|
||||
return
|
||||
|
||||
def _searchDocument(self):
|
||||
|
||||
@@ -165,7 +165,7 @@ class GuiMainMenu(QMenuBar):
|
||||
# Project > Edit
|
||||
self.aEditItem = QAction(self.tr("Rename Item"), self)
|
||||
self.aEditItem.setShortcuts(["F2"])
|
||||
self.aEditItem.triggered.connect(lambda: self.mainGui.editItem(None))
|
||||
self.aEditItem.triggered.connect(lambda: self.mainGui.editItemLabel(None))
|
||||
self.projMenu.addAction(self.aEditItem)
|
||||
|
||||
# Project > Delete
|
||||
|
||||
@@ -804,7 +804,7 @@ class GuiMain(QMainWindow):
|
||||
|
||||
return True
|
||||
|
||||
def editItem(self, tHandle=None):
|
||||
def editItemLabel(self, tHandle=None):
|
||||
"""Open the edit item dialog.
|
||||
"""
|
||||
if not self.hasProject:
|
||||
|
||||
@@ -57,7 +57,7 @@ def testGuiMain_ProjectBlocker(monkeypatch, nwGUI):
|
||||
assert nwGUI.mergeDocuments() is False
|
||||
assert nwGUI.splitDocument() is False
|
||||
assert nwGUI.openSelectedItem() is False
|
||||
assert nwGUI.editItem() is False
|
||||
assert nwGUI.editItemLabel() is False
|
||||
assert nwGUI.requestNovelTreeRefresh() is False
|
||||
assert nwGUI.rebuildIndex() is False
|
||||
assert nwGUI.showProjectSettingsDialog() is False
|
||||
|
||||
Reference in New Issue
Block a user