1
0
Fork 0

Support copying in the StdTable with multiple items selected

This commit is contained in:
Duncan Ogilvie 2024-02-19 03:10:17 +01:00
parent da43aca116
commit d08913bc54
1 changed files with 11 additions and 2 deletions

View File

@ -885,8 +885,17 @@ void AbstractStdTable::copyEntrySlot()
if(!action)
return;
int col = action->objectName().toInt();
QString finalText = getCellContent(getInitialSelection(), col);
while(finalText.endsWith(" ")) finalText.chop(1);
QString finalText;
for(int row : getSelection())
{
if(!finalText.isEmpty())
{
finalText += "\n";
}
finalText += getCellContent(row, col);
while(finalText.endsWith(' '))
finalText.chop(1);
}
Bridge::CopyToClipboard(finalText);
}