Possible fix for FIRE-3827, do not ask for gtk_file_chooser_get_current_folder is the user cancelled the filepicker.

Nicky 2011-11-07 13:57:20 +01:00
parent d113e5fea8
commit faa2bb0c99
1 changed files with 7 additions and 3 deletions

View File

@ -1055,9 +1055,13 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer
g_slist_free (file_list);
}
// set the default path for this usage context.
picker->mContextToPathMap[picker->mCurContextName] =
gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget));
// <ND> FIRE-3827; Only do this if the user accepted the dialog with ok.
if( GTK_RESPONSE_ACCEPT == response )
{
// set the default path for this usage context.
picker->mContextToPathMap[picker->mCurContextName] =
gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget));
}
gtk_widget_destroy(widget);
gtk_main_quit();