mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Copy displayed value rather than original value
(Respects value relation configuration and other widget settings which modify the displayed value)
This commit is contained in:
parent
3da460e443
commit
0c735420fc
@ -387,10 +387,7 @@ void QgsDualView::copyCellContent() const
|
||||
if ( action && action->data().isValid() && action->data().canConvert<QModelIndex>() )
|
||||
{
|
||||
QModelIndex index = action->data().value<QModelIndex>();
|
||||
|
||||
QgsFeature f = masterModel()->feature( index );
|
||||
int attrIndex = mMasterModel->fieldIdx( index.column() );
|
||||
QVariant var = f.attributes().at( attrIndex );
|
||||
QVariant var = masterModel()->data( index, Qt::DisplayRole );
|
||||
QApplication::clipboard()->setText( var.toString() );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user