Fix choice of tree item icon for the selected state in wxMSW.
The logic for selecting the item icon was broken when selected image was specified as it was not taken into account as fallback for selected expanded state so selected icon was used only for collapsed items. Fix this by using the selected icon if it is specified and selected expanded one is not. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -439,14 +439,18 @@ public:
|
||||
switch ( which )
|
||||
{
|
||||
case wxTreeItemIcon_SelectedExpanded:
|
||||
image = GetImage(wxTreeItemIcon_Expanded);
|
||||
// We consider that expanded icon is more important than
|
||||
// selected so test for it first.
|
||||
image = m_images[wxTreeItemIcon_Expanded];
|
||||
if ( image == -1 )
|
||||
image = m_images[wxTreeItemIcon_Selected];
|
||||
if ( image != -1 )
|
||||
break;
|
||||
//else: fall through
|
||||
|
||||
case wxTreeItemIcon_Selected:
|
||||
case wxTreeItemIcon_Expanded:
|
||||
image = GetImage(wxTreeItemIcon_Normal);
|
||||
image = m_images[wxTreeItemIcon_Normal];
|
||||
break;
|
||||
|
||||
case wxTreeItemIcon_Normal:
|
||||
|
Reference in New Issue
Block a user