Time conflict fix
authorfortefr <fortefr@localhost>
Thu, 21 Jan 2010 13:42:33 +0000 (13:42 +0000)
committerfortefr <fortefr@localhost>
Thu, 21 Jan 2010 13:42:33 +0000 (13:42 +0000)
src/mvc/delegate.cpp

index 6f620b2..a566e59 100644 (file)
@@ -426,9 +426,9 @@ bool Delegate::hasTimeConflict(const QModelIndex &index, const QModelIndex &pare
         {
             if (((start >= static_cast<Event*>(parent.child(i,0).internalPointer())->start().time())
             &&
-            (start <= static_cast<Event*>(parent.child(i,0).internalPointer())->start().time().addSecs(static_cast<Event*>(parent.child(i,0).internalPointer())->duration())))
+            (start < static_cast<Event*>(parent.child(i,0).internalPointer())->start().time().addSecs(static_cast<Event*>(parent.child(i,0).internalPointer())->duration())))
             ||
-            ((end >= static_cast<Event*>(parent.child(i,0).internalPointer())->start().time())
+            ((end > static_cast<Event*>(parent.child(i,0).internalPointer())->start().time())
             &&
             (end <= static_cast<Event*>(parent.child(i,0).internalPointer())->start().time().addSecs(static_cast<Event*>(parent.child(i,0).internalPointer())->duration()))))
             {