[core] only update the render order array when there are changes to tiles
This commit is contained in:
@@ -527,9 +527,14 @@ bool Source::update(MapData& data,
|
||||
}
|
||||
|
||||
void Source::updateTilePtrs() {
|
||||
tilePtrs.clear();
|
||||
std::vector<Tile*> newPtrs;
|
||||
for (const auto& pair : tiles) {
|
||||
tilePtrs.push_back(pair.second.get());
|
||||
newPtrs.push_back(pair.second.get());
|
||||
}
|
||||
|
||||
if (tilePtrs != newPtrs) {
|
||||
tilePtrs.swap(newPtrs);
|
||||
emitTileLoaded(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user