diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp index d7227ac29b..332ead6c4b 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -569,19 +568,6 @@ MapSidebar::MapSidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContaine } } -void MapSidebar::OnCollapse(wxCollapsiblePaneEvent& WXUNUSED(evt)) -{ - Freeze(); - - // Toggling the collapsing doesn't seem to update the sidebar layout - // automatically, so do it explicitly here - Layout(); - - Refresh(); // fixes repaint glitch on Windows - - Thaw(); -} - void MapSidebar::OnFirstDisplay() { // We do this here becase messages are used which requires simulation to be init'd @@ -860,7 +846,6 @@ void MapSidebar::OnResizeMap(wxCommandEvent& WXUNUSED(evt)) } BEGIN_EVENT_TABLE(MapSidebar, Sidebar) - EVT_COLLAPSIBLEPANE_CHANGED(wxID_ANY, MapSidebar::OnCollapse) EVT_BUTTON(ID_SimPlay, MapSidebar::OnSimPlay) EVT_BUTTON(ID_SimFast, MapSidebar::OnSimPlay) EVT_BUTTON(ID_SimSlow, MapSidebar::OnSimPlay) @@ -871,4 +856,4 @@ BEGIN_EVENT_TABLE(MapSidebar, Sidebar) EVT_BUTTON(ID_ResizeMap, MapSidebar::OnResizeMap) EVT_BUTTON(ID_OpenPlayerPanel, MapSidebar::OnOpenPlayerPanel) EVT_CHOICE(ID_RandomScript, MapSidebar::OnRandomScript) -END_EVENT_TABLE(); +END_EVENT_TABLE() diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.h index 9a8acca1b6..50112f0062 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.h @@ -21,7 +21,6 @@ class MapSettingsControl; class ScenarioEditor; -class wxCollapsiblePaneEvent; class wxWindow; class MapSidebar : public Sidebar @@ -37,7 +36,6 @@ protected: private: MapSettingsControl* m_MapSettingsCtrl; - void OnCollapse(wxCollapsiblePaneEvent& evt); void OnOpenPlayerPanel(wxCommandEvent& evt); void OnRandomScript(wxCommandEvent& evt); void OnRandomReseed(wxCommandEvent& evt); diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.cpp index e5409f52ed..28c76d1415 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.cpp @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -250,9 +249,6 @@ public: // TODO: possibly have advanced panel where each player's diplomacy can be set? // Advanced panel - /*wxCollapsiblePane* advPane = new wxCollapsiblePane(this, wxID_ANY, _("Advanced")); - wxWindow* pane = advPane->GetPane(); - diplomacySizer->Add(advPane, 0, wxGROW | wxALL, 2);*/ sizer->Add(diplomacySizer, wxSizerFlags().Expand().Border(wxTOP, 10)); } @@ -999,19 +995,6 @@ PlayerSidebar::PlayerSidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarCo scrollSizer->Add(m_PlayerSettingsCtrl, wxSizerFlags().Expand()); } -void PlayerSidebar::OnCollapse(wxCollapsiblePaneEvent& WXUNUSED(evt)) -{ - Freeze(); - - // Toggling the collapsing doesn't seem to update the sidebar layout - // automatically, so do it explicitly here - Layout(); - - Refresh(); // fixes repaint glitch on Windows - - Thaw(); -} - void PlayerSidebar::OnFirstDisplay() { // We do this here becase messages are used which requires simulation to be init'd @@ -1032,7 +1015,3 @@ void PlayerSidebar::OnMapReload() m_PlayerSettingsCtrl->ReadFromEngine(); } } - -BEGIN_EVENT_TABLE(PlayerSidebar, Sidebar) - EVT_COLLAPSIBLEPANE_CHANGED(wxID_ANY, PlayerSidebar::OnCollapse) -END_EVENT_TABLE(); diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.h index a9d1026271..66c82846b1 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Player/Player.h @@ -27,7 +27,6 @@ class PlayerSettingsControl; class ScenarioEditor; class wxButton; class wxChoice; -class wxCollapsiblePaneEvent; class wxSpinCtrl; class wxTextCtrl; class wxWindow; @@ -47,11 +46,7 @@ protected: private: PlayerSettingsControl* m_PlayerSettingsCtrl; - void OnCollapse(wxCollapsiblePaneEvent& evt); - bool m_Loaded; - - DECLARE_EVENT_TABLE(); }; // Controls present on each player page