Loading common/common.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -73,8 +73,6 @@ const wxString AllFilesWildcard( _( "All files (*)|*" ) ); wxString g_ProductName = wxT( "KiCad E.D.A. " ); wxString g_ProductName = wxT( "KiCad E.D.A. " ); bool g_ShowPageLimits = true; bool g_ShowPageLimits = true; wxString g_UserLibDirBuffer; wxString g_UserLibDirBuffer; int g_MouseOldButtons; int g_KeyPressed; wxString g_Prj_Default_Config_FullFilename; wxString g_Prj_Default_Config_FullFilename; wxString g_Prj_Config_LocalFilename; wxString g_Prj_Config_LocalFilename; Loading common/drawpanel.cpp +7 −13 Original line number Original line Diff line number Diff line Loading @@ -814,7 +814,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) static bool ignoreNextLeftButtonRelease = false; static bool ignoreNextLeftButtonRelease = false; static EDA_DRAW_PANEL* LastPanel = NULL; static EDA_DRAW_PANEL* LastPanel = NULL; int localrealbutt = 0, localbutt = 0, localkey = 0; int localrealbutt = 0, localbutt = 0; BASE_SCREEN* screen = GetScreen(); BASE_SCREEN* screen = GetScreen(); if( !screen ) if( !screen ) Loading Loading @@ -846,7 +846,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) else else return; return; if( !event.IsButton() && !event.Moving() && !event.Dragging() && !localkey ) if( !event.IsButton() && !event.Moving() && !event.Dragging() ) { { return; return; } } Loading Loading @@ -888,8 +888,6 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) int kbstat = 0; int kbstat = 0; g_KeyPressed = localkey; if( event.ShiftDown() ) if( event.ShiftDown() ) kbstat |= GR_KB_SHIFT; kbstat |= GR_KB_SHIFT; Loading @@ -899,8 +897,6 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) if( event.AltDown() ) if( event.AltDown() ) kbstat |= GR_KB_ALT; kbstat |= GR_KB_ALT; g_MouseOldButtons = localrealbutt; // Calling Double Click and Click functions : // Calling Double Click and Click functions : if( localbutt == (int) ( GR_M_LEFT_DOWN | GR_M_DCLICK ) ) if( localbutt == (int) ( GR_M_LEFT_DOWN | GR_M_DCLICK ) ) { { Loading Loading @@ -941,7 +937,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) } } /* Calling the general function on mouse changes (and pseudo key commands) */ /* Calling the general function on mouse changes (and pseudo key commands) */ GetParent()->GeneralControle( &DC, event.GetLogicalPosition( DC ) ); GetParent()->GeneralControl( &DC, event.GetLogicalPosition( DC ), 0 ); /*******************************/ /*******************************/ /* Control of block commands : */ /* Control of block commands : */ Loading Loading @@ -1090,10 +1086,10 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) { { long key, localkey; int localkey; wxPoint pos; wxPoint pos; key = localkey = event.GetKeyCode(); localkey = event.GetKeyCode(); switch( localkey ) switch( localkey ) { { Loading Loading @@ -1121,7 +1117,7 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) localkey |= GR_KB_CTRL; localkey |= GR_KB_CTRL; if( event.AltDown() ) if( event.AltDown() ) localkey |= GR_KB_ALT; localkey |= GR_KB_ALT; if( event.ShiftDown() && (key > 256) ) if( event.ShiftDown() && (event.GetKeyCode() > 256) ) localkey |= GR_KB_SHIFT; localkey |= GR_KB_SHIFT; /* Normalize keys code to easily handle keys from Ctrl+A to Ctrl+Z /* Normalize keys code to easily handle keys from Ctrl+A to Ctrl+Z Loading @@ -1135,8 +1131,6 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) BASE_SCREEN* Screen = GetScreen(); BASE_SCREEN* Screen = GetScreen(); g_KeyPressed = localkey; // Some key commands use the current mouse position: refresh it. // Some key commands use the current mouse position: refresh it. pos = wxGetMousePosition() - GetScreenPosition(); pos = wxGetMousePosition() - GetScreenPosition(); Loading @@ -1144,7 +1138,7 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) ); pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) ); Screen->SetMousePosition( pos ); Screen->SetMousePosition( pos ); GetParent()->GeneralControle( &DC, pos ); GetParent()->GeneralControl( &DC, pos, localkey ); #if 0 #if 0 event.Skip(); // Allow menu shortcut processing event.Skip(); // Allow menu shortcut processing Loading cvpcb/class_DisplayFootprintsFrame.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -311,7 +311,7 @@ void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) } } void DISPLAY_FOOTPRINTS_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { { wxRealPoint gridSize; wxRealPoint gridSize; wxPoint oldpos; wxPoint oldpos; Loading @@ -325,7 +325,7 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosit oldpos = screen->GetCrossHairPosition(); oldpos = screen->GetCrossHairPosition(); gridSize = screen->GetGridSize(); gridSize = screen->GetGridSize(); switch( g_KeyPressed ) switch( aHotKey ) { { case WXK_F1: case WXK_F1: cmd.SetId( ID_POPUP_ZOOM_IN ); cmd.SetId( ID_POPUP_ZOOM_IN ); Loading cvpcb/class_DisplayFootprintsFrame.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -48,7 +48,7 @@ public: void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ); bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ); void GeneralControle( wxDC* DC, const wxPoint& aPosition ); void GeneralControl( wxDC* DC, const wxPoint& aPosition, int aHotKey = 0 ); void InstallOptionsDisplay( wxCommandEvent& event ); void InstallOptionsDisplay( wxCommandEvent& event ); MODULE* Get_Module( const wxString& CmpName ); MODULE* Get_Module( const wxString& CmpName ); Loading eeschema/controle.cpp +15 −21 Original line number Original line Diff line number Diff line Loading @@ -232,19 +232,18 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateItem( const wxPoint& aPosition, bool aIncludePin } } void SCH_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { { wxRealPoint gridSize; wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint oldpos; int hotkey = 0; wxPoint pos = aPosition; wxPoint pos = aPosition; pos = screen->GetNearestGridPosition( pos ); pos = screen->GetNearestGridPosition( pos ); oldpos = screen->GetCrossHairPosition(); oldpos = screen->GetCrossHairPosition(); gridSize = screen->GetGridSize(); gridSize = screen->GetGridSize(); switch( g_KeyPressed ) switch( aHotKey ) { { case 0: case 0: break; break; Loading Loading @@ -274,7 +273,6 @@ void SCH_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) break; break; default: default: hotkey = g_KeyPressed; break; break; } } Loading @@ -295,31 +293,30 @@ void SCH_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) } } } } if( hotkey ) if( aHotKey ) { { if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) OnHotKey( aDC, hotkey, aPosition, screen->GetCurItem() ); OnHotKey( aDC, aHotKey, aPosition, screen->GetCurItem() ); else else OnHotKey( aDC, hotkey, aPosition, NULL ); OnHotKey( aDC, aHotKey, aPosition, NULL ); } } UpdateStatusBar(); /* Display cursor coordinates info */ UpdateStatusBar(); /* Display cursor coordinates info */ } } void LIB_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { { wxRealPoint gridSize; wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint oldpos; int hotkey = 0; wxPoint pos = aPosition; wxPoint pos = aPosition; pos = screen->GetNearestGridPosition( pos ); pos = screen->GetNearestGridPosition( pos ); oldpos = screen->GetCrossHairPosition(); oldpos = screen->GetCrossHairPosition(); gridSize = screen->GetGridSize(); gridSize = screen->GetGridSize(); switch( g_KeyPressed ) switch( aHotKey ) { { case 0: case 0: break; break; Loading Loading @@ -349,7 +346,6 @@ void LIB_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) break; break; default: default: hotkey = g_KeyPressed; break; break; } } Loading @@ -370,31 +366,30 @@ void LIB_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) } } } } if( hotkey ) if( aHotKey ) { { if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) OnHotKey( aDC, hotkey, aPosition, screen->GetCurItem() ); OnHotKey( aDC, aHotKey, aPosition, screen->GetCurItem() ); else else OnHotKey( aDC, hotkey, aPosition, NULL ); OnHotKey( aDC, aHotKey, aPosition, NULL ); } } UpdateStatusBar(); UpdateStatusBar(); } } void LIB_VIEW_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { { wxRealPoint gridSize; wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint oldpos; int hotkey = 0; wxPoint pos = aPosition; wxPoint pos = aPosition; pos = screen->GetNearestGridPosition( pos ); pos = screen->GetNearestGridPosition( pos ); oldpos = screen->GetCrossHairPosition(); oldpos = screen->GetCrossHairPosition(); gridSize = screen->GetGridSize(); gridSize = screen->GetGridSize(); switch( g_KeyPressed ) switch( aHotKey ) { { case 0: case 0: break; break; Loading Loading @@ -424,7 +419,6 @@ void LIB_VIEW_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) break; break; default: default: hotkey = g_KeyPressed; break; break; } } Loading @@ -445,12 +439,12 @@ void LIB_VIEW_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) } } } } if( hotkey ) if( aHotKey ) { { if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) OnHotKey( aDC, hotkey, aPosition, screen->GetCurItem() ); OnHotKey( aDC, aHotKey, aPosition, screen->GetCurItem() ); else else OnHotKey( aDC, hotkey, aPosition, NULL ); OnHotKey( aDC, aHotKey, aPosition, NULL ); } } UpdateStatusBar(); UpdateStatusBar(); Loading Loading
common/common.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -73,8 +73,6 @@ const wxString AllFilesWildcard( _( "All files (*)|*" ) ); wxString g_ProductName = wxT( "KiCad E.D.A. " ); wxString g_ProductName = wxT( "KiCad E.D.A. " ); bool g_ShowPageLimits = true; bool g_ShowPageLimits = true; wxString g_UserLibDirBuffer; wxString g_UserLibDirBuffer; int g_MouseOldButtons; int g_KeyPressed; wxString g_Prj_Default_Config_FullFilename; wxString g_Prj_Default_Config_FullFilename; wxString g_Prj_Config_LocalFilename; wxString g_Prj_Config_LocalFilename; Loading
common/drawpanel.cpp +7 −13 Original line number Original line Diff line number Diff line Loading @@ -814,7 +814,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) static bool ignoreNextLeftButtonRelease = false; static bool ignoreNextLeftButtonRelease = false; static EDA_DRAW_PANEL* LastPanel = NULL; static EDA_DRAW_PANEL* LastPanel = NULL; int localrealbutt = 0, localbutt = 0, localkey = 0; int localrealbutt = 0, localbutt = 0; BASE_SCREEN* screen = GetScreen(); BASE_SCREEN* screen = GetScreen(); if( !screen ) if( !screen ) Loading Loading @@ -846,7 +846,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) else else return; return; if( !event.IsButton() && !event.Moving() && !event.Dragging() && !localkey ) if( !event.IsButton() && !event.Moving() && !event.Dragging() ) { { return; return; } } Loading Loading @@ -888,8 +888,6 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) int kbstat = 0; int kbstat = 0; g_KeyPressed = localkey; if( event.ShiftDown() ) if( event.ShiftDown() ) kbstat |= GR_KB_SHIFT; kbstat |= GR_KB_SHIFT; Loading @@ -899,8 +897,6 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) if( event.AltDown() ) if( event.AltDown() ) kbstat |= GR_KB_ALT; kbstat |= GR_KB_ALT; g_MouseOldButtons = localrealbutt; // Calling Double Click and Click functions : // Calling Double Click and Click functions : if( localbutt == (int) ( GR_M_LEFT_DOWN | GR_M_DCLICK ) ) if( localbutt == (int) ( GR_M_LEFT_DOWN | GR_M_DCLICK ) ) { { Loading Loading @@ -941,7 +937,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) } } /* Calling the general function on mouse changes (and pseudo key commands) */ /* Calling the general function on mouse changes (and pseudo key commands) */ GetParent()->GeneralControle( &DC, event.GetLogicalPosition( DC ) ); GetParent()->GeneralControl( &DC, event.GetLogicalPosition( DC ), 0 ); /*******************************/ /*******************************/ /* Control of block commands : */ /* Control of block commands : */ Loading Loading @@ -1090,10 +1086,10 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) { { long key, localkey; int localkey; wxPoint pos; wxPoint pos; key = localkey = event.GetKeyCode(); localkey = event.GetKeyCode(); switch( localkey ) switch( localkey ) { { Loading Loading @@ -1121,7 +1117,7 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) localkey |= GR_KB_CTRL; localkey |= GR_KB_CTRL; if( event.AltDown() ) if( event.AltDown() ) localkey |= GR_KB_ALT; localkey |= GR_KB_ALT; if( event.ShiftDown() && (key > 256) ) if( event.ShiftDown() && (event.GetKeyCode() > 256) ) localkey |= GR_KB_SHIFT; localkey |= GR_KB_SHIFT; /* Normalize keys code to easily handle keys from Ctrl+A to Ctrl+Z /* Normalize keys code to easily handle keys from Ctrl+A to Ctrl+Z Loading @@ -1135,8 +1131,6 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) BASE_SCREEN* Screen = GetScreen(); BASE_SCREEN* Screen = GetScreen(); g_KeyPressed = localkey; // Some key commands use the current mouse position: refresh it. // Some key commands use the current mouse position: refresh it. pos = wxGetMousePosition() - GetScreenPosition(); pos = wxGetMousePosition() - GetScreenPosition(); Loading @@ -1144,7 +1138,7 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) ); pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) ); Screen->SetMousePosition( pos ); Screen->SetMousePosition( pos ); GetParent()->GeneralControle( &DC, pos ); GetParent()->GeneralControl( &DC, pos, localkey ); #if 0 #if 0 event.Skip(); // Allow menu shortcut processing event.Skip(); // Allow menu shortcut processing Loading
cvpcb/class_DisplayFootprintsFrame.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -311,7 +311,7 @@ void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) } } void DISPLAY_FOOTPRINTS_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { { wxRealPoint gridSize; wxRealPoint gridSize; wxPoint oldpos; wxPoint oldpos; Loading @@ -325,7 +325,7 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosit oldpos = screen->GetCrossHairPosition(); oldpos = screen->GetCrossHairPosition(); gridSize = screen->GetGridSize(); gridSize = screen->GetGridSize(); switch( g_KeyPressed ) switch( aHotKey ) { { case WXK_F1: case WXK_F1: cmd.SetId( ID_POPUP_ZOOM_IN ); cmd.SetId( ID_POPUP_ZOOM_IN ); Loading
cvpcb/class_DisplayFootprintsFrame.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -48,7 +48,7 @@ public: void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ); bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ); void GeneralControle( wxDC* DC, const wxPoint& aPosition ); void GeneralControl( wxDC* DC, const wxPoint& aPosition, int aHotKey = 0 ); void InstallOptionsDisplay( wxCommandEvent& event ); void InstallOptionsDisplay( wxCommandEvent& event ); MODULE* Get_Module( const wxString& CmpName ); MODULE* Get_Module( const wxString& CmpName ); Loading
eeschema/controle.cpp +15 −21 Original line number Original line Diff line number Diff line Loading @@ -232,19 +232,18 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateItem( const wxPoint& aPosition, bool aIncludePin } } void SCH_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { { wxRealPoint gridSize; wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint oldpos; int hotkey = 0; wxPoint pos = aPosition; wxPoint pos = aPosition; pos = screen->GetNearestGridPosition( pos ); pos = screen->GetNearestGridPosition( pos ); oldpos = screen->GetCrossHairPosition(); oldpos = screen->GetCrossHairPosition(); gridSize = screen->GetGridSize(); gridSize = screen->GetGridSize(); switch( g_KeyPressed ) switch( aHotKey ) { { case 0: case 0: break; break; Loading Loading @@ -274,7 +273,6 @@ void SCH_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) break; break; default: default: hotkey = g_KeyPressed; break; break; } } Loading @@ -295,31 +293,30 @@ void SCH_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) } } } } if( hotkey ) if( aHotKey ) { { if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) OnHotKey( aDC, hotkey, aPosition, screen->GetCurItem() ); OnHotKey( aDC, aHotKey, aPosition, screen->GetCurItem() ); else else OnHotKey( aDC, hotkey, aPosition, NULL ); OnHotKey( aDC, aHotKey, aPosition, NULL ); } } UpdateStatusBar(); /* Display cursor coordinates info */ UpdateStatusBar(); /* Display cursor coordinates info */ } } void LIB_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { { wxRealPoint gridSize; wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint oldpos; int hotkey = 0; wxPoint pos = aPosition; wxPoint pos = aPosition; pos = screen->GetNearestGridPosition( pos ); pos = screen->GetNearestGridPosition( pos ); oldpos = screen->GetCrossHairPosition(); oldpos = screen->GetCrossHairPosition(); gridSize = screen->GetGridSize(); gridSize = screen->GetGridSize(); switch( g_KeyPressed ) switch( aHotKey ) { { case 0: case 0: break; break; Loading Loading @@ -349,7 +346,6 @@ void LIB_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) break; break; default: default: hotkey = g_KeyPressed; break; break; } } Loading @@ -370,31 +366,30 @@ void LIB_EDIT_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) } } } } if( hotkey ) if( aHotKey ) { { if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) OnHotKey( aDC, hotkey, aPosition, screen->GetCurItem() ); OnHotKey( aDC, aHotKey, aPosition, screen->GetCurItem() ); else else OnHotKey( aDC, hotkey, aPosition, NULL ); OnHotKey( aDC, aHotKey, aPosition, NULL ); } } UpdateStatusBar(); UpdateStatusBar(); } } void LIB_VIEW_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { { wxRealPoint gridSize; wxRealPoint gridSize; SCH_SCREEN* screen = GetScreen(); SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint oldpos; int hotkey = 0; wxPoint pos = aPosition; wxPoint pos = aPosition; pos = screen->GetNearestGridPosition( pos ); pos = screen->GetNearestGridPosition( pos ); oldpos = screen->GetCrossHairPosition(); oldpos = screen->GetCrossHairPosition(); gridSize = screen->GetGridSize(); gridSize = screen->GetGridSize(); switch( g_KeyPressed ) switch( aHotKey ) { { case 0: case 0: break; break; Loading Loading @@ -424,7 +419,6 @@ void LIB_VIEW_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) break; break; default: default: hotkey = g_KeyPressed; break; break; } } Loading @@ -445,12 +439,12 @@ void LIB_VIEW_FRAME::GeneralControle( wxDC* aDC, const wxPoint& aPosition ) } } } } if( hotkey ) if( aHotKey ) { { if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) if( screen->GetCurItem() && screen->GetCurItem()->m_Flags ) OnHotKey( aDC, hotkey, aPosition, screen->GetCurItem() ); OnHotKey( aDC, aHotKey, aPosition, screen->GetCurItem() ); else else OnHotKey( aDC, hotkey, aPosition, NULL ); OnHotKey( aDC, aHotKey, aPosition, NULL ); } } UpdateStatusBar(); UpdateStatusBar(); Loading