From e6bf7f5ec54cd322147e4e654d5f6fe97cb975ed Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 11 Nov 2021 22:05:59 +0000 Subject: [PATCH] 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 in a75124d0da (Added wxDataViewTreeCtrl, 2007-12-01), and, in fact, were clearly harmful until they were fixed in e6a2aa5ae3 (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. --- src/common/datavcmn.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index d7fb08aea4..9c0ec6aef6 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -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;