]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
fixed warnings about truncating 64 bit integers
[wxWidgets.git] / src / generic / grid.cpp
index 2ab4374312f47c528206bc5868b8d2827b083538..4a491aae1d6874681611430114a1c80ed5988824 100644 (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);