diff --git a/ctl/ctlSQLResult.cpp b/ctl/ctlSQLResult.cpp index a6666b3..c18edc8 100644 --- a/ctl/ctlSQLResult.cpp +++ b/ctl/ctlSQLResult.cpp @@ -339,7 +339,7 @@ wxString ctlSQLResult::OnGetItemText(long item, long col) const } return wxEmptyString; } -wxString ctlSQLResult::CopySelColumnNameType() +wxString ctlSQLResult::CopySelColumnNameType(bool onlyname) { wxString ss = wxEmptyString; if (GetSelectedCols().GetCount()) { @@ -356,7 +356,8 @@ wxString ctlSQLResult::CopySelColumnNameType() wxString colName = colNames.Item(cl); wxString colType = colTypes.Item(cl); if (!ss.IsEmpty()) ss.Append(", "); - ss.Append(colName + " " + colType); + ss.Append(colName); + if (!onlyname) ss.Append(" " + colType); } } diff --git a/frm/frmQuery.cpp b/frm/frmQuery.cpp index 79f3a3e..d0b0674 100644 --- a/frm/frmQuery.cpp +++ b/frm/frmQuery.cpp @@ -2321,7 +2321,8 @@ void frmQuery::OnCopy_NameTypeCols(wxCommandEvent& ev) { // if (currentControl() == sqlResult) { - wxString s = sqlResult->CopySelColumnNameType(); + bool press=wxGetKeyState(WXK_CONTROL); + wxString s = sqlResult->CopySelColumnNameType(press); SetStatusText(s, STATUSPOS_MSGS); } } diff --git a/include/ctl/ctlSQLResult.h b/include/ctl/ctlSQLResult.h index e75af10..428bfe1 100644 --- a/include/ctl/ctlSQLResult.h +++ b/include/ctl/ctlSQLResult.h @@ -51,7 +51,7 @@ public: wxString CompareSelectCells(); wxString AutoColsPlot(int flags,frmQuery *parent); wxString CheckSelColumnDate(); - wxString CopySelColumnNameType(); + wxString CopySelColumnNameType(bool onlyname); void ClearFilter(); bool IsColText(int col); bool hasRowNumber()