diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 91493edff3..3c256f28da 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -500,23 +500,34 @@ void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt ) int currentIdx = -1; int delta = aEvt.ShiftDown() ? -1 : 1; + auto advance = [&]( int& idx ) + { + idx += delta; + + if( idx < 0 ) + idx = m_tabOrder.size() - 1; + else if ( idx >= m_tabOrder.size() ) + idx = 0; + }; + for( size_t i = 0; i < m_tabOrder.size(); ++i ) { if( m_tabOrder[i] == currentWindow ) { - currentIdx = (int) i + delta; - - if( currentIdx < 0 ) - currentIdx = m_tabOrder.size() - 1; - else if ( currentIdx >= m_tabOrder.size() ) - currentIdx = 0; - + currentIdx = (int) i; break; } } if( currentIdx >= 0 ) { + advance( currentIdx ); + +#ifdef __APPLE__ + while( dynamic_cast( m_tabOrder[ currentIdx ] ) == nullptr ) + advance( currentIdx ); +#endif + m_tabOrder[ currentIdx ]->SetFocus(); return; } diff --git a/eeschema/dialogs/dialog_lib_edit_pin.cpp b/eeschema/dialogs/dialog_lib_edit_pin.cpp index 0cd9f19624..4f2c3ba71e 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin.cpp @@ -72,7 +72,10 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( LIB_EDIT_FRAME* parent, LIB_PIN* aPin m_choiceOrientation, m_pinLengthCtrl, m_nameSizeCtrl, - m_numberSizeCtrl + m_numberSizeCtrl, + m_checkApplyToAllParts, + m_checkApplyToAllConversions, + m_checkShow }; m_sdbSizerButtonsOK->SetDefault();