in DoSetSize, only call GetPosition if necessary
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2523,12 +2523,15 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
|
|||||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
|
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
|
||||||
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindowGTK::SetSize requires parent.\n") );
|
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindowGTK::SetSize requires parent.\n") );
|
||||||
|
|
||||||
int currentX, currentY;
|
if ((sizeFlags & wxSIZE_ALLOW_MINUS_ONE) == 0 && (x == -1 || y == -1))
|
||||||
GetPosition(¤tX, ¤tY);
|
{
|
||||||
if (x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
|
int currentX, currentY;
|
||||||
x = currentX;
|
GetPosition(¤tX, ¤tY);
|
||||||
if (y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
|
if (x == -1)
|
||||||
y = currentY;
|
x = currentX;
|
||||||
|
if (y == -1)
|
||||||
|
y = currentY;
|
||||||
|
}
|
||||||
AdjustForParentClientOrigin(x, y, sizeFlags);
|
AdjustForParentClientOrigin(x, y, sizeFlags);
|
||||||
|
|
||||||
// calculate the best size if we should auto size the window
|
// calculate the best size if we should auto size the window
|
||||||
|
Reference in New Issue
Block a user