fixes to refreshing code in wxTreeCtrl

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2002-03-12 23:20:55 +00:00
parent 3390759eb3
commit cb9965c3cc

View File

@ -2996,17 +2996,15 @@ void wxGenericTreeCtrl::RefreshSubtree(wxGenericTreeItem *item)
wxClientDC dc(this);
PrepareDC(dc);
int cw = 0;
int ch = 0;
GetClientSize( &cw, &ch );
wxRect client = GetClientRect();
wxRect rect;
rect.x = dc.LogicalToDeviceX( 0 );
rect.width = cw;
rect.y = dc.LogicalToDeviceY( item->GetY() );
rect.height = ch;
rect.x = dc.LogicalToDeviceX(-client.x);
rect.width = client.width;
rect.y = dc.LogicalToDeviceY(-client.y + item->GetY());
rect.height = client.height;
Refresh( TRUE, &rect );
Refresh(TRUE, &rect);
AdjustMyScrollbars();
}
@ -3016,19 +3014,17 @@ void wxGenericTreeCtrl::RefreshLine( wxGenericTreeItem *item )
if (m_dirty) return;
wxClientDC dc(this);
PrepareDC( dc );
PrepareDC(dc);
int cw = 0;
int ch = 0;
GetClientSize( &cw, &ch );
wxRect client = GetClientRect();
wxRect rect;
rect.x = dc.LogicalToDeviceX( 0 );
rect.y = dc.LogicalToDeviceY( item->GetY() );
rect.width = cw;
rect.x = dc.LogicalToDeviceX(-client.x);
rect.y = dc.LogicalToDeviceY(-client.y + item->GetY());
rect.width = client.width;
rect.height = GetLineHeight(item); //dc.GetCharHeight() + 6;
Refresh( TRUE, &rect );
Refresh(TRUE, &rect);
}
void wxGenericTreeCtrl::RefreshSelected()