From 4d65a0fefc9e4887b8bc056d6f65af185e0d8f9f Mon Sep 17 00:00:00 2001 From: Phonixed456 Date: Fri, 20 Jan 2023 19:58:05 +0000 Subject: [PATCH] fixed ui bug --- pop_sim_rust_gui/patch_list.md | 1 + pop_sim_rust_gui/src/main.rs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pop_sim_rust_gui/patch_list.md b/pop_sim_rust_gui/patch_list.md index fe3bfed..07d8a0a 100644 --- a/pop_sim_rust_gui/patch_list.md +++ b/pop_sim_rust_gui/patch_list.md @@ -26,3 +26,4 @@ - **F** [18/01/23] Added temporary close table button as it was causing performance issues - **F** [18/01/23] Table v2 is out! Table looks nicer, and info is easier to read - **F** [18/01/23] Added a time between frames counter to show simulation performance +- **B** [20/01/23] Fixed a strange table id problem diff --git a/pop_sim_rust_gui/src/main.rs b/pop_sim_rust_gui/src/main.rs index 61a81fe..8158b20 100644 --- a/pop_sim_rust_gui/src/main.rs +++ b/pop_sim_rust_gui/src/main.rs @@ -2,7 +2,6 @@ // TODO: // -[] Migrant/Emigrant system -// -[] Mortality // -[] Differing death causes(random old age death) // -[] Epidemics // -[] Outside world influence(Migrant/Emigrant v2, plagues, things occuring outside of sim_region) @@ -279,14 +278,15 @@ fn main() { ((self.sim_data.people[id].age as f32) / 12.0) as i32 ).to_string(); - - egui::CollapsingHeader - ::new(collap_header_text) - .open(Some(true)) - .show(ui, |ui| { - ui.label(text); - }); - ui.separator(); + ui.push_id(self.sim_data.people[id].id, |ui| { + egui::CollapsingHeader + ::new(collap_header_text) + .open(Some(true)) + .show(ui, |ui| { + ui.label(text); + }); + ui.separator(); + }); } } );