Disable apply button when creating new entry/group

* Workaround to prevent data loss if apply is hit but not OK or Cancel
* Refactor required to fix this issue
This commit is contained in:
Jonathan White
2018-08-13 09:04:18 -04:00
committed by Jonathan White
parent d70a474bac
commit 3b1e15ea1a
5 changed files with 31 additions and 14 deletions

View File

@@ -597,7 +597,8 @@ void EditEntryWidget::loadEntry(Entry* entry, bool create, bool history, const Q
}
setForms(entry);
setReadOnly(m_history);
// Disable apply button if creating new entry (#2191)
setReadOnly(m_history, !m_create);
setCurrentPage(0);
setPageHidden(m_historyWidget, m_history || m_entry->historyItems().count() < 1);
@@ -802,7 +803,6 @@ void EditEntryWidget::acceptEntry()
{
if (commitEntry()) {
clear();
hideMessage();
emit editFinished(true);
}
}