mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-08-15 22:02:27 -06:00
Added the Ctrl modifier to the "Copy table html format" command.
При выборе команды "Copy table html format" и удержании Ctrl будет выполнено копирование только строк результата запроса.
This commit is contained in:
parent
a932908248
commit
dd868d51fd
1 changed files with 18 additions and 7 deletions
|
|
@ -2292,14 +2292,25 @@ void frmQuery::OnCopy_TableToHtml(wxCommandEvent& ev)
|
|||
{
|
||||
// if (currentControl() == sqlResult)
|
||||
{
|
||||
wxString s = wxT("Table html format copy buffer.");
|
||||
wxString s = wxT("Query and table HTML format copy.");
|
||||
bool press = wxGetKeyState(WXK_CONTROL);
|
||||
wxString q = sqlResult->sqlquerytext;
|
||||
if (q.IsEmpty()) return;
|
||||
ctlSQLBox *box = new ctlSQLBox(sqlNotebook, CTL_SQLQUERY, wxDefaultPosition, wxSize(0,0), wxTE_MULTILINE | wxTE_RICH2);
|
||||
box->SetText(q);
|
||||
box->Colourise(0, box->GetLength());
|
||||
wxString html = box->TextToHtml(0, box->GetLength());
|
||||
delete box;
|
||||
wxString html;
|
||||
if (!press) {
|
||||
if (q.IsEmpty()) {
|
||||
SetStatusText("Problem: Query not found.", STATUSPOS_MSGS);
|
||||
return;
|
||||
}
|
||||
ctlSQLBox* box = new ctlSQLBox(sqlNotebook, CTL_SQLQUERY, wxDefaultPosition, wxSize(0, 0), wxTE_MULTILINE | wxTE_RICH2);
|
||||
box->SetText(q);
|
||||
box->Colourise(0, box->GetLength());
|
||||
html = box->TextToHtml(0, box->GetLength());
|
||||
delete box;
|
||||
}
|
||||
else {
|
||||
html = "";
|
||||
s = wxT("ONLY table HTML format copy.");
|
||||
}
|
||||
sqlResult->CopyTableToHtml(html);
|
||||
|
||||
SetStatusText(s, STATUSPOS_MSGS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue