mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-03-13 01:26:37 -04:00
parent
09e47d3731
commit
ef2b5e7c26
@ -343,7 +343,7 @@ struct TagsEdit::Impl
|
||||
assert(i < tags.size());
|
||||
auto occurrencesOfCurrentText =
|
||||
std::count_if(tags.cbegin(), tags.cend(), [this](const auto& tag) { return tag.text == currentText(); });
|
||||
if (currentText().isEmpty() || occurrencesOfCurrentText > 1) {
|
||||
if (tags.size() > 1 && (currentText().isEmpty() || occurrencesOfCurrentText > 1)) {
|
||||
tags.erase(std::next(tags.begin(), std::ptrdiff_t(editing_index)));
|
||||
if (editing_index <= i) { // Do we shift positions after `i`?
|
||||
--i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user