• R/O
  • HTTP
  • SSH
  • HTTPS

importpicture: Commit


Commit MetaInfo

Revision2556cbc06393e5000e9fae9579f759354540dbd4 (tree)
Time2019-10-20 12:44:50
Authorhaya4 <hayashi.yuu@gmai...>
Commiterhaya4

Log Message

fixed:

Change Summary

Incremental Difference

--- a/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java
+++ b/src/osm/jp/gpx/matchtime/gui/restamp/DialogCorectTime.java
@@ -154,16 +154,21 @@ public class DialogCorectTime extends JDialog implements PanelAction {
154154 */
155155 @SuppressWarnings("UseSpecificCatch")
156156 public void imageView_Action() {
157- String path = basetime.getImageFile().getImageFile().getAbsolutePath();
157+ try {
158+ String path = basetime.getImageFile().getImageFile().getAbsolutePath();
158159
159- // View Image File
160- int size_x = imageSPane.getWidth() - 8;
161- ImageIcon tmpIcon = new ImageIcon(path);
162- refImage = tmpIcon;
163- if (tmpIcon.getIconWidth() > size_x) {
164- refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x, -1, Image.SCALE_DEFAULT));
160+ // View Image File
161+ int size_x = imageSPane.getWidth() - 8;
162+ ImageIcon tmpIcon = new ImageIcon(path);
163+ refImage = tmpIcon;
164+ if (tmpIcon.getIconWidth() > size_x) {
165+ refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x, -1, Image.SCALE_DEFAULT));
166+ }
167+ imageLabel.setIcon(refImage);
168+ }
169+ catch(NullPointerException e) {
170+ // 何もしない
165171 }
166- imageLabel.setIcon(refImage);
167172 repaint();
168173 }
169174
Show on old repository browser