[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/korganizer
From:       David Faure <faure () kde ! org>
Date:       2003-01-31 18:30:55
[Download RAW message or body]

CVS commit by faure: 

Don't force end>=start while typing, it prevents e.g. erasing some digits
from the end field temporarily. There's a validation when closing anyway.
Fixed related bug with the duration label (was a huge number when end<start).


  M +31 -33    koeditorgeneralevent.cpp   1.53


--- kdepim/korganizer/koeditorgeneralevent.cpp  #1.52:1.53
@@ -202,10 +202,4 @@ void KOEditorGeneralEvent::endTimeChange
 
   QDateTime newdt(mCurrEndDateTime.date(), newtime);
-
-  if(newdt < mCurrStartDateTime) {
-    // oops, can't let that happen.
-    newdt = mCurrStartDateTime;
-    mEndTimeEdit->setTime(newdt.time());
-  }
   mCurrEndDateTime = newdt;
 
@@ -324,4 +318,7 @@ void KOEditorGeneralEvent::setDuration()
   QString tmpStr, catStr;
   int hourdiff, minutediff;
+  // end<date is an accepted temporary state while typing, but don't show
+  // any duration if this happens
+  if(mCurrEndDateTime >= mCurrStartDateTime) {
 
   if (mNoTimeButton->isChecked()) {
@@ -354,4 +351,5 @@ void KOEditorGeneralEvent::setDuration()
       }
     } else tmpStr = "";
+    }
   }
   mDurationLabel->setText(tmpStr);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic