Changed wxGridCellEditor::GetString to use %f instead of %g to match
the Renderer, otherwise it would truncate/round the value to
m_precision significant digits instead of m_precision digits after the
decimal point.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16745
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual void StartingKey(wxKeyEvent& event);
virtual wxGridCellEditor *Clone() const
virtual void StartingKey(wxKeyEvent& event);
virtual wxGridCellEditor *Clone() const
- { return new wxGridCellFloatEditor; }
+ { return new wxGridCellFloatEditor(m_width, m_precision); }
// parameters string format is "width,precision"
virtual void SetParameters(const wxString& params);
// parameters string format is "width,precision"
virtual void SetParameters(const wxString& params);
if ( m_width == -1 )
{
// default width/precision
if ( m_width == -1 )
{
// default width/precision
}
else if ( m_precision == -1 )
{
// default precision
}
else if ( m_precision == -1 )
{
// default precision
- fmt.Printf(_T("%%%d.g"), m_width);
+ fmt.Printf(_T("%%%d.f"), m_width);
- fmt.Printf(_T("%%%d.%dg"), m_width, m_precision);
+ fmt.Printf(_T("%%%d.%df"), m_width, m_precision);
}
return wxString::Format(fmt, m_valueOld);
}
return wxString::Format(fmt, m_valueOld);
SetCurrentCell( coords );
if ( m_selection )
{
SetCurrentCell( coords );
if ( m_selection )
{
- if ( m_selection->GetSelectionMode() !=
+ if ( m_selection->GetSelectionMode() !=
wxGrid::wxGridSelectCells )
{
HighlightBlock( coords, coords );
wxGrid::wxGridSelectCells )
{
HighlightBlock( coords, coords );