X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2fb3e528a32c0175e8c61217f0821cc04295373a..0b6db82f16ca890ec696d3ed71f1bdb56e649f10:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 874499b1e2..3e558a168a 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -260,7 +260,7 @@ private: // Work around the fact that a focus kill event can be sent to // a combobox within a set focus event. bool m_inSetFocus; - + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxGridCellEditorEvtHandler) DECLARE_NO_COPY_CLASS(wxGridCellEditorEvtHandler) @@ -1972,21 +1972,19 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params) { wxLogDebug(_T("Invalid wxGridCellFloatRenderer width parameter string '%s ignored"), params.c_str()); } - } - tmp = params.AfterFirst(_T(',')); - if ( !tmp.empty() ) - { - long precision; + tmp = params.AfterFirst(_T(',')); + if ( !tmp.empty() ) + { + long precision; if ( tmp.ToLong(&precision) ) - { + { SetPrecision((int)precision); - } - else - { + } + else + { wxLogDebug(_T("Invalid wxGridCellFloatRenderer precision parameter string '%s ignored"), params.c_str()); - } - + } } } } @@ -3694,7 +3692,8 @@ void wxGridCornerLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) int client_width = 0; GetClientSize( &client_width, &client_height ); -#if __WXGTK__ + // VZ: any reason for this ifdef? (FIXME) +#ifdef __WXGTK__ wxRect rect; rect.SetX( 1 ); rect.SetY( 1 ); @@ -3702,7 +3701,7 @@ void wxGridCornerLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) rect.SetHeight( client_height - 2 ); wxRendererNative::Get().DrawHeaderButton( this, dc, rect, 0 ); -#else +#else // !__WXGTK__ dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW),1, wxSOLID) ); dc.DrawLine( client_width-1, client_height-1, client_width-1, 0 ); dc.DrawLine( client_width-1, client_height-1, 0, client_height-1 ); @@ -3712,7 +3711,7 @@ void wxGridCornerLabelWindow::OnPaint( wxPaintEvent& WXUNUSED(event) ) dc.SetPen( *wxWHITE_PEN ); dc.DrawLine( 1, 1, client_width-1, 1 ); dc.DrawLine( 1, 1, 1, client_height-1 ); -#endif +#endif // __WXGTK__/!__WXGTK__ } @@ -7864,11 +7863,7 @@ void wxGrid::HideCellEditControl() editor->DecRef(); attr->DecRef(); - // if the focus moved completely outside this application, set it to - // ourselves so that it's not "lost" when the user switches back to - // this app - if ( !FindFocus() ) - m_gridWin->SetFocus(); + m_gridWin->SetFocus(); // refresh whole row to the right wxRect rect( CellToRect(row, col) );