An open Keyboard Shortcuts dialog takes the window's commands whenever they differ from its own, not only when their count does

A plug-in removed and another installed between two frames left the count equal, and the dialog kept listing the removed plug-in's row (an_open_dialog_follows_live_effect_plugins, when another test installed a plug-in meanwhile).
This commit is contained in:
bflatastic
2026-11-24 07:25:12 +07:00
parent 52f7763643
commit 691c697041
+1 -2
View File
@@ -1027,9 +1027,8 @@ pub(crate) fn show(app: &mut VectorcraftApp, ui: &mut egui::Ui) {
// A plug-in installed or removed while the dialog is open changes the window's commands: the dialog takes them,
// keeping its edits.
if let Some(window) = commands::keymap(ui.ctx()).filter(|w| current.window.as_ref().is_none_or(|was| !Arc::ptr_eq(was, w))) {
// shortcut: the commands are compared by count; a swap of one plug-in for another within a frame needs ids.
let fresh = match current.keymap.take() {
Some(edited) if edited.catalog().len() == window.catalog().len() => edited,
Some(edited) if edited.catalog() == window.catalog() => edited,
edited => {
let mut fresh = (*window).clone();
if let Some(edited) = edited {