2210: Sprites can be removed / updated correctly

This commit is contained in:
Romain Quidet
2015-11-30 14:18:10 +01:00
committed by Minh Nguyễn
parent 02a32b55e4
commit af45d87e54
7 changed files with 24 additions and 5 deletions

View File

@@ -272,6 +272,11 @@ void MapContext::addAnnotationIcon(const std::string& name, std::shared_ptr<cons
assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
data.getAnnotationManager()->addIcon(name, sprite);
}
void MapContext::removeAnnotationIcon(const std::string& name) {
assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
data.getAnnotationManager()->removeIcon(name);
}
double MapContext::getTopOffsetPixelsForAnnotationIcon(const std::string& name) {
assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
@@ -298,7 +303,7 @@ void MapContext::onLowMemory() {
style->onLowMemory();
asyncInvalidate.send();
}
void MapContext::onTileDataChanged() {
assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
updateFlags |= Update::Repaint;