Skip some unnecessary work in layout-only mode

This commit is contained in:
GriffinR 2025-05-26 15:15:46 -04:00
parent d795a1133d
commit 0ed54d6643

View File

@ -2333,11 +2333,12 @@ void MainWindow::displayEventTabs() {
}
void MainWindow::updateEvents() {
if (this->editor->map) {
for (auto i = this->lastSelectedEvent.begin(); i != this->lastSelectedEvent.end(); i++) {
if (i.value() && !this->editor->map->hasEvent(i.value()))
this->lastSelectedEvent.insert(i.key(), nullptr);
}
if (!this->editor->map)
return;
for (auto i = this->lastSelectedEvent.begin(); i != this->lastSelectedEvent.end(); i++) {
if (i.value() && !this->editor->map->hasEvent(i.value()))
this->lastSelectedEvent.insert(i.key(), nullptr);
}
displayEventTabs();
updateSelectedEvents();