From: Vadim Zeitlin Date: Sat, 17 Feb 2007 02:35:50 +0000 (+0000) Subject: do adjust scrollbars in our EVT_SIZE handler now that we turn them off correctly... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c71b212607e108a600109a9764ef76428a6a1b03?ds=inline do adjust scrollbars in our EVT_SIZE handler now that we turn them off correctly (otherwise scrollbars wouldn't be shown correctly when the grid becomes too small to show its contents entirely after changes in rev 1.410) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 4fe9067298..46492505c6 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4368,7 +4368,7 @@ bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership, // stop all processing m_created = false; - if (m_table) + if (m_table) { m_table->SetView(0); if( m_ownTable ) @@ -4406,7 +4406,7 @@ bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership, // original one current cell and selection regions // might be invalid, m_selectingKeyboard = wxGridNoCellCoords; - m_currentCellCoords = + m_currentCellCoords = wxGridCellCoords(wxMin(m_numRows, m_currentCellCoords.GetRow()), wxMin(m_numCols, m_currentCellCoords.GetCol())); if (m_selectingTopLeft.GetRow() >= m_numRows || @@ -5974,7 +5974,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) m_winCapture->CaptureMouse(); } - + } else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW ) { @@ -6737,7 +6737,7 @@ int wxGrid::SendEvent( const wxEventType type, pos.y += GetColLabelSize(); if ( mouseEv.GetEventObject() == GetGridColLabelWindow() ) pos.x += GetRowLabelSize(); - + wxGridEvent gridEvt( GetId(), type, this, @@ -6903,14 +6903,10 @@ void wxGrid::Refresh(bool eraseb, const wxRect* rect) } } -void wxGrid::OnSize( wxSizeEvent& event ) +void wxGrid::OnSize(wxSizeEvent& WXUNUSED(event)) { - // position the child windows - CalcWindowSizes(); - - // don't call CalcDimensions() from here, the base class handles the size - // changes itself - event.Skip(); + // update our children window positions and scrollbars + CalcDimensions(); } void wxGrid::OnKeyDown( wxKeyEvent& event ) @@ -6938,7 +6934,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) else if (event.GetKeyCode() == WXK_LEFT) event.m_keyCode = WXK_RIGHT; } - + // try local handlers switch ( event.GetKeyCode() ) {