Validate wxBoxSizer flags instead of silently ignoring invalid combinations.

Detect using flags corresponding to the major sizer direction (which doesn't
make sense as only the proportion governs the behaviour in this direction) and
also combinations of alignment flags with wxEXPAND.
This commit is contained in:
Vadim Zeitlin
2015-04-03 16:32:32 +02:00
parent 7811394694
commit 78b98bf00c
4 changed files with 121 additions and 2 deletions

View File

@@ -941,6 +941,9 @@ public:
virtual void RecalcSizes() wxOVERRIDE;
protected:
// Only overridden to perform extra debugging checks.
virtual wxSizerItem *DoInsert(size_t index, wxSizerItem *item) wxOVERRIDE;
// helpers for our code: this returns the component of the given wxSize in
// the direction of the sizer and in the other direction, respectively
int GetSizeInMajorDir(const wxSize& sz) const