[rkward-cvs] SF.net SVN: rkward:[4020] trunk/rkward/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Mon Nov 7 19:00:23 UTC 2011
Revision: 4020
http://rkward.svn.sourceforge.net/rkward/?rev=4020&view=rev
Author: tfry
Date: 2011-11-07 19:00:23 +0000 (Mon, 07 Nov 2011)
Log Message:
-----------
Do not show headers for empty code sections (Note: this breaks most tests)
Modified Paths:
--------------
trunk/rkward/rkward/plugins/testing/scatterplot2.xml
trunk/rkward/rkward/scriptbackends/scriptbackend.cpp
Modified: trunk/rkward/rkward/plugins/testing/scatterplot2.xml
===================================================================
--- trunk/rkward/rkward/plugins/testing/scatterplot2.xml 2011-11-06 19:08:30 UTC (rev 4019)
+++ trunk/rkward/rkward/plugins/testing/scatterplot2.xml 2011-11-07 19:00:23 UTC (rev 4020)
@@ -12,7 +12,7 @@
<option id="xvar" label="X" governor="xsel.available"/>
<option id="yvar" label="Y" governor="ysel.available"/>
<option id="custom_color" governor="colorframe.checked"/> <!-- unlabeled columns will not be shown in the optiondisplay -->
- <option id="color.color" governor="color.string"/>
+ <option id="color" governor="color.color.string"/>
<content>
<optiondisplay show_index="true"/>
<varslot source="selector" id="xsel" label="X Variable" required="true"/>
Modified: trunk/rkward/rkward/scriptbackends/scriptbackend.cpp
===================================================================
--- trunk/rkward/rkward/scriptbackends/scriptbackend.cpp 2011-11-06 19:08:30 UTC (rev 4019)
+++ trunk/rkward/rkward/scriptbackends/scriptbackend.cpp 2011-11-07 19:00:23 UTC (rev 4020)
@@ -2,7 +2,7 @@
scriptbackend - description
-------------------
begin : Sun Aug 15 2004
- copyright : (C) 2004, 2006, 2009 by Thomas Friedrichsmeier
+ copyright : (C) 2004, 2006, 2009, 2011 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -87,14 +87,15 @@
if (current_type != Ignore) {
if (code_property) {
if (_output.isNull ()) _output = ""; // must not be null for the code property!
+ bool add_header = add_headings && (!_output.isEmpty ());
if (current_type == Preprocess) {
- if (add_headings) code_property->setPreprocess (i18n ("## Prepare\n") + _output);
+ if (add_header) code_property->setPreprocess (i18n ("## Prepare\n") + _output);
else code_property->setPreprocess (_output);
} else if (current_type == Calculate) {
- if (add_headings) code_property->setCalculate (i18n ("## Compute\n") + _output);
+ if (add_header) code_property->setCalculate (i18n ("## Compute\n") + _output);
else code_property->setCalculate (_output);
} else if (current_type == Printout) {
- if (add_headings) code_property->setPrintout (i18n ("## Print result\n") + _output);
+ if (add_header) code_property->setPrintout (i18n ("## Print result\n") + _output);
else code_property->setPrintout (_output);
} else if (current_type == Preview) {
// no heading for the preview code (not shown in the code box)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list