From dd70f3391d05753a86c30508afd3ada76770ca65 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Mon, 17 Dec 2012 14:21:38 +0000 Subject: 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. --- tikzit/src/gtk/Window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tikzit/src/gtk/Window.m') 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]]; } -- cgit v1.2.3