From 99357458280c57453856a431d10c1584b610f13e Mon Sep 17 00:00:00 2001 From: Xun Li Date: Tue, 30 May 2017 22:37:47 -0500 Subject: [PATCH] #873 Recent doesn't show thumbnail for drag-n-drop gda --- DialogTools/ConnectDatasourceDlg.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/DialogTools/ConnectDatasourceDlg.cpp b/DialogTools/ConnectDatasourceDlg.cpp index 5c98d4136..01c8e39d9 100644 --- a/DialogTools/ConnectDatasourceDlg.cpp +++ b/DialogTools/ConnectDatasourceDlg.cpp @@ -729,10 +729,14 @@ void ConnectDatasourceDlg::OnOkClick( wxCommandEvent& event ) gda_frame->OpenProject(ds_file_path.GetFullPath()); wxLogMessage(_("Open project file:") + ds_file_path.GetFullPath()); try { + Project* project = gda_frame->GetProject(); + wxString layer_name; + if (project) layer_name = project->layername; + RecentDatasource recent_ds; - recent_ds.Add(ds_file_path.GetFullPath(), ds_file_path.GetFullPath(), ""); + recent_ds.Add(ds_file_path.GetFullPath(), ds_file_path.GetFullPath(), layer_name); } catch( GdaException ex) { - LOG_MSG(ex.what()); + wxLogMessage(ex.what()); } EndDialog(); }