From 9c4ba61452d9381c9d71242f0d1610fb2551c846 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 23 Feb 2000 16:15:46 +0000 Subject: [PATCH] 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 --- src/generic/grid.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 5742da31c3..6ee198034a 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -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; } -- 2.45.2