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 4f6b99b commit 724d1ec
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,7 @@ void updateImage(long currentTime, long lastUpdateTime) {
ArrayList<SidescanLine> list = ssParser.getLinesBetween(firstPingTime + lastUpdateTime, firstPingTime
+ currentTime, subsystem, autoEGN ? SidescanHistogramNormalizer.HISTOGRAM_DEFAULT_PARAMATERS : sidescanParams);

ArrayList<SidescanLine> drawList = new ArrayList<>(list);

for (SidescanLine l : drawList) {
for (SidescanLine l : list) {
// Update the rangeMax to the ruler
if (l.getRange() != getRangeForRuler()) {
setRangeForRuler(l.getRange());
Expand Down Expand Up @@ -460,7 +458,7 @@ void updateImage(long currentTime, long lastUpdateTime) {

int d = 0;

for (SidescanLine sidescanLine : drawList) {
for (SidescanLine sidescanLine : list) {
sidescanLine.setYPos(yref - d);
d += sidescanLine.getYSize();
if (sidescanLine.getData().length <= 0) {
Expand Down Expand Up @@ -499,11 +497,11 @@ void updateImage(long currentTime, long lastUpdateTime) {
if (sidescanLine.getYPos() > image.getHeight())
removeList.add(sidescanLine);
}
lineList.addAll(drawList);
lineList.addAll(list);
lineList.removeAll(removeList);
}

drawList.clear();
list.clear();
removeList.clear();
}

Expand Down

0 comments on commit 724d1ec

Please sign in to comment.