Don't pass parameters to wxSizerXmlHandler::GetGB{Pos,Span}()
This doesn't make sense, these functions can only be ever used with a single parameter ("cellpos" for the former and "cellspan" for the latter), so just hard-code it inside the functions themselves. No real changes, just make the code less confusing.
This commit is contained in:
@@ -52,8 +52,8 @@ private:
|
|||||||
bool ValidateGridSizerChildren();
|
bool ValidateGridSizerChildren();
|
||||||
void SetFlexibleMode(wxFlexGridSizer* fsizer);
|
void SetFlexibleMode(wxFlexGridSizer* fsizer);
|
||||||
void SetGrowables(wxFlexGridSizer* fsizer, const wxChar* param, bool rows);
|
void SetGrowables(wxFlexGridSizer* fsizer, const wxChar* param, bool rows);
|
||||||
wxGBPosition GetGBPos(const wxString& param);
|
wxGBPosition GetGBPos();
|
||||||
wxGBSpan GetGBSpan(const wxString& param);
|
wxGBSpan GetGBSpan();
|
||||||
wxSizerItem* MakeSizerItem();
|
wxSizerItem* MakeSizerItem();
|
||||||
void SetSizerItemAttributes(wxSizerItem* sitem);
|
void SetSizerItemAttributes(wxSizerItem* sitem);
|
||||||
void AddSizerItem(wxSizerItem* sitem);
|
void AddSizerItem(wxSizerItem* sitem);
|
||||||
|
@@ -512,17 +512,17 @@ void wxSizerXmlHandler::SetGrowables(wxFlexGridSizer* sizer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxGBPosition wxSizerXmlHandler::GetGBPos(const wxString& param)
|
wxGBPosition wxSizerXmlHandler::GetGBPos()
|
||||||
{
|
{
|
||||||
wxSize sz = GetPairInts(param);
|
wxSize sz = GetPairInts(wxS("cellpos"));
|
||||||
if (sz.x < 0) sz.x = 0;
|
if (sz.x < 0) sz.x = 0;
|
||||||
if (sz.y < 0) sz.y = 0;
|
if (sz.y < 0) sz.y = 0;
|
||||||
return wxGBPosition(sz.x, sz.y);
|
return wxGBPosition(sz.x, sz.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGBSpan wxSizerXmlHandler::GetGBSpan(const wxString& param)
|
wxGBSpan wxSizerXmlHandler::GetGBSpan()
|
||||||
{
|
{
|
||||||
wxSize sz = GetPairInts(param);
|
wxSize sz = GetPairInts(wxS("cellspan"));
|
||||||
if (sz.x < 1) sz.x = 1;
|
if (sz.x < 1) sz.x = 1;
|
||||||
if (sz.y < 1) sz.y = 1;
|
if (sz.y < 1) sz.y = 1;
|
||||||
return wxGBSpan(sz.x, sz.y);
|
return wxGBSpan(sz.x, sz.y);
|
||||||
@@ -863,8 +863,8 @@ void wxSizerXmlHandler::SetSizerItemAttributes(wxSizerItem* sitem)
|
|||||||
if (m_isGBS)
|
if (m_isGBS)
|
||||||
{
|
{
|
||||||
wxGBSizerItem* gbsitem = (wxGBSizerItem*)sitem;
|
wxGBSizerItem* gbsitem = (wxGBSizerItem*)sitem;
|
||||||
gbsitem->SetPos(GetGBPos(wxT("cellpos")));
|
gbsitem->SetPos(GetGBPos());
|
||||||
gbsitem->SetSpan(GetGBSpan(wxT("cellspan")));
|
gbsitem->SetSpan(GetGBSpan());
|
||||||
}
|
}
|
||||||
|
|
||||||
// record the id of the item, if any, for use by XRCSIZERITEM()
|
// record the id of the item, if any, for use by XRCSIZERITEM()
|
||||||
|
Reference in New Issue
Block a user