Fix navigating through wxPropertyGrid with wxPG_ACTION_EDIT
wxPG_ACTION_EDIT should not be considered done when wxPGProperty is not editable (i.e. is disabled, read-only, is a wxPropertyCategory) to prevent from blocking secondary actions (like wxPG_ACTION_NEXT_PROPERTY) in this case. Closes #19060.
This commit is contained in:
@@ -5732,10 +5732,14 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )
|
||||
wxPGProperty* p = selected;
|
||||
|
||||
if ( action == wxPG_ACTION_EDIT && !editorFocused )
|
||||
{
|
||||
// Mark as handled only for editable property
|
||||
if ( !p->IsCategory() && p->IsEnabled() && !p->HasFlag(wxPG_PROP_READONLY) )
|
||||
{
|
||||
DoSelectProperty( p, wxPG_SEL_FOCUS );
|
||||
wasHandled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Travel and expand/collapse
|
||||
int selectDir = -2;
|
||||
@@ -5774,10 +5778,10 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild )
|
||||
int selFlags = 0;
|
||||
int reopenLabelEditorCol = -1;
|
||||
|
||||
if ( editorFocused )
|
||||
if ( action == wxPG_ACTION_EDIT )
|
||||
{
|
||||
// If editor was focused, then make the next editor
|
||||
// focused as well
|
||||
// Make the next editor focused as well
|
||||
// if we are actually going to edit the property.
|
||||
selFlags |= wxPG_SEL_FOCUS;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user