Fixed setting/unsetting wxPGProperty as read-only.
Don't do any action only if property is exactly in the same state as required (and action is requested for single property only).
This commit is contained in:
@@ -284,8 +284,10 @@ void wxPropertyGridInterface::SetPropertyReadOnly( wxPGPropArg id, bool set, int
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Do nothing if flag is already set.
|
// Do nothing if flag is already set as required.
|
||||||
if ( p->HasFlag(wxPG_PROP_READONLY) )
|
if ( set && p->HasFlag(wxPG_PROP_READONLY) )
|
||||||
|
return;
|
||||||
|
if ( !set && !p->HasFlag(wxPG_PROP_READONLY) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p->ChangeFlag(wxPG_PROP_READONLY, set);
|
p->ChangeFlag(wxPG_PROP_READONLY, set);
|
||||||
|
Reference in New Issue
Block a user