Skip to content

Commit

Permalink
LibGUI: Set ProcessChooser key column and sort order after set_model (S…
Browse files Browse the repository at this point in the history
…erenityOS#3521)

Need to set the sort order after model was set to sort the table.
  • Loading branch information
umasankar-yedida authored Sep 17, 2020
1 parent d7673b4 commit 19f2203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/LibGUI/ProcessChooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ ProcessChooser::ProcessChooser(const StringView& window_title, const StringView&
m_table_view = widget.add<GUI::TableView>();
auto sorting_model = GUI::SortingProxyModel::create(RunningProcessesModel::create());
sorting_model->set_sort_role(GUI::ModelRole::Display);
m_table_view->set_key_column_and_sort_order(RunningProcessesModel::Column::PID, GUI::SortOrder::Descending);
m_table_view->set_model(sorting_model);
m_table_view->set_key_column_and_sort_order(RunningProcessesModel::Column::PID, GUI::SortOrder::Descending);

m_table_view->on_activation = [this](const ModelIndex& index) { set_pid_from_index_and_close(index); };

Expand Down

0 comments on commit 19f2203

Please sign in to comment.