Fixes Atlas canvas resolution init on OS X. Replaces hacky solution for the same problem on wxGTK. Fixes #1176.

This was SVN commit r11525.
This commit is contained in:
historic_bruno 2012-04-16 00:57:30 +00:00
parent d7b31da2dc
commit cf11aa8dea
2 changed files with 1 additions and 9 deletions

View File

@ -47,7 +47,7 @@ void Canvas::OnResize(wxSizeEvent&)
void Canvas::InitSize()
{
m_SuppressResize = false;
SetSize(320, 240);
SetSize(GetClientSize());
}

View File

@ -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))