Skip to content
Permalink
Browse files

Copy displayed value rather than original value

(Respects value relation configuration and other widget settings
which modify the displayed value)
  • Loading branch information
nyalldawson committed Jun 2, 2016
1 parent 3da460e commit 0c735420fc31c301947592c397dc3d8507c1112e
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/gui/attributetable/qgsdualview.cpp
@@ -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() );
}
}

1 comment on commit 0c73542

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids commented on 0c73542 Jun 2, 2016

you rock!

Please sign in to comment.
You can’t perform that action at this time.