mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 19:41:36 -05:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user