- if (point.getPhoto() != null)
- {
- // point already has a photo, confirm cloning of new point
- if (JOptionPane.showConfirmDialog(_frame,
- I18nManager.getText("dialog.connectphoto.clonepoint"),
- I18nManager.getText("dialog.connect.title"),
- JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
- {
- // Create undo, clone point and attach
- int pointIndex = _trackInfo.getSelection().getCurrentPointIndex() + 1;
- // insert new point after current one
- point = point.clonePoint();
- UndoConnectPhotoWithClone undo = new UndoConnectPhotoWithClone(
- point, photo.getFile().getName(), pointIndex);
- _track.insertPoint(point, pointIndex);
- photo.setDataPoint(point);
- point.setPhoto(photo);
- _undoStack.add(undo);
- UpdateMessageBroker.informSubscribers(DataSubscriber.SELECTION_CHANGED);
- UpdateMessageBroker.informSubscribers(I18nManager.getText("confirm.photo.connect"));
- }
- }
- else