mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
error bar, old offset removed
This commit is contained in:
@@ -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<Object, Object> worker = new SwingWorker<Object, Object>() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user