mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Optimized clipboard insertion and fixed issue #626
This commit is contained in:
@@ -107,15 +107,9 @@ void ExtendedTableWidget::paste()
|
||||
|
||||
// Unpack cliboard, assuming that it is rectangular
|
||||
QList<QStringList> clipboardTable;
|
||||
QStringList cr = clipboard.split(endOfLine);
|
||||
QStringList cr = clipboard.trimmed().split(endOfLine);
|
||||
foreach(const QString& r, cr)
|
||||
{
|
||||
// Usually last splited line is empty
|
||||
if(!r.isEmpty())
|
||||
{
|
||||
clipboardTable.push_back(r.split("\t"));
|
||||
}
|
||||
}
|
||||
clipboardTable.push_back(r.split("\t"));
|
||||
|
||||
int clipboardRows = clipboardTable.size();
|
||||
int clipboardColumns = clipboardTable.front().size();
|
||||
|
||||
Reference in New Issue
Block a user