Do not generate wxEVT_PG_SELECTED with direct ClearSelection() and SelectProperty() calls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -435,19 +435,21 @@ enum wxPG_KEYBOARD_ACTIONS
|
||||
// wxPropertyGrid::DoSelectProperty flags (selFlags)
|
||||
|
||||
// Focuses to created editor
|
||||
#define wxPG_SEL_FOCUS 0x01
|
||||
#define wxPG_SEL_FOCUS 0x01
|
||||
// Forces deletion and recreation of editor
|
||||
#define wxPG_SEL_FORCE 0x02
|
||||
#define wxPG_SEL_FORCE 0x02
|
||||
// For example, doesn't cause EnsureVisible
|
||||
#define wxPG_SEL_NONVISIBLE 0x04
|
||||
#define wxPG_SEL_NONVISIBLE 0x04
|
||||
// Do not validate editor's value before selecting
|
||||
#define wxPG_SEL_NOVALIDATE 0x08
|
||||
#define wxPG_SEL_NOVALIDATE 0x08
|
||||
// Property being deselected is about to be deleted
|
||||
#define wxPG_SEL_DELETING 0x10
|
||||
#define wxPG_SEL_DELETING 0x10
|
||||
// Property's values was set to unspecified by the user
|
||||
#define wxPG_SEL_SETUNSPEC 0x20
|
||||
#define wxPG_SEL_SETUNSPEC 0x20
|
||||
// Property's event handler changed the value
|
||||
#define wxPG_SEL_DIALOGVAL 0x40
|
||||
#define wxPG_SEL_DIALOGVAL 0x40
|
||||
// Set to disable sending of wxEVT_PG_SELECTED event
|
||||
#define wxPG_SEL_DONT_SEND_EVENT 0x80
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -542,8 +544,11 @@ enum wxPG_KEYBOARD_ACTIONS
|
||||
|
||||
@beginEventTable{wxPropertyGridEvent}
|
||||
@event{EVT_PG_SELECTED (id, func)}
|
||||
Respond to wxEVT_PG_SELECTED event, generated when property value
|
||||
has been changed by user.
|
||||
Respond to wxEVT_PG_SELECTED event, generated when a property selection
|
||||
has been changed, either by user action or by indirect program
|
||||
function. For instance, collapsing a parent property programmatically
|
||||
causes any selected child property to become unselected, and may
|
||||
therefore cause this event to be generated.
|
||||
@event{EVT_PG_CHANGING(id, func)}
|
||||
Respond to wxEVT_PG_CHANGING event, generated when property value
|
||||
is about to be changed by user. Use wxPropertyGridEvent::GetValue()
|
||||
@@ -935,19 +940,22 @@ public:
|
||||
/**
|
||||
Selects a property.
|
||||
Editor widget is automatically created, but not focused unless focus is
|
||||
true. This will generate wxEVT_PG_SELECT event.
|
||||
true.
|
||||
|
||||
@param id
|
||||
Property to select.
|
||||
|
||||
@return
|
||||
True if selection finished successfully. Usually only fails if
|
||||
current value in editor is not valid.
|
||||
|
||||
@remarks In wxPropertyGrid 1.4, this member function used to generate
|
||||
wxEVT_PG_SELECTED. In wxWidgets 2.9 and later, it no longer
|
||||
does that.
|
||||
|
||||
@see wxPropertyGrid::Unselect
|
||||
*/
|
||||
bool SelectProperty( wxPGPropArg id, bool focus = false )
|
||||
{
|
||||
wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false)
|
||||
return DoSelectProperty(p,focus?wxPG_SEL_FOCUS:0);
|
||||
}
|
||||
bool SelectProperty( wxPGPropArg id, bool focus = false );
|
||||
|
||||
/** Sets category caption background colour. */
|
||||
void SetCaptionBackgroundColour(const wxColour& col);
|
||||
@@ -1779,7 +1787,11 @@ protected:
|
||||
void CorrectEditorWidgetPosY();
|
||||
|
||||
/** Deselect current selection, if any. Returns true if success
|
||||
(ie. validator did not intercept). */
|
||||
(ie. validator did not intercept).
|
||||
|
||||
Unlike ClearSelection(), DoClearSelection() sends the
|
||||
wxEVT_PG_SELECTED event.
|
||||
*/
|
||||
bool DoClearSelection();
|
||||
|
||||
int DoDrawItems( wxDC& dc,
|
||||
|
Reference in New Issue
Block a user