From d95074e48d1bbf3aeb6b01e7d910e7af2d97a5c4 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek <7330332+a-wi@users.noreply.github.com> Date: Sun, 17 Dec 2023 16:11:34 +0100 Subject: [PATCH] Use dedicated function to get value from wxPGChoicesData --- src/propgrid/property.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index d09c7fe7f8..ab5c58fabd 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -3086,8 +3086,7 @@ int wxPGChoices::Index( int val ) const { for ( unsigned int i = 0; i < m_data->GetCount(); i++ ) { - const wxPGChoiceEntry& entry = m_data->Item(i); - if ( entry.GetValue() == val ) + if ( GetValue(i) == val ) return i; } }