layouts: fix crash on missed relayout updates (#13444)
This commit is contained in:
parent
93aacfc0dc
commit
2928d6af0a
5 changed files with 27 additions and 7 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue