Commit bf418eb1 authored by Maciej Suminski's avatar Maciej Suminski

Cursor coordinates are updated in GAL canvases.

parent 2d8dc046
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <wx/fontdlg.h> #include <wx/fontdlg.h>
#include <view/view.h> #include <view/view.h>
#include <view/view_controls.h>
#include <gal/graphics_abstraction_layer.h> #include <gal/graphics_abstraction_layer.h>
/** /**
...@@ -1019,9 +1020,18 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) ...@@ -1019,9 +1020,18 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const
{ {
// subject to change, borrow from old BASE_SCREEN for now. // 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 wxPoint( cursor.x, cursor.y );
return screen->getCrossHairPosition( aInvertY ); }
else
{
BASE_SCREEN* screen = GetScreen(); // virtual call
return screen->getCrossHairPosition( aInvertY );
}
} }
......
...@@ -229,6 +229,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) ...@@ -229,6 +229,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
{ {
motion = true; motion = true;
m_lastMousePos = pos; m_lastMousePos = pos;
m_editFrame->UpdateStatusBar();
} }
for( unsigned int i = 0; i < m_buttons.size(); i++ ) for( unsigned int i = 0; i < m_buttons.size(); i++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment