projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed wide char codeset detection for systems which do support LE/BE variants (broken...
[wxWidgets.git]
/
src
/
generic
/
grid.cpp
diff --git
a/src/generic/grid.cpp
b/src/generic/grid.cpp
index 3e558a168aedaea70d501ada11438ee2dece933c..e8c4009b9504fb142e03b231ca20b2071099073b 100644
(file)
--- a/
src/generic/grid.cpp
+++ b/
src/generic/grid.cpp
@@
-17,10
+17,6
@@
// headers
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "grid.h"
-#endif
-
// For compilers that support precompilatixon, includes "wx/wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilatixon, includes "wx/wx.h".
#include "wx/wxprec.h"
@@
-42,6
+38,7
@@
#include "wx/combobox.h"
#include "wx/valtext.h"
#include "wx/intl.h"
#include "wx/combobox.h"
#include "wx/valtext.h"
#include "wx/intl.h"
+ #include "wx/math.h"
#endif
#include "wx/textfile.h"
#endif
#include "wx/textfile.h"
@@
-1089,7
+1086,8
@@
bool wxGridCellFloatEditor::EndEdit(int row, int col,
double value = 0.0;
wxString text(Text()->GetValue());
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);
{
if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT))
grid->GetTable()->SetValueAsDouble(row, col, value);
@@
-1648,8
+1646,8
@@
void wxGridCellRenderer::Draw(wxGrid& grid,
// wxGridCellStringRenderer
// ----------------------------------------------------------------------------
// wxGridCellStringRenderer
// ----------------------------------------------------------------------------
-void wxGridCellStringRenderer::SetTextColoursAndFont(wxGrid& grid,
- wxGridCellAttr& attr,
+void wxGridCellStringRenderer::SetTextColoursAndFont(
const
wxGrid& grid,
+
const
wxGridCellAttr& attr,
wxDC& dc,
bool isSelected)
{
wxDC& dc,
bool isSelected)
{
@@
-1680,7
+1678,7
@@
void wxGridCellStringRenderer::SetTextColoursAndFont(wxGrid& grid,
dc.SetFont( attr.GetFont() );
}
dc.SetFont( attr.GetFont() );
}
-wxSize wxGridCellStringRenderer::DoGetBestSize(wxGridCellAttr& attr,
+wxSize wxGridCellStringRenderer::DoGetBestSize(
const
wxGridCellAttr& attr,
wxDC& dc,
const wxString& text)
{
wxDC& dc,
const wxString& text)
{
@@
-1801,7
+1799,7
@@
void wxGridCellStringRenderer::Draw(wxGrid& grid,
// wxGridCellNumberRenderer
// ----------------------------------------------------------------------------
// wxGridCellNumberRenderer
// ----------------------------------------------------------------------------
-wxString wxGridCellNumberRenderer::GetString(wxGrid& grid, int row, int col)
+wxString wxGridCellNumberRenderer::GetString(
const
wxGrid& grid, int row, int col)
{
wxGridTableBase *table = grid.GetTable();
wxString text;
{
wxGridTableBase *table = grid.GetTable();
wxString text;
@@
-1867,7
+1865,7
@@
wxGridCellRenderer *wxGridCellFloatRenderer::Clone() const
return renderer;
}
return renderer;
}
-wxString wxGridCellFloatRenderer::GetString(wxGrid& grid, int row, int col)
+wxString wxGridCellFloatRenderer::GetString(
const
wxGrid& grid, int row, int col)
{
wxGridTableBase *table = grid.GetTable();
{
wxGridTableBase *table = grid.GetTable();
@@
-5023,7
+5021,7
@@
void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event )
//
else if (event.LeftDClick() )
{
//
else if (event.LeftDClick() )
{
-
int
row = YToEdgeOfRow(y);
+ row = YToEdgeOfRow(y);
if ( row < 0 )
{
row = YToRow(y);
if ( row < 0 )
{
row = YToRow(y);
@@
-5247,7
+5245,7
@@
void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
//
if ( event.LeftDClick() )
{
//
if ( event.LeftDClick() )
{
-
int
col = XToEdgeOfCol(x);
+ col = XToEdgeOfCol(x);
if ( col < 0 )
{
col = XToCol(x);
if ( col < 0 )
{
col = XToCol(x);
@@
-7567,7
+7565,7
@@
void wxGrid::StringToLines( const wxString& value, wxArrayString& lines )
}
}
-void wxGrid::GetTextBoxSize( wxDC& dc,
+void wxGrid::GetTextBoxSize(
const
wxDC& dc,
const wxArrayString& lines,
long *width, long *height )
{
const wxArrayString& lines,
long *width, long *height )
{
@@
-9746,7
+9744,7
@@
void wxGrid::SetRowMinimalAcceptableHeight( int height )
if ( height<0 )
return;
m_minAcceptableRowHeight = height;
if ( height<0 )
return;
m_minAcceptableRowHeight = height;
-}
;
+}
int wxGrid::GetColMinimalAcceptableWidth() const
{
int wxGrid::GetColMinimalAcceptableWidth() const
{