layouts: fix crash on missed relayout updates (#13444)

This commit is contained in:
Vaxry 2026-02-28 23:06:27 +00:00 committed by GitHub
parent 93aacfc0dc
commit 2928d6af0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 7 deletions

View file

@ -6,6 +6,7 @@
#include "../../debug/log/Logger.hpp"
#include "../../desktop/Workspace.hpp"
#include "../../config/ConfigManager.hpp"
#include "../../event/EventBus.hpp"
using namespace Layout;
@ -17,6 +18,12 @@ SP<CSpace> CSpace::create(PHLWORKSPACE w) {
CSpace::CSpace(PHLWORKSPACE parent) : m_parent(parent) {
recheckWorkArea();
// NOLINTNEXTLINE
m_geomUpdateCallback = Event::bus()->m_events.monitor.layoutChanged.listen([this] {
recheckWorkArea();
m_algorithm->recalculate();
});
}
void CSpace::add(SP<ITarget> t) {