fixed flicker in wxTreeCtrl::SetItemXXX()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2e351786c5
commit
d00407b2c6
@ -60,6 +60,13 @@ Unix ports:
|
||||
and the compiler flags for C++ files only, CFLAGS should still be used
|
||||
to compile pure C files.
|
||||
|
||||
2.3.3
|
||||
-----
|
||||
|
||||
wxMSW:
|
||||
|
||||
- fixed flicker in wxTreeCtrl::SetItemXXX()
|
||||
|
||||
2.3.2
|
||||
-----
|
||||
|
||||
|
@ -400,6 +400,9 @@ protected:
|
||||
// SetImageList helper
|
||||
void SetAnyImageList(wxImageList *imageList, int which);
|
||||
|
||||
// refresh a single item
|
||||
void RefreshItem(const wxTreeItemId& item);
|
||||
|
||||
wxTextCtrl *m_textCtrl; // used while editing the item label
|
||||
wxImageList *m_imageListNormal, // images for tree elements
|
||||
*m_imageListState; // special images for app defined states
|
||||
|
@ -1032,6 +1032,15 @@ void wxTreeCtrl::SetItemDropHighlight(const wxTreeItemId& item, bool highlight)
|
||||
DoSetItem(&tvItem);
|
||||
}
|
||||
|
||||
void wxTreeCtrl::RefreshItem(const wxTreeItemId& item)
|
||||
{
|
||||
wxRect rect;
|
||||
if ( GetBoundingRect(item, rect) )
|
||||
{
|
||||
RefreshRect(rect);
|
||||
}
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SetItemTextColour(const wxTreeItemId& item,
|
||||
const wxColour& col)
|
||||
{
|
||||
@ -1046,7 +1055,8 @@ void wxTreeCtrl::SetItemTextColour(const wxTreeItemId& item,
|
||||
}
|
||||
|
||||
attr->SetTextColour(col);
|
||||
Refresh();
|
||||
|
||||
RefreshItem(item);
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SetItemBackgroundColour(const wxTreeItemId& item,
|
||||
@ -1063,7 +1073,8 @@ void wxTreeCtrl::SetItemBackgroundColour(const wxTreeItemId& item,
|
||||
}
|
||||
|
||||
attr->SetBackgroundColour(col);
|
||||
Refresh();
|
||||
|
||||
RefreshItem(item);
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font)
|
||||
@ -1079,7 +1090,8 @@ void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font)
|
||||
}
|
||||
|
||||
attr->SetFont(font);
|
||||
Refresh();
|
||||
|
||||
RefreshItem(item);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -1097,7 +1109,6 @@ bool wxTreeCtrl::IsVisible(const wxTreeItemId& item) const
|
||||
|
||||
// FALSE means get item rect for the whole item, not only text
|
||||
return SendMessage(GetHwnd(), TVM_GETITEMRECT, FALSE, (LPARAM)&rect) != 0;
|
||||
|
||||
}
|
||||
|
||||
bool wxTreeCtrl::ItemHasChildren(const wxTreeItemId& item) const
|
||||
|
Loading…
Reference in New Issue
Block a user