mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Fix Pin to Dock not reappearing after unpin
The visible binding on the Pin to Dock menu item called the imperative containsApplication() without any reactive dependency, so QML never re-evaluated it after model changes. Add repeater.count to the binding to force re-evaluation when favourites change.
This commit is contained in:
parent
1ce85bba28
commit
03ba3bc616
1 changed files with 2 additions and 1 deletions
|
|
@ -747,7 +747,8 @@ MouseArea {
|
|||
PC3.MenuItem {
|
||||
icon.name: "window-pin"
|
||||
text: i18n("Pin to Dock")
|
||||
visible: taskContextMenu.taskStorageId !== "" && !folio.FavouritesModel.containsApplication(taskContextMenu.taskStorageId)
|
||||
// repeater.count dependency forces re-evaluation when favourites change
|
||||
visible: taskContextMenu.taskStorageId !== "" && repeater.count >= 0 && !folio.FavouritesModel.containsApplication(taskContextMenu.taskStorageId)
|
||||
enabled: !folio.FolioSettings.lockLayout
|
||||
onClicked: folio.FavouritesModel.addApplication(taskContextMenu.taskStorageId)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue