Skip to content

Commit 576dd7b

Browse files
committed
Fix resolving advanced values in entry preview
* Fixes #10961 * Fixes #7410 - show content of references when previewing notes
1 parent dbf9587 commit 576dd7b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/gui/EntryPreviewWidget.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ void EntryPreviewWidget::setPasswordVisible(bool state)
321321

322322
void EntryPreviewWidget::setEntryNotesVisible(bool state)
323323
{
324-
setNotesVisible(m_ui->entryNotesTextEdit, m_currentEntry->notes(), state);
324+
setNotesVisible(
325+
m_ui->entryNotesTextEdit, m_currentEntry->resolveMultiplePlaceholders(m_currentEntry->notes()), state);
325326
m_ui->toggleEntryNotesButton->setIcon(icons()->onOffIcon("password-show", state));
326327
}
327328

@@ -427,6 +428,8 @@ void EntryPreviewWidget::updateEntryAdvancedTab()
427428
m_ui->entryAttributesTable->item(i, 0)->setFont(font);
428429
m_ui->entryAttributesTable->item(i, 0)->setTextAlignment(Qt::AlignTop | Qt::AlignLeft);
429430

431+
auto value = m_currentEntry->resolveMultiplePlaceholders(attributes->value(key));
432+
430433
if (attributes->isProtected(key)) {
431434
// only show the reveal button on protected attributes
432435
auto button = new QToolButton();
@@ -453,10 +456,10 @@ void EntryPreviewWidget::updateEntryAdvancedTab()
453456
m_ui->entryAttributesTable->setCellWidget(i, 1, button);
454457
m_ui->entryAttributesTable->setItem(i, 2, new QTableWidgetItem(QString("\u25cf").repeated(6)));
455458
} else {
456-
m_ui->entryAttributesTable->setItem(i, 2, new QTableWidgetItem(attributes->value(key)));
459+
m_ui->entryAttributesTable->setItem(i, 2, new QTableWidgetItem(value));
457460
}
458461

459-
m_ui->entryAttributesTable->item(i, 2)->setData(Qt::UserRole, attributes->value(key));
462+
m_ui->entryAttributesTable->item(i, 2)->setData(Qt::UserRole, value);
460463
m_ui->entryAttributesTable->item(i, 2)->setToolTip(tr("Double click to copy value"));
461464
m_ui->entryAttributesTable->item(i, 2)->setTextAlignment(Qt::AlignTop | Qt::AlignLeft);
462465

0 commit comments

Comments
 (0)