gui: populate model list on dialog open
When the new-session dialog opens, the backend combo defaults to index 0 but onCurrentTextChanged doesn't fire for the initial value. Explicitly call listModelsByBackend for the default backend so the model dropdown is populated immediately.
This commit is contained in:
parent
e4c1cea385
commit
1a6aab7a13
|
|
@ -196,6 +196,9 @@ ApplicationWindow {
|
|||
newSessionDialog.backendCombo.currentIndex = 0
|
||||
newSessionDialog.agentCombo.currentIndex = 0
|
||||
newSessionDialog.modelCombo.editText = ""
|
||||
// Populate model list for the default (first) backend
|
||||
if (newSessionDialog.backendCombo.currentText)
|
||||
newSessionDialog.modelCombo.model = dbus.listModelsByBackend(newSessionDialog.backendCombo.currentText)
|
||||
newSessionDialog.open()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,6 +194,9 @@ ApplicationWindow {
|
|||
newSessionDialog.backendCombo.currentIndex = 0
|
||||
newSessionDialog.agentCombo.currentIndex = 0
|
||||
newSessionDialog.modelCombo.editText = ""
|
||||
// Populate model list for the default (first) backend
|
||||
if (newSessionDialog.backendCombo.currentText)
|
||||
newSessionDialog.modelCombo.model = dbus.listModelsByBackend(newSessionDialog.backendCombo.currentText)
|
||||
newSessionDialog.open()
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue