3D viewer, main toolbar: fix incorrect parent for 2 widgets.
Also use SHIFT instead of ALT as modifier to show the viewport list, because ALT is not usable on Windows, especially combined with TAB
This commit is contained in:
parent
490875e222
commit
3245aec5b5
|
@ -51,10 +51,11 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
|
||||||
m_mainToolBar->SetAuiManager( &m_auimgr );
|
m_mainToolBar->SetAuiManager( &m_auimgr );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_viewportsLabel = new wxStaticText( this, wxID_ANY, _( "Viewports (Alt+Tab):" ) );
|
// Show the hotkey to open the windows list selector:
|
||||||
|
m_viewportsLabel = new wxStaticText( m_mainToolBar, wxID_ANY, _( "Viewports (Shift+Tab):" ) );
|
||||||
m_viewportsLabel->Wrap( -1 );
|
m_viewportsLabel->Wrap( -1 );
|
||||||
|
|
||||||
m_cbViewports = new wxChoice( this, wxID_ANY );
|
m_cbViewports = new wxChoice( m_mainToolBar, wxID_ANY );
|
||||||
|
|
||||||
for( std::pair<const wxString, VIEWPORT3D>& pair : m_viewports )
|
for( std::pair<const wxString, VIEWPORT3D>& pair : m_viewports )
|
||||||
m_cbViewports->Append( pair.first, static_cast<void*>( &pair.second ) );
|
m_cbViewports->Append( pair.first, static_cast<void*>( &pair.second ) );
|
||||||
|
|
|
@ -285,11 +285,9 @@ bool EDA_3D_VIEWER_FRAME::TryBefore( wxEvent& aEvent )
|
||||||
{
|
{
|
||||||
static bool s_viewportSwitcherShown = false;
|
static bool s_viewportSwitcherShown = false;
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
// On Windows, the Alt key is not usable, especially with TAB key
|
||||||
wxKeyCode viewSwitchKey = WXK_ALT;
|
// Shift key is OK on all platforms
|
||||||
#else
|
wxKeyCode viewSwitchKey = WXK_SHIFT;
|
||||||
wxKeyCode viewSwitchKey = WXK_WINDOWS_LEFT;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if( aEvent.GetEventType() != wxEVT_CHAR && aEvent.GetEventType() != wxEVT_CHAR_HOOK )
|
if( aEvent.GetEventType() != wxEVT_CHAR && aEvent.GetEventType() != wxEVT_CHAR_HOOK )
|
||||||
return wxFrame::TryBefore( aEvent );
|
return wxFrame::TryBefore( aEvent );
|
||||||
|
|
Loading…
Reference in New Issue