Reset scales when a plot is removed

This commit is contained in:
Maciej Suminski
2016-08-11 14:42:03 +02:00
parent ba3ce9b566
commit 9d8b40b93d
3 changed files with 25 additions and 4 deletions
+6 -4
View File
@@ -3600,15 +3600,17 @@ void mpFXY::SetScale ( mpScaleBase *scaleX, mpScaleBase *scaleY )
m_scaleY = scaleY;
//printf("SetScales : %p %p\n", scaleX, scaleY);
UpdateScales();
}
void mpFXY::UpdateScales()
{
if(m_scaleX)
{
m_scaleX->ExtendDataRange(GetMinX(), GetMaxX());
}
if(m_scaleY)
{
m_scaleY->ExtendDataRange(GetMinY(), GetMaxY());
}
}