mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 02:09:55 -06:00
ExtendedTableWidget: Fix bug when just copying one cell
The code for copying the selected cells to the clipboard doesn't work when there is just one cell selected. Fix the code by including a special handling for this case which returns the content of the single selected cell without any quotes or the like.
This commit is contained in:
@@ -24,7 +24,12 @@ void ExtendedTableWidget::copy()
|
||||
|
||||
// Abort if there's nothing to copy
|
||||
if(indices.size() == 0)
|
||||
{
|
||||
return;
|
||||
} else if(indices.size() == 1) {
|
||||
qApp->clipboard()->setText(indices.front().data().toString());
|
||||
return;
|
||||
}
|
||||
|
||||
// Sort the items by row, then by column
|
||||
qSort(indices);
|
||||
|
||||
Reference in New Issue
Block a user