diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-13 23:36:36 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-13 23:36:36 +0100 |
commit | 0ac74d377808cb7b65a0d2f2030085a6bd341d63 (patch) | |
tree | aac92794c68375dfbcab488572820f4af3abc115 /Libraries/LibGUI/GModel.cpp | |
parent | b909d991f1c14acadf0ea35d2a30e37e1f52870b (diff) | |
download | serenity-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.cpp | 2 |
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 {}; |