Commit 7c74fadb96bbec85c09be526849ed6e918ac4d6a
1 parent
adee16e1
Exists in
master
and in
7 other branches
Fix bug with superpose mode when TT is not sorted
Showing
3 changed files
with
11 additions
and
3 deletions
Show diff stats
src/ParamOutputImpl/Plot/ParameterData.cc
... | ... | @@ -44,7 +44,7 @@ void ParameterData::preAllocate(int nbData) |
44 | 44 | * @brief Add a new time record to parameter |
45 | 45 | */ |
46 | 46 | void ParameterData::addTime(double time, double sampling, bool &gapDetected) { |
47 | - if (!_dates.empty() && ((time - _dates.back()) > _paramGapSize)) { | |
47 | + if (!_dates.empty() && (abs(time - _dates.back()) > _paramGapSize)) { | |
48 | 48 | //gap detected => push a NaN value in data list |
49 | 49 | if (_dates.back() + sampling > time) |
50 | 50 | _dates.push_back((time - _dates.back()) / 2.); | ... | ... |
src/ParamOutputImpl/Plot/PlotOutput.cc
... | ... | @@ -351,13 +351,21 @@ void PlotOutput::drawAllIntervalsInOnePage() |
351 | 351 | * First step : init page, panel and plot area |
352 | 352 | */ |
353 | 353 | |
354 | - double globalStartTime = _timeIntervalList->front()._startTime; | |
355 | - double globalStopTime = _timeIntervalList->back()._stopTime; | |
354 | + double globalStartTime = NAN; | |
355 | + double globalStopTime = NAN; | |
356 | + | |
357 | + | |
358 | + | |
359 | + _timeIntervalList->front()._startTime; | |
356 | 360 | |
357 | 361 | //get all data for all intervals |
358 | 362 | std::vector<std::string> ttNamesVector; |
359 | 363 | while (_currentTimeInterval != _timeIntervalList->end()) |
360 | 364 | { |
365 | + if (isNAN(globalStartTime) || _currentTimeInterval->_startTime < globalStartTime) | |
366 | + globalStartTime = _currentTimeInterval->_startTime; | |
367 | + if (isNAN(globalStopTime) || _currentTimeInterval->_stopTime > globalStopTime) | |
368 | + globalStopTime = _currentTimeInterval->_stopTime; | |
361 | 369 | //get parameters data |
362 | 370 | getDataFromServer(); |
363 | 371 | bool isAlreadyInVector = false; | ... | ... |
test/plots_ref/centos-7/ThirdPart/ReLease3/SprinT4/UserStory27/plot_27_05_REF.png