Commit adee16e1f3b71b59c233342ec79480668dc8211c
1 parent
46c24e72
Exists in
master
and in
7 other branches
Fix bug with multi Histo1D in a panel + superpose mode
Showing
3 changed files
with
22 additions
and
11 deletions
Show diff stats
src/ParamOutputImpl/Plot/HistoPlot/HistoPlot.cc
... | ... | @@ -28,7 +28,6 @@ namespace plot { |
28 | 28 | HistoPlot::HistoPlot(AMDA::Parameters::ParameterManager& manager, |
29 | 29 | boost::shared_ptr<Panel> panel) : |
30 | 30 | PanelPlotOutput(manager, panel){ |
31 | - _plotted=false; | |
32 | 31 | |
33 | 32 | } |
34 | 33 | |
... | ... | @@ -337,7 +336,7 @@ void HistoPlot::drawHistogram(double startDate, double stopDate, std::string pPa |
337 | 336 | HistogramSeriesProperties &pHistogramProperties){ |
338 | 337 | |
339 | 338 | if(pHistogramProperties.getHistogramType() == "histogram1d"){ |
340 | - if(_panel->_page->_superposeMode && _plotted) | |
339 | + if(_panel->_page->_superposeMode && pHistogramProperties.isPlotted()) | |
341 | 340 | return; |
342 | 341 | |
343 | 342 | std::vector<std::pair<double,double>> grid; |
... | ... | @@ -350,11 +349,11 @@ void HistoPlot::drawHistogram(double startDate, double stopDate, std::string pPa |
350 | 349 | |
351 | 350 | PanelPlotOutput::drawHistogram(startDate,stopDate,pParamId, pHistogramProperties); |
352 | 351 | PanelPlotOutput::drawHistogramBoxes(grid,color,xBinSize, lYRange.getMin(), pHistogramProperties.getManualProperties().hasStairs()); |
353 | - _plotted = true; | |
352 | + pHistogramProperties.setPlotted(true); | |
354 | 353 | |
355 | 354 | } |
356 | 355 | else { |
357 | - if(_panel->_page->_superposeMode && _plotted) | |
356 | + if(_panel->_page->_superposeMode && pHistogramProperties.isPlotted()) | |
358 | 357 | return; |
359 | 358 | |
360 | 359 | if(_panel->_page->_superposeMode){ |
... | ... | @@ -456,7 +455,7 @@ void HistoPlot::drawHistogram(double startDate, double stopDate, std::string pPa |
456 | 455 | |
457 | 456 | PanelPlotOutput::drawHistogram(startDate,stopDate,pParamId, pHistogramProperties); |
458 | 457 | PanelPlotOutput::drawMatrix(matrixGrid, zMin, zMax, minValColor,maxValColor, lZAxis->_color._colorMapIndex, false); |
459 | - _plotted = true; | |
458 | + pHistogramProperties.setPlotted(true); | |
460 | 459 | } |
461 | 460 | } |
462 | 461 | |
... | ... | @@ -472,7 +471,7 @@ void HistoPlot::resetPlot() |
472 | 471 | |
473 | 472 | pHistogramProperties->getHistotypeProperties().getHisto1DFunction()->resetCache(); |
474 | 473 | } |
475 | - _plotted = false; | |
474 | + pHistogramProperties->setPlotted(false); | |
476 | 475 | } |
477 | 476 | } |
478 | 477 | } | ... | ... |
src/ParamOutputImpl/Plot/HistoPlot/HistoPlot.hh
src/ParamOutputImpl/Plot/HistoPlot/HistogramSeriesProperties.hh
... | ... | @@ -37,7 +37,8 @@ public: |
37 | 37 | _hasYAxis(true), |
38 | 38 | _hasZAxis(false), |
39 | 39 | _xId(-1), |
40 | - _id(-1) | |
40 | + _id(-1), | |
41 | + _plotted(false) | |
41 | 42 | { |
42 | 43 | } |
43 | 44 | |
... | ... | @@ -50,7 +51,8 @@ public: |
50 | 51 | _hasYAxis(true), |
51 | 52 | _hasZAxis(false), |
52 | 53 | _xId(-1), |
53 | - _id(-1) | |
54 | + _id(-1), | |
55 | + _plotted(false) | |
54 | 56 | |
55 | 57 | { |
56 | 58 | } |
... | ... | @@ -64,7 +66,8 @@ public: |
64 | 66 | _hasYAxis(pParamDrawingProperties_._hasYAxis), |
65 | 67 | _hasZAxis(pParamDrawingProperties_._hasZAxis), |
66 | 68 | _xId(pParamDrawingProperties_._xId), |
67 | - _id(pParamDrawingProperties_._id) | |
69 | + _id(pParamDrawingProperties_._id), | |
70 | + _plotted(pParamDrawingProperties_._plotted) | |
68 | 71 | { |
69 | 72 | } |
70 | 73 | |
... | ... | @@ -78,6 +81,7 @@ public: |
78 | 81 | _hasZAxis = ref_._hasZAxis; |
79 | 82 | _xId = ref_._xId; |
80 | 83 | _id = ref_._id; |
84 | + _plotted = ref_._plotted; | |
81 | 85 | return *this; |
82 | 86 | } |
83 | 87 | |
... | ... | @@ -149,6 +153,14 @@ public: |
149 | 153 | void setId(int id) { |
150 | 154 | _id = id; |
151 | 155 | } |
156 | + | |
157 | + void setPlotted(bool plotted) { | |
158 | + _plotted = plotted; | |
159 | + } | |
160 | + | |
161 | + bool isPlotted() { | |
162 | + return _plotted; | |
163 | + } | |
152 | 164 | |
153 | 165 | virtual ~HistogramSeriesProperties() { |
154 | 166 | } |
... | ... | @@ -171,6 +183,8 @@ public: |
171 | 183 | bool _hasZAxis; |
172 | 184 | int _xId; |
173 | 185 | int _id; |
186 | + bool _plotted; | |
187 | + | |
174 | 188 | ManualProperties _manualProperties; |
175 | 189 | HistotypeProperties _histotypeProperties; |
176 | 190 | ... | ... |