X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2FApp.java;h=71bd354172ee3df66957c75b6faf1a8c08369db2;hb=326f489e36aa7f235bc19409a57bf4955cd50f24;hp=1f223265b0aa929e9099a6d7aba71ea5b0a49a0d;hpb=7f5ed2be62905bd37717376dc22d09e5ea7edb4d;p=GpsPrune.git diff --git a/tim/prune/App.java b/tim/prune/App.java index 1f22326..71bd354 100644 --- a/tim/prune/App.java +++ b/tim/prune/App.java @@ -41,6 +41,7 @@ import tim.prune.load.MediaLinkInfo; import tim.prune.load.TrackNameList; import tim.prune.save.ExifSaver; import tim.prune.save.FileSaver; +import tim.prune.tips.TipManager; import tim.prune.undo.*; @@ -119,6 +120,22 @@ public class App return _undoStack; } + + /** + * Show the specified tip if appropriate + * @param inTipNumber tip number from TipManager + */ + public void showTip(int inTipNumber) + { + String key = TipManager.fireTipTrigger(inTipNumber); + if (key != null && !key.equals("")) + { + JOptionPane.showMessageDialog(_frame, I18nManager.getText(key), + I18nManager.getText("tip.title"), JOptionPane.INFORMATION_MESSAGE); + } + } + + /** * Load the specified data files one by one * @param inDataFiles arraylist containing File objects to load @@ -511,6 +528,13 @@ public class App // ensure track's field list contains point's fields _track.extendFieldList(inPoint.getFieldList()); _trackInfo.selectPoint(inIndex); + final int selStart = _trackInfo.getSelection().getStart(); + final int selEnd = _trackInfo.getSelection().getEnd(); + if (selStart < inIndex && selEnd > inIndex) + { + // Extend end of selection by 1 + _trackInfo.getSelection().selectRange(selStart, selEnd+1); + } // update listeners UpdateMessageBroker.informSubscribers(I18nManager.getText("confirm.createpoint")); }