From bf01f0e79135786d9d600724da1abed24a88eb65 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Mon, 14 Jul 2014 17:35:59 +0000 Subject: [PATCH] Search through all properties in wxPG::GetPropertyByLabel. Function should search for given label through all properties. This is consistent with searching by name (in GetPropertyByName) which is not limited to the subset of properties. Closes #15251. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgridiface.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/propgrid/propgridiface.cpp b/src/propgrid/propgridiface.cpp index e6082b7765..f0c24fe020 100644 --- a/src/propgrid/propgridiface.cpp +++ b/src/propgrid/propgridiface.cpp @@ -441,15 +441,7 @@ wxPGProperty* wxPropertyGridInterface::GetPropertyByNameA( const wxString& name wxPGProperty* wxPropertyGridInterface::GetPropertyByLabel( const wxString& label ) const { - wxPGVIterator it; - - for ( it = GetVIterator( wxPG_ITERATE_PROPERTIES ); !it.AtEnd(); it.Next() ) - { - if ( it.GetProperty()->GetLabel() == label ) - return it.GetProperty(); - } - - return wxNullProperty; + return m_pState->BaseGetPropertyByLabel(label, NULL); } // ----------------------------------------------------------------------------