Fix deprecation warnings in latest wxWidgets

This commit is contained in:
Jon Evans 2023-11-26 11:04:45 -05:00
parent aa3b4ee6d6
commit c3deafa597
2 changed files with 21 additions and 6 deletions

View File

@ -84,11 +84,20 @@ PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
m_grid->SetValidationFailureBehavior( wxPG_VFB_MARK_CELL );
#endif
#if wxCHECK_VERSION( 3, 3, 0 )
m_grid->AddActionTrigger( wxPGKeyboardActions::NextProperty, WXK_RETURN );
m_grid->AddActionTrigger( wxPGKeyboardActions::NextProperty, WXK_NUMPAD_ENTER );
m_grid->AddActionTrigger( wxPGKeyboardActions::NextProperty, WXK_DOWN );
m_grid->AddActionTrigger( wxPGKeyboardActions::PrevProperty, WXK_UP );
m_grid->AddActionTrigger( wxPGKeyboardActions::Edit, WXK_SPACE );
#else
m_grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_RETURN );
m_grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_NUMPAD_ENTER );
m_grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_DOWN );
m_grid->AddActionTrigger( wxPG_ACTION_PREV_PROPERTY, WXK_UP );
m_grid->AddActionTrigger( wxPG_ACTION_EDIT, WXK_SPACE );
#endif
m_grid->DedicateKey( WXK_RETURN );
m_grid->DedicateKey( WXK_NUMPAD_ENTER );
m_grid->DedicateKey( WXK_DOWN );

View File

@ -106,17 +106,23 @@ DIALOG_SIM_MODEL<T_symbol, T_field>::DIALOG_SIM_MODEL( wxWindow* aParent, T_symb
grid->Bind( wxEVT_SET_FOCUS, &DIALOG_SIM_MODEL::onParamGridSetFocus, this );
grid->Bind( wxEVT_UPDATE_UI, &DIALOG_SIM_MODEL::onUpdateUI, this );
grid->AddActionTrigger( wxPG_ACTION_EDIT, WXK_RETURN );
grid->DedicateKey( WXK_RETURN );
grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_RETURN );
grid->AddActionTrigger( wxPG_ACTION_EDIT, WXK_NUMPAD_ENTER );
grid->DedicateKey( WXK_NUMPAD_ENTER );
grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_NUMPAD_ENTER );
grid->DedicateKey( WXK_UP );
grid->DedicateKey( WXK_DOWN );
#if wxCHECK_VERSION( 3, 3, 0 )
grid->AddActionTrigger( wxPGKeyboardActions::Edit, WXK_RETURN );
grid->AddActionTrigger( wxPGKeyboardActions::NextProperty, WXK_RETURN );
grid->AddActionTrigger( wxPGKeyboardActions::Edit, WXK_NUMPAD_ENTER );
grid->AddActionTrigger( wxPGKeyboardActions::NextProperty, WXK_NUMPAD_ENTER );
#else
grid->AddActionTrigger( wxPG_ACTION_EDIT, WXK_RETURN );
grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_RETURN );
grid->AddActionTrigger( wxPG_ACTION_EDIT, WXK_NUMPAD_ENTER );
grid->AddActionTrigger( wxPG_ACTION_NEXT_PROPERTY, WXK_NUMPAD_ENTER );
#endif
m_pinAssignmentsGrid->PushEventHandler( new GRID_TRICKS( m_pinAssignmentsGrid ) );
m_subcktLabel->SetFont( KIUI::GetInfoFont( m_subcktLabel ) );