summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GModel.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-13 23:36:36 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-13 23:36:36 +0100
commit0ac74d377808cb7b65a0d2f2030085a6bd341d63 (patch)
treeaac92794c68375dfbcab488572820f4af3abc115 /Libraries/LibGUI/GModel.cpp
parentb909d991f1c14acadf0ea35d2a30e37e1f52870b (diff)
downloadserenity-0ac74d377808cb7b65a0d2f2030085a6bd341d63.zip
LibGUI: Make GTreeView inherit from GAbstractColumnView
This makes GTreeView able to support multi-column models! Only one column can be the "tree column", this is column 0 by default but can be changed by overriding GModel::tree_column().
Diffstat (limited to 'Libraries/LibGUI/GModel.cpp')
-rw-r--r--Libraries/LibGUI/GModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/GModel.cpp b/Libraries/LibGUI/GModel.cpp
index d1c4e94d35..96834b4d4c 100644
--- a/Libraries/LibGUI/GModel.cpp
+++ b/Libraries/LibGUI/GModel.cpp
@@ -42,7 +42,7 @@ GModelIndex GModel::create_index(int row, int column, const void* data) const
GModelIndex GModel::sibling(int row, int column, const GModelIndex& parent) const
{
if (!parent.is_valid())
- return {};
+ return index(row, column, {});
int row_count = this->row_count(parent);
if (row < 0 || row > row_count)
return {};