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