Automatically update cursor coordinates

This commit is contained in:
Maciej Suminski 2016-08-11 14:41:55 +02:00
parent b25781814d
commit cdf758b173
1 changed files with 9 additions and 0 deletions

View File

@ -39,6 +39,7 @@ public:
: mpInfoLayer( wxRect( 0, 0, DRAG_MARGIN, DRAG_MARGIN ), wxTRANSPARENT_BRUSH ),
m_trace( aTrace ), m_updateRequired( true ), m_coords( 0.0, 0.0 ), m_window( nullptr )
{
SetDrawOutsideMargins( false );
}
void Plot( wxDC& aDC, mpWindow& aWindow ) override;
@ -85,6 +86,14 @@ public:
}
void SetData( const std::vector<double>& aX, const std::vector<double>& aY ) override
{
if( m_cursor )
m_cursor->Update();
mpFXYVector::SetData( aX, aY );
}
const std::vector<double>& GetDataX() const
{
return m_xs;