Clear moved items from the selection
Move To only cleared the selection when more than one item moved, so a single moved item stayed selected — invisible — in the target workspace. Moved items are now always removed from the selection.
This commit is contained in:
@@ -354,7 +354,11 @@ struct PanelView: View {
|
|||||||
ForEach(store.sections.filter { $0.id != store.sectionID(of: item.id) }) { section in
|
ForEach(store.sections.filter { $0.id != store.sectionID(of: item.id) }) { section in
|
||||||
Button(section.name) {
|
Button(section.name) {
|
||||||
store.move(ids: ids, to: section.id)
|
store.move(ids: ids, to: section.id)
|
||||||
if multiple { clearSelection() }
|
// Moved items leave the current view, so they must
|
||||||
|
// leave the selection too — otherwise they stay
|
||||||
|
// selected, invisible, in the target workspace.
|
||||||
|
selection.subtract(ids)
|
||||||
|
lastSelectedID = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user