Small fix.

This commit is contained in:
Adam Treat 2023-04-27 16:45:24 -04:00
parent 6256b4fd33
commit 8a13d638d4

View File

@ -23,11 +23,23 @@ Dialog {
radius: 10 radius: 10
} }
property string defaultModelPath: Download.defaultLocalModelsPath()
property alias modelPath: settings.modelPath
Settings {
id: settings
property string modelPath: modelDownloaderDialog.defaultModelPath
}
Component.onCompleted: { Component.onCompleted: {
Download.downloadLocalModelsPath = settings.modelPath
if (LLM.modelList.length === 0) if (LLM.modelList.length === 0)
open(); open();
} }
Component.onDestruction: {
settings.sync()
}
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
anchors.margins: 20 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 { RowLayout {
Layout.alignment: Qt.AlignCenter Layout.alignment: Qt.AlignCenter
Layout.fillWidth: true Layout.fillWidth: true