Fixed window size not correctly updated when changed through Window::setSize (#474)
This commit is contained in:
parent
cc3dc29ef4
commit
fe12270d62
@ -274,7 +274,7 @@ public :
|
||||
/// \see getSize
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void setSize(const Vector2u size);
|
||||
void setSize(const Vector2u& size);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the title of the window
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user