mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
SystemMonitor: Register ProcessStateModel with ProcessModel on construct
Since this was missing, ProcessStateModel never received model_did_update, and it was possible for the ProcessModel index to go stale and show another process. Fixes #9129.
This commit is contained in:
parent
cf4bd4e4c9
commit
eb6cf00c0e
1 changed files with 6 additions and 1 deletions
|
@ -23,9 +23,14 @@ public:
|
|||
: m_target(target)
|
||||
, m_pid(pid)
|
||||
{
|
||||
m_target.register_client(*this);
|
||||
refresh();
|
||||
}
|
||||
virtual ~ProcessStateModel() override { }
|
||||
|
||||
virtual ~ProcessStateModel() override
|
||||
{
|
||||
m_target.unregister_client(*this);
|
||||
}
|
||||
|
||||
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return m_target.column_count({}); }
|
||||
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return 2; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue