Remove unnecessary HasImageList() checks in wxDataViewTreeCtrl
These checks don't seem to make any sense at all, even though they were there ever since this classes was added ina75124d0da(Added wxDataViewTreeCtrl, 2007-12-01), and, in fact, were clearly harmful until they were fixed ine6a2aa5ae3(Show correct icon for branch nodes in wxDataViewTreeCtrl, 2018-09-12). But it seems that even this wasn't the right thing to do, as there doesn't seem to be any reason to not call ItemChanged() even for the controls not using images, so just remove them completely.
This commit is contained in:
@@ -3180,8 +3180,6 @@ void wxDataViewTreeCtrl::DeleteAllItems()
|
||||
|
||||
void wxDataViewTreeCtrl::OnExpanded( wxDataViewEvent &event )
|
||||
{
|
||||
if (!HasImageList()) return;
|
||||
|
||||
wxDataViewTreeStoreContainerNode* container = GetStore()->FindContainerNode( event.GetItem() );
|
||||
if (!container) return;
|
||||
|
||||
@@ -3192,8 +3190,6 @@ void wxDataViewTreeCtrl::OnExpanded( wxDataViewEvent &event )
|
||||
|
||||
void wxDataViewTreeCtrl::OnCollapsed( wxDataViewEvent &event )
|
||||
{
|
||||
if (!HasImageList()) return;
|
||||
|
||||
wxDataViewTreeStoreContainerNode* container = GetStore()->FindContainerNode( event.GetItem() );
|
||||
if (!container) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user