Opened 16 years ago
Closed 15 years ago
#582 closed defect (fixed)
Geotagged/GPX imported photos : Zoom is done on the first photo instead of the current one.
Reported by: | Owned by: | framm | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | geotagged zoom | Cc: |
Description
When the photo dialog is opened and you click the next (or previous) button, and then you click the zoom button, the display returns back to the first photo that has been displayed in the dialog. The workaround is to click once next and previous buttons, so that the zoomed image is again the one that was current.
Fix : In GeoImageLayer.showImage(int i), insert in the scale button action listener (at line 271) : ImageEntry e = data.get(currentImage);
The code looks like :
scale.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ev) { p.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); ImageEntry e = data.get(currentImage); if (scale.getModel().isSelected()) ((JLabel)vp.getView()).setIcon(loadScaledImage(e.image, Math.max(vp.getWidth(), vp.getHeight()))); else ((JLabel)vp.getView()).setIcon(new ImageIcon(e.image.getPath())); p.setCursor(Cursor.getDefaultCursor()); } });
The same fix can be applied in geotagged plugin, in class GeotaggedLayer.
Fix has already been applied.