nav: don't set FBO, render when not loaded and resize once (#21468)
* nav: don't set FBO and resize once * always update * when visible old-commit-hash: 06acd76d6d9583429b1c0977a6d18586997e3623
This commit is contained in:
@@ -117,6 +117,10 @@ void MapWindow::initLayers() {
|
||||
}
|
||||
|
||||
void MapWindow::timerUpdate() {
|
||||
if (isVisible()) {
|
||||
update();
|
||||
}
|
||||
|
||||
loaded_once = loaded_once || m_map->isFullyLoaded();
|
||||
if (!loaded_once) {
|
||||
map_instructions->showError("Map loading");
|
||||
@@ -219,11 +223,10 @@ void MapWindow::timerUpdate() {
|
||||
map_instructions->showError("Waiting for GPS");
|
||||
}
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void MapWindow::resizeGL(int w, int h) {
|
||||
m_map->resize(size() / MAP_SCALE);
|
||||
map_instructions->setFixedWidth(width());
|
||||
}
|
||||
|
||||
@@ -251,9 +254,6 @@ void MapWindow::initializeGL() {
|
||||
|
||||
void MapWindow::paintGL() {
|
||||
if (!isVisible()) return;
|
||||
|
||||
m_map->resize(size() / MAP_SCALE);
|
||||
m_map->setFramebufferObject(defaultFramebufferObject(), size());
|
||||
m_map->render();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user