mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:15:08 +00:00
LibGUI: Set ProcessChooser key column and sort order after set_model (#3521)
Need to set the sort order after model was set to sort the table.
This commit is contained in:
parent
d7673b41ef
commit
19f2203b53
1 changed files with 1 additions and 1 deletions
|
@ -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); };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue