Cursor centering fix
This commit is contained in:
@@ -298,8 +298,14 @@ void CURSOR::Plot( wxDC& aDC, mpWindow& aWindow )
|
||||
wxQueueEvent( aWindow.GetParent(), new wxCommandEvent( EVT_SIM_CURSOR_UPDATE ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_updateRef = true;
|
||||
}
|
||||
|
||||
if( m_updateRef )
|
||||
{
|
||||
UpdateReference();
|
||||
m_updateRef = false;
|
||||
}
|
||||
|
||||
// Line length in horizontal and vertical dimensions
|
||||
@@ -548,8 +554,8 @@ void SIM_PLOT_PANEL::EnableCursor( const wxString& aName, bool aEnable )
|
||||
if( aEnable )
|
||||
{
|
||||
CURSOR* c = new CURSOR( t );
|
||||
//int plotCenter = GetMarginLeft() + ( GetXScreen() - GetMarginLeft() - GetMarginRight() ) / 2;
|
||||
//c->Move( wxPoint( plotCenter, 0 ) );
|
||||
int plotCenter = GetMarginLeft() + ( GetXScreen() - GetMarginLeft() - GetMarginRight() ) / 2;
|
||||
c->SetX( plotCenter );
|
||||
t->SetCursor( c );
|
||||
AddLayer( c );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user