]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/gizmos/splittree.cpp
Applied patch [ 867158 ] Warning free gizmos
[wxWidgets.git] / contrib / src / gizmos / splittree.cpp
index 8a16309acf5c21dd7755e47ca1cc6b3b3d88b6d1..87b3668ffdf6b002815013acb0914d030c2cc2ba 100644 (file)
@@ -298,20 +298,19 @@ void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event)
 
     wxSize clientSize = GetClientSize();
     wxRect itemRect;
-    int cy=0;
     wxTreeItemId h, lastH;
     for(h=GetFirstVisibleItem();h;h=GetNextVisible(h))
     {
         if (GetBoundingRect(h, itemRect))
         {
-            cy = itemRect.GetTop();
+            int cy = itemRect.GetTop();
             dc.DrawLine(0, cy, clientSize.x, cy);
             lastH = h;
         }
     }
     if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
     {
-        cy = itemRect.GetBottom();
+        int cy = itemRect.GetBottom();
         dc.DrawLine(0, cy, clientSize.x, cy);
     }
 }
@@ -508,13 +507,12 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
 
     wxSize clientSize = GetClientSize();
     wxRect itemRect;
-    int cy=0;
     wxTreeItemId h, lastH;
     for(h=m_treeCtrl->GetFirstVisibleItem();h;h=m_treeCtrl->GetNextVisible(h))
     {
         if (m_treeCtrl->GetBoundingRect(h, itemRect))
         {
-            cy = itemRect.GetTop();
+            int cy = itemRect.GetTop();
             wxRect drawItemRect(0, cy, clientSize.x, itemRect.GetHeight());
 
             lastH = h;
@@ -526,7 +524,7 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
     }
     if (lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect))
     {
-        cy = itemRect.GetBottom();
+        int cy = itemRect.GetBottom();
         dc.DrawLine(0, cy, clientSize.x, cy);
     }
 }