Make sure new replace items in project settings are inserted at the top
This commit is contained in:
@@ -617,7 +617,7 @@ class GuiProjectEditReplace(QWidget):
|
|||||||
saveKey = "<keyword%d>" % (self.listBox.topLevelItemCount() + 1)
|
saveKey = "<keyword%d>" % (self.listBox.topLevelItemCount() + 1)
|
||||||
newVal = ""
|
newVal = ""
|
||||||
newItem = QTreeWidgetItem([saveKey, newVal])
|
newItem = QTreeWidgetItem([saveKey, newVal])
|
||||||
self.listBox.addTopLevelItem(newItem)
|
self.listBox.insertTopLevelItem(0, newItem)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _delEntry(self):
|
def _delEntry(self):
|
||||||
|
|||||||
+1
-1
@@ -372,8 +372,8 @@ def testProjectEditor(qtbot, nwTempGUI, nwRef, nwTemp):
|
|||||||
projFile = path.join(nwTempGUI, "nwProject.nwx")
|
projFile = path.join(nwTempGUI, "nwProject.nwx")
|
||||||
assert cmpFiles(projFile, path.join(nwRef, "gui", "2_nwProject.nwx"), [2, 8, 9, 10])
|
assert cmpFiles(projFile, path.join(nwRef, "gui", "2_nwProject.nwx"), [2, 8, 9, 10])
|
||||||
|
|
||||||
nwGUI.closeMain()
|
|
||||||
# qtbot.stopForInteraction()
|
# qtbot.stopForInteraction()
|
||||||
|
nwGUI.closeMain()
|
||||||
|
|
||||||
@pytest.mark.gui
|
@pytest.mark.gui
|
||||||
def testItemEditor(qtbot, nwTempGUI, nwRef, nwTemp):
|
def testItemEditor(qtbot, nwTempGUI, nwRef, nwTemp):
|
||||||
|
|||||||
Reference in New Issue
Block a user