From cb442f8c6e913ae0defc72388a37f01ca9a37058 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sat, 20 Apr 2019 11:51:15 -0400 Subject: [PATCH] Don't mark entry edit as modified when attribute selection changes (#3041) When selecting another attribute in the advanced tab, do not mark the entry as modified (nothing was changed). Also do not mark as modified when the notes checkbox is checked/unchecked (doesn't change entry). Fixes #3013. --- src/gui/entry/EditEntryWidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp index 063f8da2..e22e6703 100644 --- a/src/gui/entry/EditEntryWidget.cpp +++ b/src/gui/entry/EditEntryWidget.cpp @@ -285,7 +285,6 @@ void EditEntryWidget::setupEntryUpdate() connect(m_mainUi->urlEdit, SIGNAL(textChanged(QString)), this, SLOT(updateFaviconButtonEnable(QString))); #endif connect(m_mainUi->expireCheck, SIGNAL(stateChanged(int)), this, SLOT(setModified())); - connect(m_mainUi->notesEnabled, SIGNAL(stateChanged(int)), this, SLOT(setModified())); connect(m_mainUi->expireDatePicker, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(setModified())); connect(m_mainUi->notesEdit, SIGNAL(textChanged()), this, SLOT(setModified())); @@ -1111,8 +1110,9 @@ void EditEntryWidget::updateCurrentAttribute() void EditEntryWidget::displayAttribute(QModelIndex index, bool showProtected) { - // Block signals to prevent extra calls + // Block signals to prevent modified being set m_advancedUi->protectAttributeButton->blockSignals(true); + m_advancedUi->attributesEdit->blockSignals(true); if (index.isValid()) { QString key = m_attributesModel->keyByIndex(index); @@ -1143,6 +1143,7 @@ void EditEntryWidget::displayAttribute(QModelIndex index, bool showProtected) } m_advancedUi->protectAttributeButton->blockSignals(false); + m_advancedUi->attributesEdit->blockSignals(false); } void EditEntryWidget::protectCurrentAttribute(bool state)