Skip to content
Permalink
Browse files

fix duplicated results writing in to IJ/log

makeHtmlText was run twice, and that method contains the IJ.lf value
results writing
  • Loading branch information...
chalkie666 authored and tomka committed Jul 28, 2015
1 parent 2de1305 commit a493b2c88a14f4f6403451aeee6989bf7a2becfb
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/main/java/results/SingleWindowDisplay.java
@@ -202,9 +202,9 @@ public void process() {
dataContainer.getSourceImage2(),
dataContainer.getSourceImage2Name() ) );
}
// create HTML table
makeHtmlText();
// set up the GUI

// set up the GUI, which runs makeHtmlText() for the value results
// formatting.
setup();
// display the first image available, if any
if (listOfImages.size() > 0) {
@@ -308,13 +308,16 @@ protected String makeHtmlText() {
out.print("<TABLE><TR>");
out.print("<TH>Name</TH><TH>Result</TH></TR>");

for ( ValueResult vr : valueResults) {
// Print table rows and spit results to the IJ log.
for ( ValueResult vr : valueResults) {
if (vr.isNumber) {
printTableRow(out, vr.name, vr.number, vr.decimals);
IJ.log(vr.name + ", " + IJ.d2s(vr.number, vr.decimals));
} else {
printTableRow(out, vr.name, vr.value);
IJ.log(vr.name + ", " + vr.value);
}
}
}

out.println("</TABLE>");

0 comments on commit a493b2c

Please sign in to comment.
You can’t perform that action at this time.