X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fcorrelate%2FPhotoCorrelator.java;h=d60e905f09d048d84d13c63fc7d893c8efb3265a;hp=6c47d0042621e44e2c38d36f867d569533af9663;hb=112bb0c9b46894adca9a33ed8c99ea712b253185;hpb=54b9d8bc8f0025ccf97a67d9dd217ef1f9cf082f diff --git a/tim/prune/correlate/PhotoCorrelator.java b/tim/prune/correlate/PhotoCorrelator.java index 6c47d00..d60e905 100644 --- a/tim/prune/correlate/PhotoCorrelator.java +++ b/tim/prune/correlate/PhotoCorrelator.java @@ -69,10 +69,6 @@ public class PhotoCorrelator extends GenericFunction public PhotoCorrelator(App inApp) { super(inApp); - _dialog = new JDialog(inApp.getFrame(), I18nManager.getText(getNameKey()), true); - _dialog.setLocationRelativeTo(inApp.getFrame()); - _dialog.getContentPane().add(makeDialogContents()); - _dialog.pack(); } @@ -86,6 +82,14 @@ public class PhotoCorrelator extends GenericFunction */ public void begin() { + // First create dialog if necessary + if (_dialog == null) + { + _dialog = new JDialog(_parentFrame, I18nManager.getText(getNameKey()), true); + _dialog.setLocationRelativeTo(_parentFrame); + _dialog.getContentPane().add(makeDialogContents()); + _dialog.pack(); + } // Check whether track has timestamps, exit if not if (!_app.getTrackInfo().getTrack().hasData(Field.TIMESTAMP)) { @@ -378,7 +382,7 @@ public class PhotoCorrelator extends GenericFunction _pointLaterOption.setSelected(!inTimeDiff.getIsPositive()); createPreview(inTimeDiff, true); CardLayout cl = (CardLayout) _cards.getLayout(); - cl.next(_cards); + cl.last(_cards); _backButton.setEnabled(hasTimeDiff); _nextButton.setEnabled(false); // enable ok button if any photos have been selected