Show correct icon for branch nodes in wxDataViewTreeCtrl
The icon wasn't updated when the node was expanded (or collapsed) due to the inversed check for HasImageList(). Fix this by correcting the check. Closes https://github.com/wxWidgets/wxWidgets/pull/929
This commit is contained in:
committed by
Vadim Zeitlin
parent
0bd8fe91e7
commit
e6a2aa5ae3
@@ -3029,7 +3029,7 @@ void wxDataViewTreeCtrl::DeleteAllItems()
|
||||
|
||||
void wxDataViewTreeCtrl::OnExpanded( wxDataViewEvent &event )
|
||||
{
|
||||
if (HasImageList()) return;
|
||||
if (!HasImageList()) return;
|
||||
|
||||
wxDataViewTreeStoreContainerNode* container = GetStore()->FindContainerNode( event.GetItem() );
|
||||
if (!container) return;
|
||||
@@ -3041,7 +3041,7 @@ void wxDataViewTreeCtrl::OnExpanded( wxDataViewEvent &event )
|
||||
|
||||
void wxDataViewTreeCtrl::OnCollapsed( wxDataViewEvent &event )
|
||||
{
|
||||
if (HasImageList()) return;
|
||||
if (!HasImageList()) return;
|
||||
|
||||
wxDataViewTreeStoreContainerNode* container = GetStore()->FindContainerNode( event.GetItem() );
|
||||
if (!container) return;
|
||||
|
||||
Reference in New Issue
Block a user