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.
This commit is contained in:
Jonathan White 2019-04-20 11:51:15 -04:00 committed by Janek Bevendorff
parent 7d46ce3de1
commit cb442f8c6e

View File

@ -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)