Skip to content

Commit

Permalink
#561 don't show csvconfigure in Merge dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed Jan 17, 2017
1 parent fe93b11 commit cc283ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion DataViewer/MergeTableDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ void MergeTableDlg::OnOpenClick( wxCommandEvent& ev )
{
wxLogMessage("Entering MergeTableDlg::OnOpenClick()");
try {
ConnectDatasourceDlg dlg(this);
bool showCsvConfigure = false;
ConnectDatasourceDlg dlg(this, wxDefaultPosition, wxDefaultSize, showCsvConfigure);

if (dlg.ShowModal() != wxID_OK)
return;
Expand Down
7 changes: 4 additions & 3 deletions DialogTools/ConnectDatasourceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,9 @@ END_EVENT_TABLE()


ConnectDatasourceDlg::ConnectDatasourceDlg(wxWindow* parent, const wxPoint& pos,
const wxSize& size)
:datasource(0), scrl(0), recent_panel(0)
const wxSize& size,
bool showCsvConfigure_)
:datasource(0), scrl(0), recent_panel(0), showCsvConfigure(showCsvConfigure_)
{
base_xrcid_recent_thumb = 7000;
base_xrcid_sample_thumb = 7500;
Expand Down Expand Up @@ -679,7 +680,7 @@ void ConnectDatasourceDlg::OnOkClick( wxCommandEvent& event )
}

// For csv file, if no csvt file, pop-up a field definition dialog and create a csvt file
if (ds_file_path.GetExt().Lower() == "csv") {
if (ds_file_path.GetExt().Lower() == "csv" && showCsvConfigure) {
wxString csv_path = ds_file_path.GetFullPath();
CsvFieldConfDlg csvDlg(this, csv_path);
csvDlg.ShowModal();
Expand Down
4 changes: 3 additions & 1 deletion DialogTools/ConnectDatasourceDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class ConnectDatasourceDlg: public DatasourceDlg
public:
ConnectDatasourceDlg(wxWindow* parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize );
const wxSize& size = wxDefaultSize,
bool showCsvConfigure=true);
virtual ~ConnectDatasourceDlg();

void CreateControls();
Expand All @@ -103,6 +104,7 @@ class ConnectDatasourceDlg: public DatasourceDlg


protected:
bool showCsvConfigure;
wxStaticBitmap* m_drag_drop_box;
wxBitmapButton* m_database_lookup_table;
wxBitmapButton* m_database_lookup_wslayer;
Expand Down

0 comments on commit cc283ed

Please sign in to comment.