Commit 7c74fadb96bbec85c09be526849ed6e918ac4d6a

Authored by Benjamin Renard
1 parent adee16e1

Fix bug with superpose mode when TT is not sorted

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

108 KB | W: | H:

108 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin