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 a0485a38a7)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user