From dfcd3e24529b28a56c8de59641c867b8c9328bf1 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 24 May 2019 19:25:35 +0300 Subject: [PATCH] reinstantiate properly tasks previews --this code helps the previewsmodel to reinstantiate when changing from single instance preview to another single one --- plasmoid/package/contents/ui/task/TaskItem.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index d697346a6..89db1fbe5 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -1066,6 +1066,10 @@ MouseArea{ windowsPreviewDlg.visualParent = previewsVisualParent; toolTipDelegate.parentTask = taskItem; + + //! WORKAROUND, in order for toolTipDelegate to re-instantiate the previews model when + //! previews are changing from single instance preview to another single instance + toolTipDelegate.rootIndex = undefined; toolTipDelegate.rootIndex = tasksModel.makeModelIndex(itemIndex, -1); toolTipDelegate.hideCloseButtons = hideClose;