[core] Reset zoom history state in still mode
This commit is contained in:
@@ -68,8 +68,15 @@ void Renderer::Impl::setObserver(RendererObserver* observer_) {
|
||||
}
|
||||
|
||||
void Renderer::Impl::render(const UpdateParameters& updateParameters) {
|
||||
// Don't load/render anyting in still mode until explicitly requested.
|
||||
if (updateParameters.mode == MapMode::Still && !updateParameters.stillImageRequest) return;
|
||||
if (updateParameters.mode == MapMode::Still) {
|
||||
// Don't load/render anyting in still mode until explicitly requested.
|
||||
if (!updateParameters.stillImageRequest) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset zoom history state.
|
||||
zoomHistory.first = true;
|
||||
}
|
||||
|
||||
assert(BackendScope::exists());
|
||||
|
||||
|
||||
@@ -62,4 +62,10 @@ TEST(API, ZoomHistory) {
|
||||
// ZoomHistory.lastIntegerZoom should be 0.
|
||||
map->setZoom(0.5);
|
||||
test::checkImage("test/fixtures/zoom_history", frontend.render(*map), 0.0002);
|
||||
|
||||
map->setZoom(1.0);
|
||||
frontend.render(*map);
|
||||
|
||||
map->setZoom(0.5);
|
||||
test::checkImage("test/fixtures/zoom_history", frontend.render(*map), 0.0002);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user