mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
committed by
Ali Mohammad Pur
parent
cf4bd4e4c9
commit
eb6cf00c0e
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user