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:
parent
f2923d49e1
commit
d41d159576
@ -143,9 +143,6 @@ public:
|
||||
|
||||
virtual wxGridCellRenderer *Clone() const wxOVERRIDE
|
||||
{ return new wxGridCellBoolRenderer; }
|
||||
|
||||
private:
|
||||
static wxSize ms_sizeCheckMark;
|
||||
};
|
||||
|
||||
|
||||
|
@ -920,22 +920,22 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
|
||||
// wxGridCellBoolRenderer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxSize wxGridCellBoolRenderer::ms_sizeCheckMark;
|
||||
|
||||
wxSize wxGridCellBoolRenderer::GetBestSize(wxGrid& grid,
|
||||
wxGridCellAttr& WXUNUSED(attr),
|
||||
wxDC& WXUNUSED(dc),
|
||||
int WXUNUSED(row),
|
||||
int WXUNUSED(col))
|
||||
{
|
||||
static wxSize s_sizeCheckMark;
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
return ms_sizeCheckMark;
|
||||
return s_sizeCheckMark;
|
||||
}
|
||||
|
||||
void wxGridCellBoolRenderer::Draw(wxGrid& grid,
|
||||
|
Loading…
Reference in New Issue
Block a user