OSSP CVS Repository

ossp - Check-in [3976]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3976
Date: 2003-Jan-30 23:40:35 (local)
2003-Jan-30 22:40:35 (UTC)
User:ms
Branch:
Comment: Improve close event handling, and announce this event to the user.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_slot.cpp      1.96 -> 1.97     4 inserted, 2 deleted

ossp-pkg/as/as-gui/as_slot.cpp 1.96 -> 1.97

--- as_slot.cpp  2003/01/30 22:02:41     1.96
+++ as_slot.cpp  2003/01/30 22:40:35     1.97
@@ -550,10 +550,12 @@
     // Fall through to implicit close code
     this->setCaption(TITRAQ_APPTITLE);
     try { // There might be problems, so wrap these last ops with error handling
+        QString Lightsout;          // It's late, go to bed
         if (this->isOpen())
-            m_pStatbar->message(trUtf8("Closed document ") + *this->getFilename(), 4000);
+            Lightsout = trUtf8("Closed document ") + *this->getFilename();
         this->setOpen(false);       // Set doc state to closed
         this->enableIface(false);   // Turn off the lights
+        m_pStatbar->message(Lightsout, 4000);
     }
     catch (Genexcept& Genex) {
         Genex.reportErr();
@@ -820,7 +822,7 @@
 {
     int nRealrow = -1;
 
-    if (!m_pMaintable->numRows() > 0) { // If no rows exist then short circuit
+    if (!this->isOpen()) { // If no data is loaded then short circuit
         m_pStatbar->message(trUtf8("Timesheet contains no data"), 4000);
         return;
     }

CVSTrac 2.0.1