Cursor coordinates are updated in GAL canvases.
This commit is contained in:
parent
2d8dc04693
commit
bf418eb1ee
|
@ -47,6 +47,7 @@
|
|||
|
||||
#include <wx/fontdlg.h>
|
||||
#include <view/view.h>
|
||||
#include <view/view_controls.h>
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
|
||||
/**
|
||||
|
@ -1019,9 +1020,18 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
|
|||
wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const
|
||||
{
|
||||
// subject to change, borrow from old BASE_SCREEN for now.
|
||||
if( IsGalCanvasActive() )
|
||||
{
|
||||
VECTOR2I cursor = GetGalCanvas()->GetViewControls()->GetCursorPosition();
|
||||
cursor = GetGalCanvas()->GetGAL()->GetGridPoint( cursor );
|
||||
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
return screen->getCrossHairPosition( aInvertY );
|
||||
return wxPoint( cursor.x, cursor.y );
|
||||
}
|
||||
else
|
||||
{
|
||||
BASE_SCREEN* screen = GetScreen(); // virtual call
|
||||
return screen->getCrossHairPosition( aInvertY );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -229,6 +229,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
{
|
||||
motion = true;
|
||||
m_lastMousePos = pos;
|
||||
m_editFrame->UpdateStatusBar();
|
||||
}
|
||||
|
||||
for( unsigned int i = 0; i < m_buttons.size(); i++ )
|
||||
|
|
Loading…
Reference in New Issue