Fix behaivior of load bin file entry in menu

This commit is contained in:
pjht 2024-01-31 15:44:25 -06:00
parent 90bf6aa04f
commit 7ced15be5c
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -88,9 +88,10 @@ impl AltairEmulator {
);
ui.close_menu();
}
if ui.button("Load binary file").clicked() {
if ui.add_enabled(!self.windows.contains_key("load_bin"), Button::new("Load binary file")).clicked() {
self.windows
.insert("load_bin_window", Box::new(LoadBinWindow::new(ui.ctx())));
.insert("load_bin", Box::new(LoadBinWindow::new(ui.ctx())));
ui.close_menu();
}
});
});