properly restore desktop icons

This commit is contained in:
Marco Martin 2019-09-02 18:23:38 +02:00
parent 6ede8da8d7
commit ba9babb186
2 changed files with 6 additions and 3 deletions

View file

@ -136,8 +136,6 @@ void ApplicationListModel::loadApplications()
} else if (entry->property("Exec").isValid()) {
KService::Ptr service(static_cast<KService* >(entry.data()));
qDebug() << " desktopEntryName: " << service->desktopEntryName();
if (service->isApplication() &&
!blacklist.contains(service->desktopEntryName()) &&
service->showOnCurrentPlatform() &&

View file

@ -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]);