Use HasExtraStyle() function to examine extra wxPG flags.

This dedicated function to check the extra flag is used instead of doing explicit check of the value returned by GetExtraStyle() function.
This commit is contained in:
Artur Wieczorek
2015-05-21 20:07:58 +02:00
parent 716656ae47
commit a39311bc2d
3 changed files with 20 additions and 20 deletions

View File

@@ -547,7 +547,7 @@ wxPropertyGrid::~wxPropertyGrid()
ReleaseMouse();
// Call with NULL to disconnect event handling
if ( GetExtraStyle() & wxPG_EX_ENABLE_TLP_TRACKING )
if ( HasExtraStyle(wxPG_EX_ENABLE_TLP_TRACKING) )
{
OnTLPChanging(NULL);
@@ -715,7 +715,7 @@ bool wxPropertyGrid::DoAddToSelection( wxPGProperty* prop, int selFlags )
{
wxCHECK( prop, false );
if ( !(GetExtraStyle() & wxPG_EX_MULTIPLE_SELECTION) )
if ( !HasExtraStyle(wxPG_EX_MULTIPLE_SELECTION) )
return DoSelectProperty(prop, selFlags);
wxArrayPGProperty& selection = m_pState->m_selection;
@@ -824,7 +824,7 @@ bool wxPropertyGrid::AddToSelectionFromInputEvent( wxPGProperty* prop,
// Set to 2 if also add all items in between
int addToExistingSelection = 0;
if ( GetExtraStyle() & wxPG_EX_MULTIPLE_SELECTION )
if ( HasExtraStyle(wxPG_EX_MULTIPLE_SELECTION) )
{
if ( mouseEvent )
{
@@ -1858,7 +1858,7 @@ wxPGProperty* wxPropertyGrid::DoGetItemAtY( int y ) const
void wxPropertyGrid::OnPaint( wxPaintEvent& WXUNUSED(event) )
{
wxDC* dcPtr = NULL;
if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
if ( !HasExtraStyle(wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
{
if ( m_doubleBuffer )
{
@@ -4346,7 +4346,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
if ( p )
pHelpString = &p->GetHelpString();
if ( !(GetExtraStyle() & wxPG_EX_HELP_AS_TOOLTIPS) )
if ( !HasExtraStyle(wxPG_EX_HELP_AS_TOOLTIPS) )
{
#if wxUSE_STATUSBAR
@@ -4650,7 +4650,7 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
m_width = width;
m_height = height;
if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
if ( !HasExtraStyle(wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
{
int dblh = (m_lineHeight*2);
if ( !m_doubleBuffer )
@@ -5107,7 +5107,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y,
if ( m_propHover && !m_propHover->IsCategory() )
{
if ( GetExtraStyle() & wxPG_EX_HELP_AS_TOOLTIPS )
if ( HasExtraStyle(wxPG_EX_HELP_AS_TOOLTIPS) )
{
// Show help string as a tooltip
wxString tipString = m_propHover->GetHelpString();
@@ -5196,7 +5196,7 @@ bool wxPropertyGrid::HandleMouseMove( int x, unsigned int y,
//
// Multi select by dragging
//
if ( (GetExtraStyle() & wxPG_EX_MULTIPLE_SELECTION) &&
if ( HasExtraStyle(wxPG_EX_MULTIPLE_SELECTION) &&
event.LeftIsDown() &&
m_propHover &&
GetSelection() &&
@@ -5891,7 +5891,7 @@ void wxPropertyGrid::OnIdle( wxIdleEvent& WXUNUSED(event) )
//
// Check if top-level parent has changed
if ( GetExtraStyle() & wxPG_EX_ENABLE_TLP_TRACKING )
if ( HasExtraStyle(wxPG_EX_ENABLE_TLP_TRACKING) )
{
wxWindow* tlp = ::wxGetTopLevelParent(this);
if ( tlp != m_tlp )