From 81b5c2af3171f941f3eda2f67e633df1fdbc96e2 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Mon, 30 Dec 2024 15:37:09 +0500 Subject: [PATCH] UI: ProgramsWindow: Check value from ini --- src/ui/form/prog/programswindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/form/prog/programswindow.cpp b/src/ui/form/prog/programswindow.cpp index 876828a69..56950b743 100644 --- a/src/ui/form/prog/programswindow.cpp +++ b/src/ui/form/prog/programswindow.cpp @@ -429,7 +429,8 @@ QLayout *ProgramsWindow::setupSortStatesLayout() m_btSortAlerted = createCheckableToolButton( ":/icons/error.png", [&] { onSortStateClicked(AppListModel::SortAlerted); }); - appListModel()->setSortState(AppListModel::SortState(iniUser()->progWindowSortState())); + appListModel()->setSortState(qBound(AppListModel::SortNone, + AppListModel::SortState(iniUser()->progWindowSortState()), AppListModel::SortAlerted)); const auto refreshSortStates = [&] { const auto sortState = appListModel()->sortState();