X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ac06991a797c3a97e47f1f1f3ca313e17c78a10..cc4d5638c66a409e421420ed7110917755a66788:/src/propgrid/propgridiface.cpp diff --git a/src/propgrid/propgridiface.cpp b/src/propgrid/propgridiface.cpp index d29e2f4498..4608fb9c61 100644 --- a/src/propgrid/propgridiface.cpp +++ b/src/propgrid/propgridiface.cpp @@ -4,9 +4,8 @@ // Author: Jaakko Salli // Modified by: // Created: 2008-08-24 -// RCS-ID: $Id$ // Copyright: (c) Jaakko Salli -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". @@ -73,10 +72,8 @@ wxPGProperty* wxPGPropArgCls::GetPtr( wxPropertyGridInterface* iface ) const return iface->GetPropertyByNameA(*m_ptr.stringName); else if ( m_flags & IsCharPtr ) return iface->GetPropertyByNameA(m_ptr.charName); -#if wxUSE_WCHAR_T else if ( m_flags & IsWCharPtr ) return iface->GetPropertyByNameA(m_ptr.wcharName); -#endif return NULL; } @@ -279,7 +276,7 @@ bool wxPropertyGridInterface::EnableProperty( wxPGPropArg id, bool enable ) grid->DoSelectProperty( p, wxPG_SEL_FORCE ); } - state->DoEnableProperty(p, enable); + p->DoEnable(enable); RefreshProperty( p ); @@ -701,7 +698,7 @@ void wxPropertyGridInterface::SetPropertyCell( wxPGPropArg id, wxPG_PROP_ARG_CALL_PROLOG() wxPGCell& cell = p->GetCell(column); - if ( text.length() && text != wxPG_LABEL ) + if ( !text.empty() && text != wxPG_LABEL ) cell.SetText(text); if ( bitmap.IsOk() ) cell.SetBitmap(bitmap); @@ -934,7 +931,7 @@ wxString wxPropertyGridInterface::SaveEditableState( int includedStates ) const } // Remove last '|' - if ( result.length() ) + if ( !result.empty() ) result.RemoveLast(); return result; @@ -1036,13 +1033,13 @@ bool wxPropertyGridInterface::RestoreEditableState( const wxString& src, int res { if ( pageState->IsDisplayed() ) { - if ( values[0].length() ) + if ( !values[0].empty() ) newSelection = GetPropertyByName(value); pgSelectionSet = true; } else { - if ( values[0].length() ) + if ( !values[0].empty() ) pageState->DoSetSelection(GetPropertyByName(value)); else pageState->DoClearSelection();