Fix right click selection behavior in project panel (#21707)
Closes #21605 Consider you have set of entries selected or even a single entry selected, and you right click some other entry which is **not** part of your selected set. This doesn't not clear existing entries selection (which it should clear, as how file manager right-click logic works, see more below). This issue might lead unexpected operation like deletion applied on those existing selected entries. This PR fixes it. Release Notes: - Fix right click selection behavior in project panel
This commit is contained in:
parent
bf1525588d
commit
2ce01ead93
1 changed files with 3 additions and 0 deletions
|
@ -3496,6 +3496,9 @@ impl ProjectPanel {
|
||||||
// Stop propagation to prevent the catch-all context menu for the project
|
// Stop propagation to prevent the catch-all context menu for the project
|
||||||
// panel from being deployed.
|
// panel from being deployed.
|
||||||
cx.stop_propagation();
|
cx.stop_propagation();
|
||||||
|
if !this.marked_entries.contains(&selection) {
|
||||||
|
this.marked_entries.clear();
|
||||||
|
}
|
||||||
this.deploy_context_menu(event.position, entry_id, cx);
|
this.deploy_context_menu(event.position, entry_id, cx);
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue