Up-ported code to make tree item visible when programmatically
selected. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1485,6 +1485,17 @@ void wxGenericTreeCtrl::SelectItem(const wxTreeItemId& itemId,
|
|||||||
if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() )
|
if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
wxTreeItemId parent = GetParent( itemId );
|
||||||
|
while (parent.IsOk())
|
||||||
|
{
|
||||||
|
if (!IsExpanded(parent))
|
||||||
|
Expand( parent );
|
||||||
|
|
||||||
|
parent = GetParent( parent );
|
||||||
|
}
|
||||||
|
|
||||||
|
EnsureVisible( itemId );
|
||||||
|
|
||||||
// ctrl press
|
// ctrl press
|
||||||
if (unselect_others)
|
if (unselect_others)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user