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:
@@ -2996,15 +2996,13 @@ 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);
|
||||
|
||||
@@ -3018,14 +3016,12 @@ void wxGenericTreeCtrl::RefreshLine( 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.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);
|
||||
|
Reference in New Issue
Block a user