diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc index 305f0fc618d2f43b356052b815286ede6d332664..9bb2023551128766235d86af9e39e032fa8a785b 100644 --- a/src/ui/HUD.cc +++ b/src/ui/HUD.cc @@ -1279,14 +1279,16 @@ void HUD::drawCircle(float refX, float refY, float radius, float startDeg, float void HUD::resizeGL(int w, int h) { - glViewport(0, 0, w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0, w, 0, h, -1, 1); - glMatrixMode(GL_MODELVIEW); - glPolygonMode(GL_FRONT, GL_FILL); - //FIXME - paintHUD(); + if (isVisible()) { + glViewport(0, 0, w, h); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, w, 0, h, -1, 1); + glMatrixMode(GL_MODELVIEW); + glPolygonMode(GL_FRONT, GL_FILL); + //FIXME + paintHUD(); + } } void HUD::selectWaypoint(int uasId, int id)