From b129b80448b72b39f40037fe206ae330caf308e6 Mon Sep 17 00:00:00 2001 From: Manindra Moharana Date: Thu, 31 Jul 2014 20:44:44 +0530 Subject: [PATCH] error bar, old offset removed --- pdex/src/processing/mode/experimental/ErrorBar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pdex/src/processing/mode/experimental/ErrorBar.java b/pdex/src/processing/mode/experimental/ErrorBar.java index b858dcdbb..037f98d83 100755 --- a/pdex/src/processing/mode/experimental/ErrorBar.java +++ b/pdex/src/processing/mode/experimental/ErrorBar.java @@ -149,7 +149,8 @@ public class ErrorBar extends JPanel { // NOTE TO SELF: ErrorMarkers are calculated for the present tab only // Error Marker index in the arraylist is LOCALIZED for current tab. - // Also, need to do the update in the UI thread to prevent concurrency issues. + // Also, need to do the update in the UI thread via SwingWorker to prevent + // concurrency issues. final int fheight = this.getHeight(); SwingWorker worker = new SwingWorker() { @@ -178,7 +179,7 @@ public class ErrorBar extends JPanel { for (Problem problem : problems) { if (problem.getTabIndex() == currentTab) { // Ratio of error line to total lines - float y = (problem.getLineNumber() - errorCheckerService.defaultImportsOffset) + float y = (problem.getLineNumber() + 1) / ((float) totalLines); // Ratio multiplied by height of the error bar y *= fheight - 15; // -15 is just a vertical offset