From d66bfa58e7fa1b0bd0857494455b3fe8074eb93b Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 12 Jul 2025 18:20:21 +0200 Subject: [PATCH] DIALOG_LABEL_PROPERTIES: allows entering spaces in label names. This issue was created by switching to FILTER_COMBOBOX in this dialog. Spaces in labels are not a good idea, but this is needed to enter group members to a bus definition Fixes https://gitlab.com/kicad/code/kicad/-/issues/21300 (cherry picked from commit a0485a38a771033ed6d672c7674cebc2c8d47913) --- eeschema/dialogs/dialog_label_properties.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eeschema/dialogs/dialog_label_properties.cpp b/eeschema/dialogs/dialog_label_properties.cpp index 350c59dfd8..1ff38ef76e 100644 --- a/eeschema/dialogs/dialog_label_properties.cpp +++ b/eeschema/dialogs/dialog_label_properties.cpp @@ -421,6 +421,14 @@ void DIALOG_LABEL_PROPERTIES::OnCBValueCharHook( wxKeyEvent& aEvent ) // and we only want to accept the entered string. if( aEvent.GetKeyCode() == WXK_RETURN ) wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) ); + else if( aEvent.GetKeyCode() == WXK_SPACE ) + { + // our FILTER_COMBOBOX uses the space as special command, not wanted here, + // to open the dropdown list of labels. + // So just add the space char to the current text, at current insertion point, + // and do not skip this event + m_activeTextEntry->WriteText( wxT(" " ) ); + } else aEvent.Skip(); }