aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPExportFilenameUtilities.m2
-rw-r--r--Source/SPExportInitializer.m3
2 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPExportFilenameUtilities.m b/Source/SPExportFilenameUtilities.m
index a65b8e53..de480618 100644
--- a/Source/SPExportFilenameUtilities.m
+++ b/Source/SPExportFilenameUtilities.m
@@ -122,6 +122,8 @@
}
[exportCustomFilenameTokensField setStringValue:[exportTokens componentsJoinedByString:@","]];
+ //update preview name as programmatically changing the exportCustomFilenameTokenField does not fire a notification
+ [self updateDisplayedExportFilename];
}
/**
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index 03284525..1b9fb5a8 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -304,7 +304,8 @@
[sqlExporter setSqlExportTables:exportTables];
// Create custom filename if required
- [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatUsingTableName:nil] : [self generateDefaultExportFilename]];
+ NSString *selectedTableName = (exportSource == SPTableExport && [exportTables count] == 1)? [[exportTables objectAtIndex:0] objectAtIndex:0] : nil;
+ [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatUsingTableName:selectedTableName] : [self generateDefaultExportFilename]];
// Only append the extension if necessary
if (![[exportFilename pathExtension] length]) {