mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibGUI: GTableView should clear the selection if clicking outside items.
This commit is contained in:
@@ -66,6 +66,10 @@ GModelIndex ProcessTableModel::selected_index() const
|
||||
|
||||
void ProcessTableModel::set_selected_index(GModelIndex index)
|
||||
{
|
||||
if (!index.is_valid()) {
|
||||
m_selected_row = -1;
|
||||
return;
|
||||
}
|
||||
if (index.row() >= 0 && index.row() < m_pids.size())
|
||||
m_selected_row = index.row();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user