Fix hotkey editing on OSX.
Focus was on the dialog instead of the panel. The dialog doesn't have the IsUserPanel flag set and so wxEVT_CHAR processing doesn't happen. (Why? I haven't a clue.) Also fixed some more performance issues with the auto-column-widths. Fixes https://gitlab.com/kicad/code/kicad/issues/6591
This commit is contained in:
parent
fc57860caf
commit
645c49427c
|
@ -132,6 +132,7 @@ public:
|
||||||
// specials like Tab and Return, are received, particularly on MSW.
|
// specials like Tab and Return, are received, particularly on MSW.
|
||||||
panel->Bind( wxEVT_CHAR, &HK_PROMPT_DIALOG::OnChar, this );
|
panel->Bind( wxEVT_CHAR, &HK_PROMPT_DIALOG::OnChar, this );
|
||||||
panel->Bind( wxEVT_CHAR_HOOK, &HK_PROMPT_DIALOG::OnCharHook, this );
|
panel->Bind( wxEVT_CHAR_HOOK, &HK_PROMPT_DIALOG::OnCharHook, this );
|
||||||
|
SetInitialFocus( panel );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -482,8 +483,14 @@ void WIDGET_HOTKEY_LIST::ResetAllHotkeys( bool aResetToDefault )
|
||||||
|
|
||||||
UpdateFromClientData();
|
UpdateFromClientData();
|
||||||
|
|
||||||
GetDataView()->GetColumn( 0 )->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
wxDataViewColumn* col = GetDataView()->GetColumn( 0 );
|
||||||
GetDataView()->GetColumn( 1 )->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
col->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
||||||
|
col->SetWidth( col->GetWidth() );
|
||||||
|
|
||||||
|
col = GetDataView()->GetColumn( 1 );
|
||||||
|
col->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
||||||
|
col->SetWidth( col->GetWidth() );
|
||||||
|
|
||||||
Thaw();
|
Thaw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,6 +498,15 @@ void WIDGET_HOTKEY_LIST::ResetAllHotkeys( bool aResetToDefault )
|
||||||
bool WIDGET_HOTKEY_LIST::TransferDataToControl()
|
bool WIDGET_HOTKEY_LIST::TransferDataToControl()
|
||||||
{
|
{
|
||||||
updateShownItems( "" );
|
updateShownItems( "" );
|
||||||
|
|
||||||
|
wxDataViewColumn* col = GetDataView()->GetColumn( 0 );
|
||||||
|
col->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
||||||
|
col->SetWidth( col->GetWidth() );
|
||||||
|
|
||||||
|
col = GetDataView()->GetColumn( 1 );
|
||||||
|
col->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
||||||
|
col->SetWidth( col->GetWidth() );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,9 +536,6 @@ void WIDGET_HOTKEY_LIST::updateShownItems( const wxString& aFilterStr )
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateFromClientData();
|
UpdateFromClientData();
|
||||||
|
|
||||||
GetDataView()->GetColumn( 0 )->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
|
||||||
GetDataView()->GetColumn( 1 )->SetWidth( wxCOL_WIDTH_AUTOSIZE );
|
|
||||||
Thaw();
|
Thaw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue