mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-21 17:45:44 -05:00
Skip some unnecessary work in layout-only mode
This commit is contained in:
parent
d795a1133d
commit
0ed54d6643
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user