Commit 2d40f7de324390b5431c287633315e25b15bd2fe

Authored by Benjamin Renard
1 parent 8499fbdd

Fix bug with panel title color

config/DataBaseParameters/xsd/request/plot.xsd
@@ -100,7 +100,7 @@ @@ -100,7 +100,7 @@
100 <xs:documentation>Parameter identifier</xs:documentation> 100 <xs:documentation>Parameter identifier</xs:documentation>
101 </xs:annotation> 101 </xs:annotation>
102 <xs:sequence> 102 <xs:sequence>
103 - <xs:element name="param" minOccurs="1" maxOccurs="unbounded"> 103 + <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
104 <xs:complexType> 104 <xs:complexType>
105 <xs:sequence> 105 <xs:sequence>
106 <xs:element name="default" 106 <xs:element name="default"
config/DataBaseParameters/xsd/request/xyPlot.xsd
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <xs:documentation>Parameter serie definition</xs:documentation> 14 <xs:documentation>Parameter serie definition</xs:documentation>
15 </xs:annotation> 15 </xs:annotation>
16 <xs:sequence> 16 <xs:sequence>
17 - <xs:element name="param" minOccurs="1" maxOccurs="unbounded"> 17 + <xs:element name="param" minOccurs="0" maxOccurs="unbounded">
18 <xs:complexType> 18 <xs:complexType>
19 <xs:sequence> 19 <xs:sequence>
20 <xs:element name="default" 20 <xs:element name="default"
src/ParamOutputImpl/Plot/Panel.cc
@@ -121,8 +121,16 @@ void Panel::draw(std::shared_ptr&lt;plstream&gt;&amp; pls) { @@ -121,8 +121,16 @@ void Panel::draw(std::shared_ptr&lt;plstream&gt;&amp; pls) {
121 121
122 // write title with dedicated position and align 122 // write title with dedicated position and align
123 pls->col0(0); 123 pls->col0(0);
124 - pls->sfont(getPlFontFamily(_title._font), getPlFontStyle(_title._style), getPlFontWeight(_title._style));  
125 - pls->schr(getPlFontDef(_title._font), getPlFontScaleFactor(_title._font)); 124 +
  125 + Color lInitialColor = changeColor(pls, _title._color, _page->_mode);
  126 +
  127 + pls->sfont(getPlFontFamily(_title._font.isSet() ? _title._font : _font),
  128 + (_title._font.isSet() ? getPlFontStyle(_title._style) : _font._style),
  129 + (_title._font.isSet() ? getPlFontWeight(_title._style) : _font._weight));
  130 + if (_title._font.isSet())
  131 + pls->schr(getPlFontDef(_title._font), getPlFontScaleFactor(_title._font));
  132 + else
  133 + pls->schr(getPlFontDef(_font), getPlFontScaleFactor(_font));
126 134
127 // Draw panel title depending on page title existence 135 // Draw panel title depending on page title existence
128 136
@@ -141,6 +149,9 @@ void Panel::draw(std::shared_ptr&lt;plstream&gt;&amp; pls) { @@ -141,6 +149,9 @@ void Panel::draw(std::shared_ptr&lt;plstream&gt;&amp; pls) {
141 lRowDisp -= (1 + LINE_SPACE_TITLE); 149 lRowDisp -= (1 + LINE_SPACE_TITLE);
142 } 150 }
143 151
  152 + // Restore initial color.
  153 + restoreColor(pls, lInitialColor, _page->_mode);
  154 +
144 _drawn = true; 155 _drawn = true;
145 } 156 }
146 157
src/ParamOutputImpl/Plot/Time/TimePlot.cc
@@ -1102,8 +1102,7 @@ const std::string TimePlot::getXAxisId() const { @@ -1102,8 +1102,7 @@ const std::string TimePlot::getXAxisId() const {
1102 return param.getSpectroProperties()->getXAxisId(); 1102 return param.getSpectroProperties()->getXAxisId();
1103 } 1103 }
1104 1104
1105 - //not found, TODO see if we should raise an exception...  
1106 - return ""; 1105 + return DefaultPlotConfiguration::TIME_DEFAULT_ID;
1107 } 1106 }
1108 1107
1109 1108
src/ParamOutputImpl/Plot/TimeAxis.hh
@@ -117,6 +117,8 @@ inline std::ostream&amp; operator &lt;&lt;(std::ostream&amp; out, const TimeAxis&amp; axis) { @@ -117,6 +117,8 @@ inline std::ostream&amp; operator &lt;&lt;(std::ostream&amp; out, const TimeAxis&amp; axis) {
117 out << axis._id << ".axis.timeFormat=" << axis._timeFormat << std::endl; 117 out << axis._id << ".axis.timeFormat=" << axis._timeFormat << std::endl;
118 out << axis._id << ".axis.showLegend=" << axis._showLegend << std::endl; 118 out << axis._id << ".axis.showLegend=" << axis._showLegend << std::endl;
119 out << axis._id << ".axis.showTickMark=" << axis._showTickMark << std::endl; 119 out << axis._id << ".axis.showTickMark=" << axis._showTickMark << std::endl;
  120 + out << axis._id << ".axis.visible=" << std::boolalpha << axis._visible << std::endl;
  121 +
120 return out; 122 return out;
121 } 123 }
122 124