X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbfb8bcc3fa17e079d4219655b173f8ed2ccc65a..312f1e6e371f72910501aad1e270e04756d613ec:/src/generic/grid.cpp?ds=sidebyside diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 3c900fa4de..e8c4009b95 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -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 {