diff --git a/docs/changes.txt b/docs/changes.txt index 18b61b88ea..d822b9852f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -575,6 +575,7 @@ All (GUI): - Set correct cursor when the mouse is over image map links in wxHTML (LukasK). - Add wxPropertyGridPageState::GetColumnFullWidth() (Teodor Petrov). - wxRTC: extracted XML utilities into a separate class for potential reuse. +- wxPropertyGrid: improve composite flags handling (Jens Lody). wxGTK: diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index f1112a0ac8..c79faae159 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -1490,7 +1490,7 @@ wxString wxFlagsProperty::ValueToString( wxVariant& value, for ( i = 0; i < GetItemCount(); i++ ) { int doAdd; - doAdd = ( flags & choices.GetValue(i) ); + doAdd = ( (flags & choices.GetValue(i)) == choices.GetValue(i) ); if ( doAdd ) { @@ -1578,7 +1578,7 @@ void wxFlagsProperty::RefreshChildren() if ( subVal != (m_oldValue & flag) ) p->ChangeFlag( wxPG_PROP_MODIFIED, true ); - p->SetValue( subVal?true:false ); + p->SetValue( subVal == flag?true:false ); } m_oldValue = flags;