mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibGUI: Fix bogus root index column_count() in FilteringProxyModel
The root index (ModelIndex()) should should have the same column count as the root index in the underlying model.
This commit is contained in:
parent
9ec826144f
commit
e12d2f9a04
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ int FilteringProxyModel::row_count(ModelIndex const&) const
|
|||
int FilteringProxyModel::column_count(ModelIndex const& index) const
|
||||
{
|
||||
if (!index.is_valid())
|
||||
return {};
|
||||
return m_model->column_count({});
|
||||
|
||||
if ((size_t)index.row() > m_matching_indices.size() || index.row() < 0)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue