diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py index 899d038f8..03e4943f5 100644 --- a/qt/aqt/utils.py +++ b/qt/aqt/utils.py @@ -498,15 +498,6 @@ def restoreComboIndex(widget: QComboBox, history: List[str], key: str): widget.setCurrentIndex(index) -def restoreComboHistory(comboBox: QComboBox, name: str): - name += "BoxHistory" - history = aqt.mw.pm.profile.get(name, []) - comboBox.addItems(history) - comboBox.lineEdit().setText(history[0] if history else "") - comboBox.lineEdit().selectAll() - return history - - def saveComboHistory(comboBox: QComboBox, history: List[str], name: str): name += "BoxHistory" text_input = comboBox.lineEdit().text() @@ -520,6 +511,15 @@ def saveComboHistory(comboBox: QComboBox, history: List[str], name: str): return text_input +def restoreComboHistory(comboBox: QComboBox, name: str): + name += "BoxHistory" + history = aqt.mw.pm.profile.get(name, []) + comboBox.addItems(history) + comboBox.lineEdit().setText(history[0] if history else "") + comboBox.lineEdit().selectAll() + return history + + def saveSplitter(widget, key): key += "Splitter" aqt.mw.pm.profile[key] = widget.saveState()