[office/tellico/4.2] /: Refresh entry view for updated borrowers

Robby Stephenson <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 07d6b86fa477192910001acfa68e2f458cac87bb by Robby Stephenson.
Committed on 26/07/2026 at 20:22.
Pushed by rstephenson into branch '4.2'.

Refresh entry view for updated borrowers

M  +1    -0    ChangeLog
M  +7    -7    src/controller.cpp

https://invent.kde.org/office/tellico/-/commit/07d6b86fa477192910001acfa68e2f458cac87bb

diff --git a/ChangeLog b/ChangeLog
index d4b4df85c..a8615c24f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2026-07-26  Robby Stephenson  <[email protected]>
 
+	* Fixed bug with updating GUI after check-in entries.
 	* Fixed crashing bug when exporting HTML for entries with no title (Bug 523140).
 
 2026-07-05  Robby Stephenson  <[email protected]>
diff --git a/src/controller.cpp b/src/controller.cpp
index 6742f68f3..87555dcb6 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -242,6 +242,8 @@ void Controller::modifiedEntries(Tellico::Data::EntryList entries_) {
   }
   m_mainWindow->m_entryView->slotRefresh(); // special case
   blockAllSignals(false);
+
+  updateActions();
 }
 
 void Controller::removedEntries(Tellico::Data::EntryList entries_) {
@@ -601,6 +603,7 @@ void Controller::addedBorrower(Tellico::Data::BorrowerPtr borrower_) {
   foreach(Observer* obs, m_observers) {
     obs->addBorrower(borrower_);
   }
+  m_mainWindow->m_entryView->slotRefresh(); // special case if the new borrower should be shown in view
 }
 
 void Controller::modifiedBorrower(Tellico::Data::BorrowerPtr borrower_) {
@@ -611,6 +614,7 @@ void Controller::modifiedBorrower(Tellico::Data::BorrowerPtr borrower_) {
       obs->modifyBorrower(borrower_);
     }
   }
+  m_mainWindow->m_entryView->slotRefresh(); // special case if the borrower goes away
   hideTabs();
 }
 
@@ -661,9 +665,7 @@ void Controller::slotCheckOut() {
     }
   }
 
-  if(Kernel::self()->addLoans(loanedEntries)) {
-    m_mainWindow->m_checkInEntry->setEnabled(true);
-  }
+  Kernel::self()->addLoans(loanedEntries);
 }
 
 void Controller::slotCheckIn() {
@@ -690,10 +692,8 @@ void Controller::slotCheckIn(const Tellico::Data::EntryList& entries_) {
     }
   }
 
-  if(Kernel::self()->removeLoans(loans)) {
-    m_mainWindow->m_checkInEntry->setEnabled(false);
-  }
-  hideTabs();
+  Kernel::self()->removeLoans(loans);
+  hideTabs(); // maybe hide loaned tab
 }
 
 void Controller::hideTabs() const {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.