Fixed bug: wxPropertyGridInterface::SetPropertyReadOnly() with wxPG_DONT_RECURSE flag didn't do anything

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-05-02 07:41:21 +00:00
parent c5c1ea9648
commit d58526d554
3 changed files with 16 additions and 5 deletions

View File

@@ -1951,8 +1951,22 @@ public:
else m_flags &= ~wxPG_PROP_COLLAPSED; else m_flags &= ~wxPG_PROP_COLLAPSED;
} }
/**
Sets given property flag(s).
*/
void SetFlag( FlagType flag ) { m_flags |= flag; } void SetFlag( FlagType flag ) { m_flags |= flag; }
/**
Sets or clears given property flag(s).
*/
void ChangeFlag( FlagType flag, bool set )
{
if ( set )
m_flags |= flag;
else
m_flags &= ~flag;
}
void SetFlagRecursively( FlagType flag, bool set ); void SetFlagRecursively( FlagType flag, bool set );
void SetHelpString( const wxString& helpString ) void SetHelpString( const wxString& helpString )

View File

@@ -1021,7 +1021,7 @@ public:
if ( flags & wxPG_RECURSE ) if ( flags & wxPG_RECURSE )
p->SetFlagRecursively(wxPG_PROP_READONLY, set); p->SetFlagRecursively(wxPG_PROP_READONLY, set);
else else
p->SetFlag(wxPG_PROP_READONLY); p->ChangeFlag(wxPG_PROP_READONLY, set);
} }
/** Sets property's value to unspecified. /** Sets property's value to unspecified.

View File

@@ -1353,10 +1353,7 @@ void wxPGProperty::SetValueInEvent( wxVariant value ) const
void wxPGProperty::SetFlagRecursively( FlagType flag, bool set ) void wxPGProperty::SetFlagRecursively( FlagType flag, bool set )
{ {
if ( set ) ChangeFlag(flag, set);
SetFlag(flag);
else
ClearFlag(flag);
unsigned int i; unsigned int i;
for ( i = 0; i < GetChildCount(); i++ ) for ( i = 0; i < GetChildCount(); i++ )