Fix wxWrapSizer minimal size calculation.
Add a unit test checking that wxWrapSizer::CalcMin() returns the expected results. Closes #12464. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -665,6 +665,10 @@ public:
|
||||
m_position = pos;
|
||||
m_size = size;
|
||||
Layout();
|
||||
|
||||
// This call is required for wxWrapSizer to be able to calculate its
|
||||
// minimal size correctly.
|
||||
InformFirstDirection(wxHORIZONTAL, size.x, size.y);
|
||||
}
|
||||
void SetDimension(int x, int y, int width, int height)
|
||||
{ SetDimension(wxPoint(x, y), wxSize(width, height)); }
|
||||
|
@@ -525,12 +525,7 @@ public:
|
||||
// tells the item how much more space there is available in the opposite
|
||||
// direction (-1 if unknown).
|
||||
virtual bool
|
||||
InformFirstDirection(int WXUNUSED(direction),
|
||||
int WXUNUSED(size),
|
||||
int WXUNUSED(availableOtherDir))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
InformFirstDirection(int direction, int size, int availableOtherDir);
|
||||
|
||||
// sends a size event to the window using its current size -- this has an
|
||||
// effect of refreshing the window layout
|
||||
|
Reference in New Issue
Block a user