diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-15 00:49:40 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-15 00:50:51 +0200 |
commit | ef09f9c825f767c877a23d9d699d3d0a91f52266 (patch) | |
tree | 4fd793dfc3345eadd00511f54a2f6f361c1f316b /Userland/Applications | |
parent | 16221305ade1e37d68c95d9bf674021afc18570f (diff) | |
download | serenity-ef09f9c825f767c877a23d9d699d3d0a91f52266.zip |
SystemMonitor: Make sure we set a model before changing column sizes
Changing a view's column metadata requires that a model is set.
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/SystemMonitor/ProcessStateWidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/SystemMonitor/ProcessStateWidget.cpp b/Userland/Applications/SystemMonitor/ProcessStateWidget.cpp index dea0b5e7d6..9b17340f65 100644 --- a/Userland/Applications/SystemMonitor/ProcessStateWidget.cpp +++ b/Userland/Applications/SystemMonitor/ProcessStateWidget.cpp @@ -86,9 +86,9 @@ ProcessStateWidget::ProcessStateWidget(pid_t pid) set_layout<GUI::VerticalBoxLayout>(); layout()->set_margins({ 4, 4, 4, 4 }); m_table_view = add<GUI::TableView>(); + m_table_view->set_model(adopt_ref(*new ProcessStateModel(ProcessModel::the(), pid))); m_table_view->column_header().set_visible(false); m_table_view->column_header().set_section_size(0, 90); - m_table_view->set_model(adopt_ref(*new ProcessStateModel(ProcessModel::the(), pid))); } ProcessStateWidget::~ProcessStateWidget() |