From 24e44b9fda37df40cd76b78546657861615c9df8 Mon Sep 17 00:00:00 2001 From: Tobias Rehbein Date: Sat, 7 Sep 2024 21:56:00 +0200 Subject: [PATCH] Revert "Add popdown* functions to top bar" This reverts commit f985113db2c7995f9ddf8c2a7f7cd50ab89827d1. Calling the `popdown*' functions causes the destructors of the views to be called. As a result, the views lose their state. Reverting this commit may use a little extra memory as the views are kept in memory, but seems to have no other negative impact and restores the behaviour known from 3.0. Closes #2329 --- client/top_bar.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/client/top_bar.cpp b/client/top_bar.cpp index eb75177917..dd3f63dfa8 100644 --- a/client/top_bar.cpp +++ b/client/top_bar.cpp @@ -38,9 +38,7 @@ #include "ratesdlg_g.h" #include "tileset/sprite.h" #include "top_bar.h" -#include "views/view_economics.h" #include "views/view_map.h" -#include "views/view_nations.h" #include "views/view_research.h" #include "views/view_units.h" @@ -449,11 +447,7 @@ void top_bar::addWidget(QWidget *fsw) */ void top_bar_show_map() { - popdown_units_view(); popdown_city_dialog(); - popdown_players_report(); - popdown_economy_report(); - popdown_science_report(); queen()->game_tab_widget->setCurrentIndex(0); }