diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-21 19:52:04 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-21 19:55:44 +0200 |
commit | 2adb0a07e53695e1f636384a3323aba828d48e52 (patch) | |
tree | d1affc27e33ec70daaa4d317d39ee2c6c781415b /Libraries/LibGUI/AbstractTableView.cpp | |
parent | c666c251c89f9d63a4855494cc2cf0f92e524db0 (diff) | |
download | serenity-2adb0a07e53695e1f636384a3323aba828d48e52.zip |
LibGUI: Get rid of Model::ColumnMetadata and always use auto-sizing
Auto-sizing of view columns is now enabled by default. This removes the
last remaining need for ColumnMetadata, so this patch gets rid of it.
Diffstat (limited to 'Libraries/LibGUI/AbstractTableView.cpp')
-rw-r--r-- | Libraries/LibGUI/AbstractTableView.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Libraries/LibGUI/AbstractTableView.cpp b/Libraries/LibGUI/AbstractTableView.cpp index 094f637d01..9e8694b0ad 100644 --- a/Libraries/LibGUI/AbstractTableView.cpp +++ b/Libraries/LibGUI/AbstractTableView.cpp @@ -59,9 +59,6 @@ void AbstractTableView::select_all() void AbstractTableView::update_column_sizes() { - if (!m_size_columns_to_fit_content) - return; - if (!model()) return; @@ -249,13 +246,7 @@ int AbstractTableView::column_width(int column_index) const { if (!model()) return 0; - auto& column_data = this->column_data(column_index); - if (!column_data.has_initialized_width) { - ASSERT(!m_size_columns_to_fit_content); - column_data.has_initialized_width = true; - column_data.width = model()->column_metadata(column_index).preferred_width; - } - return column_data.width; + return column_data(column_index).width; } void AbstractTableView::mousemove_event(MouseEvent& event) |