Avoid the IsVisible assert in GetNextVisible
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -299,7 +299,9 @@ void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event)
|
|||||||
wxSize clientSize = GetClientSize();
|
wxSize clientSize = GetClientSize();
|
||||||
wxRect itemRect;
|
wxRect itemRect;
|
||||||
wxTreeItemId h, lastH;
|
wxTreeItemId h, lastH;
|
||||||
for(h=GetFirstVisibleItem();h;h=GetNextVisible(h))
|
for (h=GetFirstVisibleItem();
|
||||||
|
h.IsOk();
|
||||||
|
h=GetNextVisible(h))
|
||||||
{
|
{
|
||||||
if (GetBoundingRect(h, itemRect))
|
if (GetBoundingRect(h, itemRect))
|
||||||
{
|
{
|
||||||
@@ -307,6 +309,8 @@ void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event)
|
|||||||
dc.DrawLine(0, cy, clientSize.x, cy);
|
dc.DrawLine(0, cy, clientSize.x, cy);
|
||||||
lastH = h;
|
lastH = h;
|
||||||
}
|
}
|
||||||
|
if (! IsVisible(h))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
|
if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
|
||||||
{
|
{
|
||||||
@@ -508,7 +512,9 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
wxSize clientSize = GetClientSize();
|
wxSize clientSize = GetClientSize();
|
||||||
wxRect itemRect;
|
wxRect itemRect;
|
||||||
wxTreeItemId h, lastH;
|
wxTreeItemId h, lastH;
|
||||||
for(h=m_treeCtrl->GetFirstVisibleItem();h;h=m_treeCtrl->GetNextVisible(h))
|
for (h=m_treeCtrl->GetFirstVisibleItem();
|
||||||
|
h.IsOk();
|
||||||
|
h=m_treeCtrl->GetNextVisible(h))
|
||||||
{
|
{
|
||||||
if (m_treeCtrl->GetBoundingRect(h, itemRect))
|
if (m_treeCtrl->GetBoundingRect(h, itemRect))
|
||||||
{
|
{
|
||||||
@@ -521,6 +527,8 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
DrawItem(dc, h, drawItemRect);
|
DrawItem(dc, h, drawItemRect);
|
||||||
dc.DrawLine(0, cy, clientSize.x, cy);
|
dc.DrawLine(0, cy, clientSize.x, cy);
|
||||||
}
|
}
|
||||||
|
if (! m_treeCtrl->IsVisible(h))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect))
|
if (lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user