mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-02 14:46:07 -04:00
Update edit entry widget when backing entry changes
* Fixes #4060 * Also fix not emitting entryModified() when history is truncated. This possibly fixes other crashes with apply button when the history is truncated and then the history page is shown with a deleted entry.
This commit is contained in:
parent
2073f2ddc3
commit
9d10792640
4 changed files with 25 additions and 2 deletions
|
@ -663,6 +663,7 @@ void Entry::truncateHistory()
|
|||
return;
|
||||
}
|
||||
|
||||
bool changed = false;
|
||||
int histMaxItems = db->metadata()->historyMaxItems();
|
||||
if (histMaxItems > -1) {
|
||||
int historyCount = 0;
|
||||
|
@ -674,6 +675,7 @@ void Entry::truncateHistory()
|
|||
if (historyCount > histMaxItems) {
|
||||
delete entry;
|
||||
i.remove();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -697,9 +699,14 @@ void Entry::truncateHistory()
|
|||
if (size > histMaxSize) {
|
||||
delete historyItem;
|
||||
i.remove();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
emit entryModified();
|
||||
}
|
||||
}
|
||||
|
||||
bool Entry::equals(const Entry* other, CompareItemOptions options) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue