Moved restoreComboHistory below saveComboHistory as others
This commit is contained in:
parent
87d051fa71
commit
4bc895f7df
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user