Skip to content

Commit

Permalink
sidescan/SidescanPanel: Code cleanup, remove redudantant assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmdacosta committed Jan 17, 2024
1 parent 724d1ec commit 0a7b0fe
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,11 @@ void updateImage(long currentTime, long lastUpdateTime) {
// g2d.drawImage(sidescanLine.image, 0, sidescanLine.ypos, null);
}
synchronized (lineList) {
SidescanLine sidescanLine;
// Must be in synchronized block
for (SidescanLine line : lineList) {
sidescanLine = line;
sidescanLine.setYPos(sidescanLine.getYPos() + yref);
if (sidescanLine.getYPos() > image.getHeight())
removeList.add(sidescanLine);
line.setYPos(line.getYPos() + yref);
if (line.getYPos() > image.getHeight())
removeList.add(line);
}
lineList.addAll(list);
lineList.removeAll(removeList);
Expand Down

0 comments on commit 0a7b0fe

Please sign in to comment.