Don't append '+' when modifier used on its own.
This commit is contained in:
parent
58ac62d493
commit
78db69bb48
|
@ -56,7 +56,7 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
|
|||
wxString keyName = KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY );
|
||||
|
||||
m_viewportsLabel = new wxStaticText( m_mainToolBar, wxID_ANY,
|
||||
wxString::Format( _( "Viewports (%sTab):" ), keyName ) );
|
||||
wxString::Format( _( "Viewports (%s+Tab):" ), keyName ) );
|
||||
m_viewportsLabel->Wrap( -1 );
|
||||
|
||||
m_cbViewports = new wxChoice( m_mainToolBar, wxID_ANY );
|
||||
|
@ -69,7 +69,7 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
|
|||
m_cbViewports->Append( _( "Delete viewport..." ) );
|
||||
|
||||
m_cbViewports->SetToolTip( wxString::Format( _( "Save and restore view orientation and zoom.\n"
|
||||
"Use %sTab to activate selector.\n"
|
||||
"Use %s+Tab to activate selector.\n"
|
||||
"Successive Tabs while holding %s down will "
|
||||
"cycle through viewports in the popup." ),
|
||||
keyName, keyName ) );
|
||||
|
|
|
@ -176,13 +176,13 @@ wxString KeyNameFromKeyCode( int aKeycode, bool* aIsFound )
|
|||
bool found = false;
|
||||
|
||||
if( aKeycode == WXK_CONTROL )
|
||||
return MODIFIER_CTRL;
|
||||
return wxString( MODIFIER_CTRL ).BeforeFirst( '+' );
|
||||
else if( aKeycode == WXK_RAW_CONTROL )
|
||||
return MODIFIER_CTRL_BASE;
|
||||
return wxString( MODIFIER_CTRL_BASE ).BeforeFirst( '+' );
|
||||
else if( aKeycode == WXK_SHIFT )
|
||||
return MODIFIER_SHIFT;
|
||||
return wxString( MODIFIER_SHIFT ).BeforeFirst( '+' );
|
||||
else if( aKeycode == WXK_ALT )
|
||||
return MODIFIER_ALT;
|
||||
return wxString( MODIFIER_ALT ).BeforeFirst( '+' );
|
||||
|
||||
// Assume keycode of 0 is "unassigned"
|
||||
if( (aKeycode & MD_CTRL) != 0 )
|
||||
|
|
|
@ -445,14 +445,14 @@ APPEARANCE_CONTROLS::APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFo
|
|||
m_viewportsLabel->SetFont( infoFont );
|
||||
|
||||
m_cbLayerPresets->SetToolTip( wxString::Format( _( "Save and restore layer visibility combinations.\n"
|
||||
"Use %sTab to activate selector.\n"
|
||||
"Use %s+Tab to activate selector.\n"
|
||||
"Successive Tabs while holding %s down will "
|
||||
"cycle through presets in the popup." ),
|
||||
KeyNameFromKeyCode( PRESET_SWITCH_KEY ),
|
||||
KeyNameFromKeyCode( PRESET_SWITCH_KEY ) ) );
|
||||
|
||||
m_cbViewports->SetToolTip( wxString::Format( _( "Save and restore view location and zoom.\n"
|
||||
"Use %sTab to activate selector.\n"
|
||||
"Use %s+Tab to activate selector.\n"
|
||||
"Successive Tabs while holding %s down will "
|
||||
"cycle through viewports in the popup." ),
|
||||
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ),
|
||||
|
@ -2444,7 +2444,7 @@ void APPEARANCE_CONTROLS::rebuildNets()
|
|||
|
||||
void APPEARANCE_CONTROLS::rebuildLayerPresetsWidget()
|
||||
{
|
||||
m_viewportsLabel->SetLabel( wxString::Format( _( "Presets (%sTab):" ),
|
||||
m_viewportsLabel->SetLabel( wxString::Format( _( "Presets (%s+Tab):" ),
|
||||
KeyNameFromKeyCode( PRESET_SWITCH_KEY ) ) );
|
||||
|
||||
m_cbLayerPresets->Clear();
|
||||
|
@ -2697,7 +2697,7 @@ void APPEARANCE_CONTROLS::doApplyLayerPreset( const LAYER_PRESET& aPreset )
|
|||
|
||||
void APPEARANCE_CONTROLS::rebuildViewportsWidget()
|
||||
{
|
||||
m_viewportsLabel->SetLabel( wxString::Format( _( "Viewports (%sTab):" ),
|
||||
m_viewportsLabel->SetLabel( wxString::Format( _( "Viewports (%s+Tab):" ),
|
||||
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ) ) );
|
||||
|
||||
m_cbViewports->Clear();
|
||||
|
|
Loading…
Reference in New Issue