m_inDoSelectProperty: make it bool and use wxON_BLOCK_EXIT_SET() on it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli 2010-07-04 10:30:13 +00:00
parent 03d47fcf07
commit 96bffa1288
2 changed files with 3 additions and 9 deletions

View File

@ -1938,7 +1938,7 @@ protected:
unsigned char m_inCommitChangesFromEditor;
/** 1 if in DoSelectProperty() */
unsigned char m_inDoSelectProperty;
bool m_inDoSelectProperty;
bool m_inOnValidationFailure;

View File

@ -4000,13 +4000,11 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
if ( m_inDoSelectProperty )
return true;
m_inDoSelectProperty = 1;
m_inDoSelectProperty = true;
wxON_BLOCK_EXIT_SET(m_inDoSelectProperty, false);
if ( !m_pState )
{
m_inDoSelectProperty = 0;
return false;
}
wxArrayPGProperty prevSelection = m_pState->m_selection;
wxPGProperty* prevFirstSel;
@ -4072,7 +4070,6 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
}
}
m_inDoSelectProperty = 0;
return true;
}
@ -4088,7 +4085,6 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
// Validation has failed, so we can't exit the previous editor
//::wxMessageBox(_("Please correct the value or press ESC to cancel the edit."),
// _("Invalid Value"),wxOK|wxICON_ERROR);
m_inDoSelectProperty = 0;
return false;
}
}
@ -4327,8 +4323,6 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags )
}
#endif
m_inDoSelectProperty = 0;
// call wx event handler (here so that it also occurs on deselection)
if ( !(flags & wxPG_SEL_DONT_SEND_EVENT) )
SendEvent( wxEVT_PG_SELECTED, p, NULL );