diff options
| author | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-01-16 12:01:32 +0100 |
|---|---|---|
| committer | Rubén Beltrán del Río <jj@r.bdr.sh> | 2026-01-16 14:11:11 +0100 |
| commit | 783d379bfaabe8a0eb6fe368bb0ba47c905b1a80 (patch) | |
| tree | 4cbb8d1df7f0451db06d46b20c1b5dd57026c7f2 /src/handlers | |
| parent | 81cd06b3334f2f91f6a1ab62a28e11c7d0c677eb (diff) | |
Allow for custom stages
Diffstat (limited to 'src/handlers')
| -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(); } } |