Check for multiple calls to wxGrid::CreateGrid
Changed number format for wxGridCellFloatEditor from f to g git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -465,7 +465,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
// string representation of m_valueOld
|
// string representation of m_valueOld
|
||||||
wxString GetString() const
|
wxString GetString() const
|
||||||
{ return wxString::Format(_T("%f"), m_valueOld); }
|
{ return wxString::Format(_T("%g"), m_valueOld); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double m_valueOld;
|
double m_valueOld;
|
||||||
|
@@ -3181,13 +3181,10 @@ void wxGrid::Create()
|
|||||||
bool wxGrid::CreateGrid( int numRows, int numCols,
|
bool wxGrid::CreateGrid( int numRows, int numCols,
|
||||||
wxGrid::wxGridSelectionModes selmode )
|
wxGrid::wxGridSelectionModes selmode )
|
||||||
{
|
{
|
||||||
if ( m_created )
|
wxCHECK_MSG( !m_created,
|
||||||
{
|
FALSE,
|
||||||
wxFAIL_MSG( wxT("wxGrid::CreateGrid or wxGrid::SetTable called more than once") );
|
wxT("wxGrid::CreateGrid or wxGrid::SetTable called more than once") );
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_numRows = numRows;
|
m_numRows = numRows;
|
||||||
m_numCols = numCols;
|
m_numCols = numCols;
|
||||||
|
|
||||||
@@ -3197,7 +3194,7 @@ bool wxGrid::CreateGrid( int numRows, int numCols,
|
|||||||
m_selection = new wxGridSelection( this, selmode );
|
m_selection = new wxGridSelection( this, selmode );
|
||||||
Init();
|
Init();
|
||||||
m_created = TRUE;
|
m_created = TRUE;
|
||||||
}
|
|
||||||
return m_created;
|
return m_created;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user