From 8a13d638d4b2dca09eebe4d1eda219aea5421460 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Thu, 27 Apr 2023 16:45:24 -0400 Subject: [PATCH] Small fix. --- qml/ModelDownloaderDialog.qml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/qml/ModelDownloaderDialog.qml b/qml/ModelDownloaderDialog.qml index 1222b9c4..b1835fa1 100644 --- a/qml/ModelDownloaderDialog.qml +++ b/qml/ModelDownloaderDialog.qml @@ -23,11 +23,23 @@ Dialog { radius: 10 } + property string defaultModelPath: Download.defaultLocalModelsPath() + property alias modelPath: settings.modelPath + Settings { + id: settings + property string modelPath: modelDownloaderDialog.defaultModelPath + } + Component.onCompleted: { + Download.downloadLocalModelsPath = settings.modelPath if (LLM.modelList.length === 0) open(); } + Component.onDestruction: { + settings.sync() + } + ColumnLayout { anchors.fill: parent anchors.margins: 20 @@ -308,21 +320,6 @@ Dialog { } } - property string defaultModelPath: Download.defaultLocalModelsPath() - property alias modelPath: settings.modelPath - Settings { - id: settings - property string modelPath: settingsDialog.defaultModelPath - } - - Component.onCompleted: { - Download.downloadLocalModelsPath = settings.modelPath - } - - Component.onDestruction: { - settings.sync() - } - RowLayout { Layout.alignment: Qt.AlignCenter Layout.fillWidth: true