Skip to content

Commit

Permalink
Fix extension list not being able to save
Browse files Browse the repository at this point in the history
  • Loading branch information
Shtoyan committed Sep 15, 2024
1 parent dc0085e commit d461cc8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/kfuz2_egui/src/ui/panel_center.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,16 @@ fn render_settings(ui: &mut egui::Ui, gui_app: &mut super::app::Kfuz2Egui) {
.text_color(constants::EXTENSION_COLOR),
);

// N.B. egui has changed how focus works, next time don't forget about this:
// https://github.com/emilk/egui/discussions/5110#discussioncomment-10651410
if ui
.add(egui::Button::new("Save").min_size(crate::constants::BUTTON_SIZE_SMALL))
.clicked()
.hovered()
&& ui.input(|i| i.pointer.primary_pressed())
{
gui_app.extension_list = gui_app.text_edit_extensions.clone();
}

if ui
.add(egui::Button::new("Reset").min_size(crate::constants::BUTTON_SIZE_SMALL))
.clicked()
Expand Down

0 comments on commit d461cc8

Please sign in to comment.