From ba9babb186bf6ec64b355272c5b581a0e77ff00d Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 2 Sep 2019 18:23:38 +0200 Subject: [PATCH] properly restore desktop icons --- containments/homescreen2/applicationlistmodel.cpp | 2 -- .../package/contents/ui/launcher/LauncherGrid.qml | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/containments/homescreen2/applicationlistmodel.cpp b/containments/homescreen2/applicationlistmodel.cpp index cc9da077..513681f4 100644 --- a/containments/homescreen2/applicationlistmodel.cpp +++ b/containments/homescreen2/applicationlistmodel.cpp @@ -136,8 +136,6 @@ void ApplicationListModel::loadApplications() } else if (entry->property("Exec").isValid()) { KService::Ptr service(static_cast(entry.data())); - qDebug() << " desktopEntryName: " << service->desktopEntryName(); - if (service->isApplication() && !blacklist.contains(service->desktopEntryName()) && service->showOnCurrentPlatform() && diff --git a/containments/homescreen2/package/contents/ui/launcher/LauncherGrid.qml b/containments/homescreen2/package/contents/ui/launcher/LauncherGrid.qml index 1322ed92..2017d0cd 100644 --- a/containments/homescreen2/package/contents/ui/launcher/LauncherGrid.qml +++ b/containments/homescreen2/package/contents/ui/launcher/LauncherGrid.qml @@ -57,8 +57,13 @@ LauncherContainer { return root.flow; } } + Component.onCompleted: { + if (model.ApplicationLocationRole == ApplicationListModel.Desktop) { + appletsLayout.restoreItem(delegate); + } + } onParentFromLocationChanged: { - if (!editMode && parent != parentFromLocation) { + if (!launcherDragManager.active && parent != parentFromLocation) { parent = parentFromLocation; if (model.ApplicationLocationRole == ApplicationListModel.Favorites) { plasmoid.nativeInterface.stackBefore(delegate, parentFromLocation.children[index]);