X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a8a89154531d94c2ff30990a0463a366242703b2..3e1924dd5f5744c3e2a8973de9b3e4f372b7fd85:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 46cf4f3638..05663f5d8f 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -598,10 +598,6 @@ public: m_textctrlWrapper = NULL; } - // we don't draw anything while we're frozen so we must refresh ourselves - // when we're thawed to make sure the changes are displayed correctly - virtual void DoThaw() { Refresh(); } - void OnRenameTimer(); bool OnRenameAccept(size_t itemEdit, const wxString& value); void OnRenameCancelled(size_t itemEdit); @@ -1569,6 +1565,9 @@ void wxListLineData::DrawInReportMode( wxDC *dc, int xOld = x; x += width; + const int wText = width - 8; + wxDCClipper clipper(*dc, xOld, rect.y, wText, rect.height); + if ( item->HasImage() ) { int ix, iy; @@ -1582,7 +1581,7 @@ void wxListLineData::DrawInReportMode( wxDC *dc, } if ( item->HasText() ) - DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, width - 8); + DrawTextFormatted(dc, item->GetText(), col, xOld, yMid, wText); } } @@ -2161,7 +2160,7 @@ void wxListTextCtrlWrapper::Finish( bool setfocus ) wxPendingDelete.Append( this ); if (setfocus) - m_owner->SetFocus(); + m_owner->SetFocusIgnoringChildren(); } bool wxListTextCtrlWrapper::AcceptChanges() @@ -2704,7 +2703,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) // done (a Windows requirement). wxPaintDC dc( this ); - if ( IsEmpty() || IsFrozen() ) + if ( IsEmpty() ) { // nothing to draw or not the moment to draw it return; @@ -3456,16 +3455,8 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) ke.SetEventObject( parent ); if (parent->GetEventHandler()->ProcessEvent( ke )) return; - if (event.GetKeyCode() == WXK_TAB) - { - wxNavigationKeyEvent nevent; - nevent.SetWindowChange( event.ControlDown() ); - nevent.SetDirection( !event.ShiftDown() ); - nevent.SetEventObject( GetParent()->GetParent() ); - nevent.SetCurrentFocus( m_parent ); - if (GetParent()->GetParent()->GetEventHandler()->ProcessEvent( nevent )) - return; - } + if ( HandleAsNavigationKey(event) ) + return; // no item -> nothing to do if (!HasCurrent()) @@ -5906,14 +5897,4 @@ void wxGenericListCtrl::Refresh(bool eraseBackground, const wxRect *rect) } } -void wxGenericListCtrl::DoFreeze() -{ - m_mainWin->Freeze(); -} - -void wxGenericListCtrl::DoThaw() -{ - m_mainWin->Thaw(); -} - #endif // wxUSE_LISTCTRL