diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index e4ee21a3c2..0573a01897 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -598,7 +598,7 @@ void DatabaseWidget::copyAttribute(QAction* action) return; } - setClipboardTextAndMinimize(currentEntry->resolveMultiplePlaceholders(currentEntry->attributes()->value(action->text()))); + setClipboardTextAndMinimize(currentEntry->resolveMultiplePlaceholders(currentEntry->attributes()->value(action->data().toString()))); } void DatabaseWidget::setClipboardTextAndMinimize(const QString& text) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index ba69c0173a..1822c48d44 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -499,6 +499,7 @@ void MainWindow::updateCopyAttributesMenu() const QStringList customEntryAttributes = dbWidget->customEntryAttributes(); for (const QString& key : customEntryAttributes) { QAction* action = m_ui->menuEntryCopyAttribute->addAction(key); + action->setData(QVariant(key)); m_copyAdditionalAttributeActions->addAction(action); } }