+ /**
+ * Set the suggestion for the name with which to export
+ */
+ private void setFileTitle()
+ {
+ // Get the most recent file info
+ SourceInfo currentSource = _app.getTrackInfo().getFileInfo().getLastFileInfo();
+ if (currentSource != _previousSourceInfo)
+ {
+ String lastTitle = currentSource.getFileTitle();
+ if (lastTitle != null && !lastTitle.equals(""))
+ {
+ // Take the title of the last file loaded
+ _nameField.setText(lastTitle);
+ }
+ }
+ if (_nameField.getText().equals(""))
+ {
+ // no name given in the field already, so try to overwrite it
+ String lastTitle = _app.getTrackInfo().getFileInfo().getLastFileTitle();
+ if (lastTitle != null && !lastTitle.equals(""))
+ {
+ _nameField.setText(lastTitle);
+ }
+ }
+ // Remember this source info so we don't use it again
+ _previousSourceInfo = currentSource;
+ }