    void clear();
  
  private:
    void showEvent(QShowEvent *event) override;
  
    Params params;
    QString prev_destinations, cur_destinations;
    QStackedWidget *stack;
    QPushButton *home_button, *work_button;
    QLabel *home_address, *work_address;
 
</s> remove   stack->setCurrentIndex((uiState()->prime_type || success) ? 0 : 1);
 </s> add   if (!success) return;
  void refresh();
    void clear();
  
  private:
    void showEvent(QShowEvent *event) override;
  void refresh();
  
    Params params;
    QString prev_destinations, cur_destinations;
    QStackedWidget *stack;
    QPushButton *home_button, *work_button;
    QLabel *home_address, *work_address;
keep keep keep add keep 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.h