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:
@@ -700,6 +700,7 @@ void wxGridCellNumberEditor::StartingKey(wxKeyEvent& event)
|
|||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxGridCellFloatEditor
|
// wxGridCellFloatEditor
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1100,7 +1101,10 @@ wxString wxGridCellNumberRenderer::GetString(wxGrid& grid, int row, int col)
|
|||||||
{
|
{
|
||||||
text.Printf(_T("%ld"), table->GetValueAsLong(row, 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;
|
return text;
|
||||||
}
|
}
|
||||||
@@ -1158,7 +1162,10 @@ wxString wxGridCellFloatRenderer::GetString(wxGrid& grid, int row, int col)
|
|||||||
|
|
||||||
text.Printf(m_format, table->GetValueAsDouble(row, 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;
|
return text;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user