use wxIsSameDouble() and wxIsNullDouble() for warning-less double comparison of doubles

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-25 23:27:27 +00:00
parent f1afd2e066
commit c77a67962c
14 changed files with 139 additions and 127 deletions

View File

@@ -38,6 +38,7 @@
#include "wx/combobox.h"
#include "wx/valtext.h"
#include "wx/intl.h"
#include "wx/math.h"
#endif
#include "wx/textfile.h"
@@ -1085,7 +1086,8 @@ bool wxGridCellFloatEditor::EndEdit(int row, int col,
double value = 0.0;
wxString text(Text()->GetValue());
if ( (text.empty() || text.ToDouble(&value)) && (value != m_valueOld) )
if ( (text.empty() || text.ToDouble(&value)) &&
!wxIsSameDouble(value, m_valueOld) )
{
if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT))
grid->GetTable()->SetValueAsDouble(row, col, value);