summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@cs.ox.ac.uk>2012-12-17 14:21:38 +0000
committerAlex Merry <alex.merry@cs.ox.ac.uk>2012-12-17 14:21:38 +0000
commitdd70f3391d05753a86c30508afd3ada76770ca65 (patch)
tree56250888500686d3adc8174e01d16c47f8872be7
parentc2c4eae281e7fc6b661b9e061c8f619844216950 (diff)
Set "save as" dialog folder correctly for existing files
We were trying to set it to the path to the file, instead of its containing folder, which was confusing the GKT+ dialog.
-rw-r--r--tikzit/src/gtk/Window.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/tikzit/src/gtk/Window.m b/tikzit/src/gtk/Window.m
index c7f98ff..ea87b6c 100644
--- a/tikzit/src/gtk/Window.m
+++ b/tikzit/src/gtk/Window.m
@@ -181,7 +181,7 @@ static void update_paste_action (GtkClipboard *clipboard, GdkEvent *event, GtkAc
FileChooserDialog *dialog = [FileChooserDialog openDialogWithParent:window];
[dialog addStandardFilters];
if ([document path]) {
- [dialog setCurrentFolder:[document path]];
+ [dialog setCurrentFolder:[[document path] stringByDeletingLastPathComponent]];
} else if ([app lastOpenFolder]) {
[dialog setCurrentFolder:[app lastOpenFolder]];
}