From 783d379bfaabe8a0eb6fe368bb0ba47c905b1a80 Mon Sep 17 00:00:00 2001 From: Rubén Beltrán del Río Date: Fri, 16 Jan 2026 12:01:32 +0100 Subject: Allow for custom stages --- src/handlers/view.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/handlers') 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(); } } -- cgit