]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
wxCheckListBox cleanup.
[wxWidgets.git] / src / generic / grid.cpp
index 3c900fa4de126d14e5da935fc05747494e735d60..e8c4009b9504fb142e03b231ca20b2071099073b 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);
@@ -5019,7 +5021,7 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event )
     //
     else if (event.LeftDClick() )
     {
-        int row = YToEdgeOfRow(y);
+        row = YToEdgeOfRow(y);
         if ( row < 0 )
         {
             row = YToRow(y);
@@ -5243,7 +5245,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
     //
     if ( event.LeftDClick() )
     {
-        int col = XToEdgeOfCol(x);
+        col = XToEdgeOfCol(x);
         if ( col < 0 )
         {
             col = XToCol(x);
@@ -9742,7 +9744,7 @@ void wxGrid::SetRowMinimalAcceptableHeight( int height )
     if ( height<0 )
         return;
     m_minAcceptableRowHeight = height;
-};
+}
 
 int  wxGrid::GetColMinimalAcceptableWidth() const
 {