mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-21 22:04:56 -06:00
GridCtrl: Removed blank column from text clipboard
git-svn-id: svn://ultimatepp.org/upp/trunk@5613 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c0a565b8a5
commit
65cd7f32bd
1 changed files with 12 additions and 1 deletions
|
|
@ -675,6 +675,7 @@ void GridCtrl::SetClipboard(bool all, bool silent)
|
|||
bool row_selected = select_row && IsSelected(i, false);
|
||||
|
||||
for(int j = fixed_cols; j < total_cols; j++)
|
||||
{
|
||||
if(all || row_selected || IsSelected(i, j, false))
|
||||
{
|
||||
if(prev_row < 0)
|
||||
|
|
@ -699,8 +700,15 @@ void GridCtrl::SetClipboard(bool all, bool silent)
|
|||
|
||||
sc[j] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
int cnt = body.GetCount();
|
||||
if(cnt > 0 && body[cnt - 1] == '\t')
|
||||
body.Remove(cnt - 1);
|
||||
}
|
||||
|
||||
LOG(body);
|
||||
|
||||
String header;
|
||||
|
||||
if(copy_column_names)
|
||||
|
|
@ -708,7 +716,10 @@ void GridCtrl::SetClipboard(bool all, bool silent)
|
|||
for(int i = 0; i < sc.GetCount(); i++)
|
||||
if(sc[i] >= 0)
|
||||
header += hitems[i].GetName() + '\t';
|
||||
|
||||
|
||||
int cnt = header.GetCount();
|
||||
if(cnt > 0 && header[cnt - 1] == '\t')
|
||||
header.Remove(cnt - 1);
|
||||
header += "\r\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue