fall back on text value if no long/double value could be retrieved from the cell

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2000-02-23 16:15:46 +00:00
parent 3324d5f50f
commit 9c4ba61452

View File

@ -700,6 +700,7 @@ void wxGridCellNumberEditor::StartingKey(wxKeyEvent& event)
event.Skip();
}
// ----------------------------------------------------------------------------
// wxGridCellFloatEditor
// ----------------------------------------------------------------------------
@ -1100,7 +1101,10 @@ wxString wxGridCellNumberRenderer::GetString(wxGrid& grid, int row, int col)
{
text.Printf(_T("%ld"), table->GetValueAsLong(row, col));
}
//else: leave the string empty or put 0 into it?
else
{
text = table->GetValue(row, col);
}
return text;
}
@ -1158,7 +1162,10 @@ wxString wxGridCellFloatRenderer::GetString(wxGrid& grid, int row, int col)
text.Printf(m_format, table->GetValueAsDouble(row, col));
}
//else: leave the string empty or put 0 into it?
else
{
text = table->GetValue(row, col);
}
return text;
}