diff options
Diffstat (limited to 'src/handlers/view.rs')
| -rw-r--r-- | src/handlers/view.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/handlers/view.rs b/src/handlers/view.rs index 57f526a..020b756 100644 --- a/src/handlers/view.rs +++ b/src/handlers/view.rs @@ -1,7 +1,6 @@ use relm4::gtk; use crate::AppModel; -use crate::stages::ALL_STAGE_TYPES; /// Toggles between horizontal and vertical layout orientation. pub fn change_orientation(model: &mut AppModel) { @@ -13,8 +12,8 @@ pub fn change_orientation(model: &mut AppModel) { /// Updates the selected stage type from dropdown selection. pub fn stage_type_selected(model: &mut AppModel, index: usize) { - if index < ALL_STAGE_TYPES.len() { - model.stage_type = ALL_STAGE_TYPES[index].clone(); + if index < model.available_stage_types.len() { + model.stage_type = model.available_stage_types[index].clone(); model.update_image(); } } |