    current_widget->setVisible(dest.size() && !doc.isNull());
  }
  
  void MapPanel::parseResponse(const QString &response, bool success) {
    stack->setCurrentIndex((uiState()->prime_type || success) ? 0 : 1);
  
    if (!success) {
      return;
    }
  
 
</s> remove   if (!success) {
    return;
 </s> add   cur_destinations = response;
  if (isVisible()) {
    refresh(); </s> remove   QJsonDocument doc = QJsonDocument::fromJson(response.trimmed().toUtf8());
 </s> add   QJsonDocument doc = QJsonDocument::fromJson(cur_destinations.trimmed().toUtf8());
  if (!success) return;
    current_widget->setVisible(dest.size() && !doc.isNull());
  }
  
  void MapPanel::parseResponse(const QString &response, bool success) {
  if (!success) return;
  
    if (!success) {
      return;
    }
  
keep keep keep keep replace keep keep keep keep keep
 MapPanel: refresh only when visible and destination changes (#25739)

rebuild widgets only when mappanel is visible 
selfdrive/ui/qt/maps/map_settings.cc