[office/tellico] src: Add Check-In command to menu and be sure to update modified entries
Robby Stephenson <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 04754e51e05d79b68b82568fd51a2566d016ba7c by Robby Stephenson.
Committed on 01/08/2026 at 00:48.
Pushed by rstephenson into branch 'master'.
Add Check-In command to menu and be sure to update modified entries
M +3 -0 src/commands/removeloans.cpp
M +1 -0 src/controller.cpp
M +1 -3 src/document.cpp
https://invent.kde.org/office/tellico/-/commit/04754e51e05d79b68b82568fd51a2566d016ba7c
diff --git a/src/commands/removeloans.cpp b/src/commands/removeloans.cpp
index 3acb78027..7e0fb412e 100644
--- a/src/commands/removeloans.cpp
+++ b/src/commands/removeloans.cpp
@@ -60,6 +60,9 @@ void RemoveLoans::redo() {
modifiedEntries.append(loan->entry());
Controller::self()->modifiedBorrower(loan->borrower());
}
+ if(!modifiedEntries.isEmpty()) {
+ Controller::self()->modifiedEntries(modifiedEntries);
+ }
if(!calLoans.isEmpty()) {
myWarning() << "Add to calendar not implemented";
}
diff --git a/src/controller.cpp b/src/controller.cpp
index e45030c33..6742f68f3 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -511,6 +511,7 @@ void Controller::plugEntryActions(QMenu* popup_) {
// plugging the menu isn't enough to have the popup get populated
plugUpdateMenu(popup_);
popup_->addSeparator();
+ popup_->addAction(m_mainWindow->m_checkInEntry);
popup_->addAction(m_mainWindow->m_checkOutEntry);
}
diff --git a/src/document.cpp b/src/document.cpp
index 20563463a..ebc5b140f 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -523,9 +523,7 @@ void Document::checkOutEntry(Tellico::Data::EntryPtr entry_) {
m_coll->addField(f);
}
entry_->setField(loaned, QStringLiteral("true"));
- EntryList vec;
- vec.append(entry_);
- m_coll->updateDicts(vec, QStringList() << loaned);
+ m_coll->updateDicts(EntryList() << entry_, QStringList() << loaned);
}
void Document::checkInEntry(Tellico::Data::EntryPtr entry_) {