From 67752c3870a1864a6000fc842d771d58de3a489b Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sat, 4 Dec 2021 12:18:20 +0100 Subject: [PATCH] Validate the value in the first and last property of wxPropertyGrid wxPGProperty value edited in the first or last property of wxPropertyGrid should be validated while attempting to navigate to the previous/next property. Closes #19315. --- src/propgrid/propgrid.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 2317df33b2..c406f269a9 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -5803,6 +5803,11 @@ void wxPropertyGrid::HandleKeyEvent( wxKeyEvent &event, bool fromChild ) if ( reopenLabelEditorCol >= 0 ) DoBeginLabelEdit(reopenLabelEditorCol); } + else if ( action == wxPG_ACTION_EDIT ) + { + // For first and last item just validate the value + CommitChangesFromEditor(); + } wasHandled = true; } }