From cf11aa8deab491e540c6a7b73edc9b69d259a79d Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Mon, 16 Apr 2012 00:57:30 +0000 Subject: [PATCH] Fixes Atlas canvas resolution init on OS X. Replaces hacky solution for the same problem on wxGTK. Fixes #1176. This was SVN commit r11525. --- .../tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp | 2 +- .../tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp b/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp index 7f522a3159..f03954d161 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/Canvas/Canvas.cpp @@ -47,7 +47,7 @@ void Canvas::OnResize(wxSizeEvent&) void Canvas::InitSize() { m_SuppressResize = false; - SetSize(320, 240); + SetSize(GetClientSize()); } diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp index 873760228a..b80570841f 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp @@ -529,14 +529,6 @@ ScenarioEditor::ScenarioEditor(wxWindow* parent, ScriptInterface& scriptInterfac // else to do)) m_Timer.SetOwner(this); m_Timer.Start(20); - -#ifdef __WXGTK__ - // TODO: Is this necessary? - // HACK: because of how we fiddle with stuff earlier to make sure the canvas - // is displayed, the layout gets messed up, and it only seems to be fixable - // by changing the window's size - SetSize(GetSize() + wxSize(1, 0)); -#endif } wxToolBar* ScenarioEditor::OnCreateToolBar(long style, wxWindowID id, const wxString& WXUNUSED(name))