Fix incorrect initialization of default colors for some items.
Fix incorrect detection of key handled in footprint_wizard_frame.cpp
This commit is contained in:
parent
cb3d28f11b
commit
b5f23befeb
|
@ -105,9 +105,9 @@ COLORS_DESIGN_SETTINGS::COLORS_DESIGN_SETTINGS( FRAME_T aFrameType )
|
|||
src = 0; // wrap the source.
|
||||
}
|
||||
|
||||
for( unsigned src = 0, dst = LAYER_VIAS; dst < DIM( default_items_color ); ++dst )
|
||||
for( unsigned src = 0, dst = LAYER_VIAS; src < DIM( default_items_color ); ++dst, ++src )
|
||||
{
|
||||
m_LayersColors[dst] = COLOR4D( default_items_color[src++] );
|
||||
m_LayersColors[dst] = COLOR4D( default_items_color[src] );
|
||||
}
|
||||
|
||||
m_LayersColors[ LAYER_PCB_BACKGROUND ] = BLACK;
|
||||
|
|
|
@ -152,6 +152,7 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway,
|
|||
|
||||
ReCreateHToolbar();
|
||||
ReCreateVToolbar();
|
||||
SetActiveLayer( F_Cu );
|
||||
|
||||
// Creates the parameter pages list
|
||||
m_pageList = new wxListBox( this, ID_FOOTPRINT_WIZARD_PAGE_LIST,
|
||||
|
@ -532,8 +533,6 @@ void FOOTPRINT_WIZARD_FRAME::OnActivate( wxActivateEvent& event )
|
|||
|
||||
bool FOOTPRINT_WIZARD_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey )
|
||||
{
|
||||
bool eventHandled = true;
|
||||
|
||||
// Filter out the 'fake' mouse motion after a keyboard movement
|
||||
if( !aHotKey && m_movingCursorWithKeyboard )
|
||||
{
|
||||
|
@ -546,41 +545,47 @@ bool FOOTPRINT_WIZARD_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition
|
|||
|
||||
wxPoint pos = aPosition;
|
||||
wxPoint oldpos = GetCrossHairPosition();
|
||||
GeneralControlKeyMovement( aHotKey, &pos, true );
|
||||
bool keyHandled = GeneralControlKeyMovement( aHotKey, &pos, true );
|
||||
|
||||
switch( aHotKey )
|
||||
{
|
||||
case WXK_F1:
|
||||
cmd.SetId( ID_POPUP_ZOOM_IN );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
keyHandled = true;
|
||||
break;
|
||||
|
||||
case WXK_F2:
|
||||
cmd.SetId( ID_POPUP_ZOOM_OUT );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
keyHandled = true;
|
||||
break;
|
||||
|
||||
case WXK_F3:
|
||||
cmd.SetId( ID_ZOOM_REDRAW );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
keyHandled = true;
|
||||
break;
|
||||
|
||||
case WXK_F4:
|
||||
cmd.SetId( ID_POPUP_ZOOM_CENTER );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
keyHandled = true;
|
||||
break;
|
||||
|
||||
case WXK_HOME:
|
||||
cmd.SetId( ID_ZOOM_PAGE );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
keyHandled = true;
|
||||
break;
|
||||
|
||||
case ' ':
|
||||
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||
keyHandled = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
eventHandled = false;
|
||||
break;
|
||||
}
|
||||
|
||||
SetCrossHairPosition( pos );
|
||||
|
@ -588,7 +593,7 @@ bool FOOTPRINT_WIZARD_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition
|
|||
|
||||
UpdateStatusBar(); // Display new cursor coordinates
|
||||
|
||||
return eventHandled;
|
||||
return keyHandled;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue