Make m_inDoPropertyChanged and m_inCommitChangesFromEditor bools; Manage m_inDoPropertyChanged using wxON_BLOCK_EXIT_SET()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e8e754bfa3
commit
88f47aa770
@ -1932,10 +1932,10 @@ protected:
|
||||
unsigned char m_keyComboConsumed;
|
||||
|
||||
/** 1 if in DoPropertyChanged() */
|
||||
unsigned char m_inDoPropertyChanged;
|
||||
bool m_inDoPropertyChanged;
|
||||
|
||||
/** 1 if in CommitChangesFromEditor() */
|
||||
unsigned char m_inCommitChangesFromEditor;
|
||||
bool m_inCommitChangesFromEditor;
|
||||
|
||||
/** 1 if in DoSelectProperty() */
|
||||
bool m_inDoSelectProperty;
|
||||
|
@ -341,9 +341,9 @@ void wxPropertyGrid::Init1()
|
||||
m_curFocused = NULL;
|
||||
m_processedEvent = NULL;
|
||||
m_sortFunction = NULL;
|
||||
m_inDoPropertyChanged = 0;
|
||||
m_inCommitChangesFromEditor = 0;
|
||||
m_inDoSelectProperty = 0;
|
||||
m_inDoPropertyChanged = false;
|
||||
m_inCommitChangesFromEditor = false;
|
||||
m_inDoSelectProperty = false;
|
||||
m_inOnValidationFailure = false;
|
||||
m_permanentValidationFailureBehavior = wxPG_VFB_DEFAULT;
|
||||
m_dragStatus = 0;
|
||||
@ -2909,7 +2909,7 @@ bool wxPropertyGrid::CommitChangesFromEditor( wxUint32 flags )
|
||||
(m_iFlags & wxPG_FL_INITIALIZED) &&
|
||||
selected )
|
||||
{
|
||||
m_inCommitChangesFromEditor = 1;
|
||||
m_inCommitChangesFromEditor = true;
|
||||
|
||||
wxVariant variant(selected->GetValueRef());
|
||||
bool valueIsPending = false;
|
||||
@ -2944,9 +2944,9 @@ bool wxPropertyGrid::CommitChangesFromEditor( wxUint32 flags )
|
||||
EditorsValueWasNotModified();
|
||||
}
|
||||
|
||||
bool res = true;
|
||||
m_inCommitChangesFromEditor = false;
|
||||
|
||||
m_inCommitChangesFromEditor = 0;
|
||||
bool res = true;
|
||||
|
||||
if ( validationFailure && !forceSuccess )
|
||||
{
|
||||
@ -3351,12 +3351,13 @@ bool wxPropertyGrid::DoPropertyChanged( wxPGProperty* p, unsigned int selFlags )
|
||||
if ( m_inDoPropertyChanged )
|
||||
return true;
|
||||
|
||||
m_inDoPropertyChanged = true;
|
||||
wxON_BLOCK_EXIT_SET(m_inDoPropertyChanged, false);
|
||||
|
||||
wxPGProperty* selected = GetSelection();
|
||||
|
||||
m_pState->m_anyModified = 1;
|
||||
|
||||
m_inDoPropertyChanged = 1;
|
||||
|
||||
// If property's value is being changed, assume it is valid
|
||||
OnValidationFailureReset(selected);
|
||||
|
||||
@ -3448,8 +3449,6 @@ bool wxPropertyGrid::DoPropertyChanged( wxPGProperty* p, unsigned int selFlags )
|
||||
|
||||
SendEvent( wxEVT_PG_CHANGED, changedProperty, NULL );
|
||||
|
||||
m_inDoPropertyChanged = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user