1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 08:22:33 +02:00

Add simple replacement of wallpaper

This commit is contained in:
Elias Steurer 2020-02-08 14:02:20 +01:00
parent 9e85f2eaea
commit d50b4ad198

View File

@ -98,6 +98,19 @@ void ScreenPlayManager::createWallpaper(
settings.insert("absolutePath", path);
}
// Only support remove wallpaper that spans over 1 monitor
if (monitorIndex.length() == 1) {
int i = 0;
for (auto& wallpaper : m_screenPlayWallpapers) {
if (wallpaper->screenNumber().length() == 1) {
if (monitors.at(0) == wallpaper->screenNumber().at(0)) {
removeWallpaperAt(i);
}
}
i++;
}
}
m_screenPlayWallpapers.append(wallpaper);
m_monitorListModel->setWallpaperActiveMonitor(wallpaper, monitorIndex);