@@ -337,6 +337,11 @@ void MatrixWorkspace::setPlotType(const std::string &t) {
337
337
run.addProperty (" plot_type" , t, true );
338
338
else
339
339
run.addProperty (" plot_type" , t, false );
340
+ } else {
341
+ std::string validValues = std::accumulate (
342
+ validPlotTypes.begin () + 1 , validPlotTypes.end (), validPlotTypes.front (),
343
+ [](const std::string &valuesString, const std::string &plotType) { return valuesString + " , " + plotType; });
344
+ g_log.warning (" Invalid plot type '" + t + " '. Must be one of: " + validValues);
340
345
}
341
346
}
342
347
@@ -359,7 +364,20 @@ std::string MatrixWorkspace::getPlotType() const {
359
364
*
360
365
* @param markerType :: The Marker Type
361
366
*/
362
- void MatrixWorkspace::setMarkerStyle (const std::string &markerType) { m_marker = markerType; }
367
+ void MatrixWorkspace::setMarkerStyle (const std::string &markerType) {
368
+ StringListValidator v (validMarkerStyles);
369
+
370
+ if (v.isValid (markerType) == " " ) {
371
+ m_marker = markerType;
372
+ } else {
373
+ std::string validValues =
374
+ std::accumulate (validMarkerStyles.begin () + 1 , validMarkerStyles.end (), validMarkerStyles.front (),
375
+ [](const std::string &valuesString, const std::string &markerStyle) {
376
+ return valuesString + " , " + markerStyle;
377
+ });
378
+ g_log.warning (" Invalid marker type '" + markerType + " '. Must be one of: " + validValues);
379
+ }
380
+ }
363
381
364
382
/* *
365
383
* get the marker type
@@ -368,7 +386,7 @@ void MatrixWorkspace::setMarkerStyle(const std::string &markerType) { m_marker =
368
386
*/
369
387
std::string MatrixWorkspace::getMarkerStyle () const {
370
388
if (m_marker.empty ())
371
- return Kernel::ConfigService::Instance ().getString (" markerworkspace.marker.Style " );
389
+ return Kernel::ConfigService::Instance ().getString (" plots. markerworkspace.MarkerStyle " );
372
390
else
373
391
return m_marker;
374
392
}
0 commit comments