diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-25 10:47:30 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-25 10:47:30 +0100 |
commit | 9c6f7d3e7d2252ad2d51f2c7c7379cab867fa477 (patch) | |
tree | d021ca876075e5dc5c32e10516c1c971e9cac4c9 | |
parent | 074d935c6edd48b707788147727b54684a4d6164 (diff) | |
download | serenity-9c6f7d3e7d2252ad2d51f2c7c7379cab867fa477.zip |
LibGUI: Actually store the column in MultiView::set_model_column()
We were only forwarding the value to the subviews, but not storing it
in m_model_column. This would cause MultiView::model_column() to return
the wrong value.
Thanks to Daniel Bos for spotting this! :^)
-rw-r--r-- | Libraries/LibGUI/MultiView.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibGUI/MultiView.cpp b/Libraries/LibGUI/MultiView.cpp index 162a6c32c4..87334be9e4 100644 --- a/Libraries/LibGUI/MultiView.cpp +++ b/Libraries/LibGUI/MultiView.cpp @@ -137,6 +137,9 @@ void MultiView::set_model(RefPtr<Model> model) void MultiView::set_model_column(int column) { + if (m_model_column == column) + return; + m_model_column = column; m_item_view->set_model_column(column); m_columns_view->set_model_column(column); } |