Set wallpaperplugin to the ConfigDialog before applying

Makes switching between wallpaper plugins work for me.
This commit is contained in:
Sebastian Kügler 2013-08-22 04:47:47 +02:00
parent 757e1d4a3e
commit 824c8d0511

View File

@ -25,6 +25,7 @@ ColumnLayout {
id: root id: root
property int formAlignment: pluginComboBox.x property int formAlignment: pluginComboBox.x
property string currentWallpaper: ""
//BEGIN functions //BEGIN functions
function saveConfig() { function saveConfig() {
@ -33,6 +34,7 @@ ColumnLayout {
configDialog.wallpaperConfiguration[key] = main.currentItem["cfg_"+key] configDialog.wallpaperConfiguration[key] = main.currentItem["cfg_"+key]
} }
} }
configDialog.currentWallpaper = root.currentWallpaper;
configDialog.applyWallpaper() configDialog.applyWallpaper()
} }
@ -68,6 +70,7 @@ ColumnLayout {
textRole: "name" textRole: "name"
onCurrentIndexChanged: { onCurrentIndexChanged: {
var model = configDialog.wallpaperConfigModel.get(currentIndex) var model = configDialog.wallpaperConfigModel.get(currentIndex)
root.currentWallpaper = model.pluginName
main.sourceFile = model.source main.sourceFile = model.source
root.restoreConfig() root.restoreConfig()
} }