Function wxPGProperty::HasFlag should return Boolean value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Artur Wieczorek
2015-01-19 20:19:26 +00:00
parent 42a1064ea8
commit 5675ba1e84

View File

@@ -1526,10 +1526,7 @@ public:
*/ */
bool AreChildrenComponents() const bool AreChildrenComponents() const
{ {
if ( m_flags & (wxPG_PROP_COMPOSED_VALUE|wxPG_PROP_AGGREGATE) ) return (m_flags & (wxPG_PROP_COMPOSED_VALUE|wxPG_PROP_AGGREGATE)) != 0;
return true;
return false;
} }
/** /**
@@ -1725,6 +1722,7 @@ public:
return m_value.IsNull(); return m_value.IsNull();
} }
#if WXWIN_COMPATIBILITY_3_0
/** /**
Returns non-zero if property has given flag set. Returns non-zero if property has given flag set.
@@ -1734,6 +1732,17 @@ public:
{ {
return ( m_flags & flag ); return ( m_flags & flag );
} }
#else
/**
Returns true if property has given flag set.
@see propgrid_propflags
*/
bool HasFlag(wxPGPropertyFlags flag) const
{
return (m_flags & flag) != 0;
}
#endif
/** Returns comma-delimited string of property attributes. /** Returns comma-delimited string of property attributes.
*/ */
@@ -1802,7 +1811,7 @@ public:
/** /**
Returns true if this property is actually a wxPropertyCategory. Returns true if this property is actually a wxPropertyCategory.
*/ */
bool IsCategory() const { return HasFlag(wxPG_PROP_CATEGORY)?true:false; } bool IsCategory() const { return (m_flags & wxPG_PROP_CATEGORY) != 0; }
/** Returns true if this property is actually a wxRootProperty. /** Returns true if this property is actually a wxRootProperty.
*/ */
@@ -1849,7 +1858,7 @@ public:
*/ */
bool UsesAutoUnspecified() const bool UsesAutoUnspecified() const
{ {
return HasFlag(wxPG_PROP_AUTO_UNSPECIFIED)?true:false; return (m_flags & wxPG_PROP_AUTO_UNSPECIFIED) != 0;
} }
wxBitmap* GetValueImage() const wxBitmap* GetValueImage() const