Fixed window size not correctly updated when changed through Window::setSize (#474)

This commit is contained in:
Laurent Gomila 2013-10-08 22:59:53 +02:00
parent cc3dc29ef4
commit fe12270d62
2 changed files with 11 additions and 2 deletions

View File

@ -274,7 +274,7 @@ public :
/// \see getSize
///
////////////////////////////////////////////////////////////
void setSize(const Vector2u size);
void setSize(const Vector2u& size);
////////////////////////////////////////////////////////////
/// \brief Change the title of the window

View File

@ -231,10 +231,19 @@ Vector2u Window::getSize() const
////////////////////////////////////////////////////////////
void Window::setSize(const Vector2u size)
void Window::setSize(const Vector2u& size)
{
if (m_impl)
{
m_impl->setSize(size);
// Cache the new size
m_size.x = size.x;
m_size.y = size.y;
// Notify the derived class
onResize();
}
}