mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/shared] CartesianFunction: fix tmin and tmax default values
depending on the plot type
This commit is contained in:
@@ -109,6 +109,10 @@ CartesianFunction::PlotType CartesianFunction::plotType() const {
|
||||
void CartesianFunction::setPlotType(PlotType plotType) {
|
||||
/* Reset memoized layout. */
|
||||
m_model.tidy();
|
||||
double tMin = plotType == PlotType::Cartesian ? -INFINITY : 0.0;
|
||||
double tMax = plotType == PlotType::Cartesian ? INFINITY : 360.0;
|
||||
setTMin(tMin);
|
||||
setTMax(tMax);
|
||||
return recordData()->setPlotType(plotType);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ private:
|
||||
FunctionRecordDataBuffer(color),
|
||||
m_plotType(PlotType::Cartesian),
|
||||
m_displayDerivative(false),
|
||||
m_tMin(0.0),
|
||||
m_tMax(396.0) // TODO LEA RUBEN
|
||||
m_tMin(-INFINITY),
|
||||
m_tMax(INFINITY)
|
||||
{}
|
||||
PlotType plotType() const { return m_plotType; }
|
||||
void setPlotType(PlotType plotType) { m_plotType = plotType; }
|
||||
|
||||
Reference in New Issue
Block a user