Refresh selected-building panel when paused player commands drain

This commit is contained in:
2026-07-08 20:45:41 +02:00
parent fef22b9f86
commit e4ea4ca4b4
5 changed files with 47 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
#include "EntitySelectedEvent.h"
#include "EventHandler.h"
#include "GameConfig.h"
#include "PlayerCommandsAppliedEvent.h"
#include "RecipesConfig.h"
#include "SelectionChangedEvent.h"
#include "ShipLayout.h"
@@ -33,6 +34,7 @@ class QVBoxLayout;
class SelectedBuildingPanel : public QWidget,
public CombinedEventHandler<TickAdvancedEvent,
PlayerCommandsAppliedEvent,
EntitySelectedEvent,
SelectionChangedEvent,
DebugDrawToggledEvent>
@@ -46,6 +48,7 @@ public:
private:
void handleEvent(std::shared_ptr<const TickAdvancedEvent> event) override;
void handleEvent(std::shared_ptr<const PlayerCommandsAppliedEvent> event) override;
void handleEvent(std::shared_ptr<const EntitySelectedEvent> event) override;
void handleEvent(std::shared_ptr<const SelectionChangedEvent> event) override;
void handleEvent(std::shared_ptr<const DebugDrawToggledEvent> event) override;
@@ -57,6 +60,7 @@ private slots:
private:
void onSelectionChanged(const std::vector<BuildingId>& ids);
void refreshSelectionDisplay();
void rebuild();
void hideAllWidgets();
void clearContent();