From 2d40f7de324390b5431c287633315e25b15bd2fe Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 17 Aug 2015 11:12:12 +0200 Subject: [PATCH] Fix bug with panel title color --- config/DataBaseParameters/xsd/request/plot.xsd | 2 +- config/DataBaseParameters/xsd/request/xyPlot.xsd | 2 +- src/ParamOutputImpl/Plot/Panel.cc | 15 +++++++++++++-- src/ParamOutputImpl/Plot/Time/TimePlot.cc | 3 +-- src/ParamOutputImpl/Plot/TimeAxis.hh | 2 ++ 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/config/DataBaseParameters/xsd/request/plot.xsd b/config/DataBaseParameters/xsd/request/plot.xsd index 4959633..bebfeda 100644 --- a/config/DataBaseParameters/xsd/request/plot.xsd +++ b/config/DataBaseParameters/xsd/request/plot.xsd @@ -100,7 +100,7 @@ Parameter identifier - + Parameter serie definition - + & pls) { // write title with dedicated position and align pls->col0(0); - pls->sfont(getPlFontFamily(_title._font), getPlFontStyle(_title._style), getPlFontWeight(_title._style)); - pls->schr(getPlFontDef(_title._font), getPlFontScaleFactor(_title._font)); + + Color lInitialColor = changeColor(pls, _title._color, _page->_mode); + + pls->sfont(getPlFontFamily(_title._font.isSet() ? _title._font : _font), + (_title._font.isSet() ? getPlFontStyle(_title._style) : _font._style), + (_title._font.isSet() ? getPlFontWeight(_title._style) : _font._weight)); + if (_title._font.isSet()) + pls->schr(getPlFontDef(_title._font), getPlFontScaleFactor(_title._font)); + else + pls->schr(getPlFontDef(_font), getPlFontScaleFactor(_font)); // Draw panel title depending on page title existence @@ -141,6 +149,9 @@ void Panel::draw(std::shared_ptr& pls) { lRowDisp -= (1 + LINE_SPACE_TITLE); } + // Restore initial color. + restoreColor(pls, lInitialColor, _page->_mode); + _drawn = true; } diff --git a/src/ParamOutputImpl/Plot/Time/TimePlot.cc b/src/ParamOutputImpl/Plot/Time/TimePlot.cc index 4fd5dc7..b26916f 100644 --- a/src/ParamOutputImpl/Plot/Time/TimePlot.cc +++ b/src/ParamOutputImpl/Plot/Time/TimePlot.cc @@ -1102,8 +1102,7 @@ const std::string TimePlot::getXAxisId() const { return param.getSpectroProperties()->getXAxisId(); } - //not found, TODO see if we should raise an exception... - return ""; + return DefaultPlotConfiguration::TIME_DEFAULT_ID; } diff --git a/src/ParamOutputImpl/Plot/TimeAxis.hh b/src/ParamOutputImpl/Plot/TimeAxis.hh index f99667d..bfee2d6 100644 --- a/src/ParamOutputImpl/Plot/TimeAxis.hh +++ b/src/ParamOutputImpl/Plot/TimeAxis.hh @@ -117,6 +117,8 @@ inline std::ostream& operator <<(std::ostream& out, const TimeAxis& axis) { out << axis._id << ".axis.timeFormat=" << axis._timeFormat << std::endl; out << axis._id << ".axis.showLegend=" << axis._showLegend << std::endl; out << axis._id << ".axis.showTickMark=" << axis._showTickMark << std::endl; + out << axis._id << ".axis.visible=" << std::boolalpha << axis._visible << std::endl; + return out; } -- libgit2 0.21.2