Pcbnew: allow tab traversal of footprint orientation text control
Disable the text update event for the orientation cutom value field before updating it when the radio buttons are selected. This allows to use the conventional EVT_TEXT handler, rather than KEYDOWN, which has two effects: * Tabbing though the dialog no longer sets custom orientation * Click-driven clipboard actions trigger the update correctly. Introduce a helper function in validators.h to assist in updating validated fields without triggering further events. Fixes: lp:1819006 * https://bugs.launchpad.net/kicad/+bug/1819006
This commit is contained in:
@@ -218,3 +218,14 @@ void ENV_VAR_NAME_VALIDATOR::OnTextChanged( wxCommandEvent& event )
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void KIUI::ValidatorTransferToWindowWithoutEvents( wxValidator& aValidator )
|
||||
{
|
||||
wxWindow* ctrl = aValidator.GetWindow();
|
||||
|
||||
wxCHECK_RET( ctrl != nullptr, "Transferring validator data without a control" );
|
||||
|
||||
wxEventBlocker orient_update_blocker( ctrl, wxEVT_ANY );
|
||||
aValidator.TransferToWindow();
|
||||
}
|
||||
Reference in New Issue
Block a user