]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
reorganize deferred show logic a bit, to reset m_deferShow properly and avoid realizi...
[wxWidgets.git] / src / generic / listctrl.cpp
index d58f84467e61fcf01a9839dafa46d508b13ffc65..aef8733fe1a49cab811d4e03b144e7fd49e1c984 100644 (file)
@@ -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);
     }
 }
 
@@ -2136,11 +2135,11 @@ wxListTextCtrlWrapper::wxListTextCtrlWrapper(wxListMainWindow *owner,
 void wxListTextCtrlWrapper::EndEdit(bool discardChanges)
 {
     m_aboutToFinish = true;
-    
+
     if ( discardChanges )
     {
         m_owner->OnRenameCancelled(m_itemEdited);
-           
+
         Finish( true );
     }
     else
@@ -2159,7 +2158,7 @@ void wxListTextCtrlWrapper::Finish( bool setfocus )
     m_owner->ResetTextControl( m_text );
 
     wxPendingDelete.Append( this );
-    
+
     if (setfocus)
         m_owner->SetFocusIgnoringChildren();
 }
@@ -2216,7 +2215,7 @@ void wxListTextCtrlWrapper::OnKeyUp( wxKeyEvent &event )
             sx = mySize.x;
        m_text->SetSize(sx, wxDefaultCoord);
     }
-    
+
     event.Skip();
 }
 
@@ -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;
@@ -5898,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