From 1a6aab7a13b5ddad4405db14ac40623f083d904f Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Thu, 30 Jul 2026 16:29:50 +0200 Subject: [PATCH] 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. --- gui/main-kf5.qml | 3 +++ gui/main.qml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gui/main-kf5.qml b/gui/main-kf5.qml index ab9f73b..cbbf622 100644 --- a/gui/main-kf5.qml +++ b/gui/main-kf5.qml @@ -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() } diff --git a/gui/main.qml b/gui/main.qml index 610e06b..c99ba4e 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -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() }