Replace wxGridCellBoolRenderer::ms_sizeCheckMark with a local var
This variable is (now) only used in a single function, so there is no reason to declare it as a class member. No real changes.
This commit is contained in:
@@ -143,9 +143,6 @@ public:
|
|||||||
|
|
||||||
virtual wxGridCellRenderer *Clone() const wxOVERRIDE
|
virtual wxGridCellRenderer *Clone() const wxOVERRIDE
|
||||||
{ return new wxGridCellBoolRenderer; }
|
{ return new wxGridCellBoolRenderer; }
|
||||||
|
|
||||||
private:
|
|
||||||
static wxSize ms_sizeCheckMark;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -920,22 +920,22 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
|
|||||||
// wxGridCellBoolRenderer
|
// wxGridCellBoolRenderer
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxSize wxGridCellBoolRenderer::ms_sizeCheckMark;
|
|
||||||
|
|
||||||
wxSize wxGridCellBoolRenderer::GetBestSize(wxGrid& grid,
|
wxSize wxGridCellBoolRenderer::GetBestSize(wxGrid& grid,
|
||||||
wxGridCellAttr& WXUNUSED(attr),
|
wxGridCellAttr& WXUNUSED(attr),
|
||||||
wxDC& WXUNUSED(dc),
|
wxDC& WXUNUSED(dc),
|
||||||
int WXUNUSED(row),
|
int WXUNUSED(row),
|
||||||
int WXUNUSED(col))
|
int WXUNUSED(col))
|
||||||
{
|
{
|
||||||
|
static wxSize s_sizeCheckMark;
|
||||||
|
|
||||||
// compute it only once (no locks for MT safeness in GUI thread...)
|
// compute it only once (no locks for MT safeness in GUI thread...)
|
||||||
if ( !ms_sizeCheckMark.x )
|
if ( !s_sizeCheckMark.x )
|
||||||
{
|
{
|
||||||
ms_sizeCheckMark =
|
s_sizeCheckMark =
|
||||||
wxRendererNative::Get().GetCheckBoxSize(&grid, wxCONTROL_CELL);
|
wxRendererNative::Get().GetCheckBoxSize(&grid, wxCONTROL_CELL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ms_sizeCheckMark;
|
return s_sizeCheckMark;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGridCellBoolRenderer::Draw(wxGrid& grid,
|
void wxGridCellBoolRenderer::Draw(wxGrid& grid,
|
||||||
|
Reference in New Issue
Block a user