Rename the main GUI function for editing an item

This commit is contained in:
Veronica Berglyd Olsen
2022-06-11 18:48:22 +02:00
parent 8d427f40c6
commit 2cc8be5776
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2746,7 +2746,7 @@ class GuiDocEditHeader(QWidget):
def _editDocument(self): def _editDocument(self):
"""Open the edit item dialog from the main GUI. """Open the edit item dialog from the main GUI.
""" """
self.mainGui.editItem(self._docHandle) self.mainGui.editItemLabel(self._docHandle)
return return
def _searchDocument(self): def _searchDocument(self):
+1 -1
View File
@@ -165,7 +165,7 @@ class GuiMainMenu(QMenuBar):
# Project > Edit # Project > Edit
self.aEditItem = QAction(self.tr("Rename Item"), self) self.aEditItem = QAction(self.tr("Rename Item"), self)
self.aEditItem.setShortcuts(["F2"]) 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) self.projMenu.addAction(self.aEditItem)
# Project > Delete # Project > Delete
+1 -1
View File
@@ -804,7 +804,7 @@ class GuiMain(QMainWindow):
return True return True
def editItem(self, tHandle=None): def editItemLabel(self, tHandle=None):
"""Open the edit item dialog. """Open the edit item dialog.
""" """
if not self.hasProject: if not self.hasProject:
+1 -1
View File
@@ -57,7 +57,7 @@ def testGuiMain_ProjectBlocker(monkeypatch, nwGUI):
assert nwGUI.mergeDocuments() is False assert nwGUI.mergeDocuments() is False
assert nwGUI.splitDocument() is False assert nwGUI.splitDocument() is False
assert nwGUI.openSelectedItem() is False assert nwGUI.openSelectedItem() is False
assert nwGUI.editItem() is False assert nwGUI.editItemLabel() is False
assert nwGUI.requestNovelTreeRefresh() is False assert nwGUI.requestNovelTreeRefresh() is False
assert nwGUI.rebuildIndex() is False assert nwGUI.rebuildIndex() is False
assert nwGUI.showProjectSettingsDialog() is False assert nwGUI.showProjectSettingsDialog() is False