From bbca44affeeee3944750bd20ae7324f89f7bce27 Mon Sep 17 00:00:00 2001 From: unodgs Date: Sun, 2 Dec 2012 15:01:49 +0000 Subject: [PATCH] GridCtrl: Fixed setting incorrect value for option column if it was a last column copied from excel git-svn-id: svn://ultimatepp.org/upp/trunk@5614 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/GridCtrl/GridCtrl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/uppsrc/GridCtrl/GridCtrl.cpp b/uppsrc/GridCtrl/GridCtrl.cpp index e0eba62e5..5622272f3 100644 --- a/uppsrc/GridCtrl/GridCtrl.cpp +++ b/uppsrc/GridCtrl/GridCtrl.cpp @@ -707,8 +707,6 @@ void GridCtrl::SetClipboard(bool all, bool silent) body.Remove(cnt - 1); } - LOG(body); - String header; if(copy_column_names) @@ -826,7 +824,8 @@ void GridCtrl::Paste(int mode) for(int i = 0; i < lines.GetCount(); i++) { - Vector cells = Upp::Split(lines[i], '\t', false); + String line = TrimRight(lines[i]); + Vector cells = Upp::Split(line, '\t', false); for(int j = 0; j < cells.GetCount(); j++) { int r = i;