author | zautrix <zautrix> | 2005-02-02 01:54:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-02 01:54:29 (UTC) |
commit | 5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7 (patch) (unidiff) | |
tree | 5d8092ab72fbd191f6045ff0ff4f81f0ec0d088b /korganizer/koagendaview.cpp | |
parent | 9ecfd0660e36b6b8dd7401f0edb16dd3d6f03289 (diff) | |
download | kdepimpi-5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7.zip kdepimpi-5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7.tar.gz kdepimpi-5bc675bc7e9d5d6fa2d2bc48675a7cfa985ab2c7.tar.bz2 |
abc
-rw-r--r-- | korganizer/koagendaview.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index c8cef44..d4ff77a 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -959,49 +959,48 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) | |||
959 | } | 959 | } |
960 | startDt.setDate(startDate); | 960 | startDt.setDate(startDate); |
961 | 961 | ||
962 | if (item->incidence()->doesFloat()) { | 962 | if (item->incidence()->doesFloat()) { |
963 | endDt.setDate(startDate.addDays(item->cellWidth() - 1)); | 963 | endDt.setDate(startDate.addDays(item->cellWidth() - 1)); |
964 | } else { | 964 | } else { |
965 | if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) | 965 | if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) |
966 | startDt.setTime(mAgenda->gyToTime(item->cellYTop())); | 966 | startDt.setTime(mAgenda->gyToTime(item->cellYTop())); |
967 | if ( item->incidence()->type() == "Event" ) { | 967 | if ( item->incidence()->type() == "Event" ) { |
968 | if ( type == KOAgenda::MOVE ) { | 968 | if ( type == KOAgenda::MOVE ) { |
969 | endDt = startDt.addSecs(lenInSecs); | 969 | endDt = startDt.addSecs(lenInSecs); |
970 | 970 | ||
971 | } else if ( type == KOAgenda::RESIZEBOTTOM ) { | 971 | } else if ( type == KOAgenda::RESIZEBOTTOM ) { |
972 | if (item->lastMultiItem()) { | 972 | if (item->lastMultiItem()) { |
973 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 973 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
974 | endDt.setDate(startDate. | 974 | endDt.setDate(startDate. |
975 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 975 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
976 | } else { | 976 | } else { |
977 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 977 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
978 | endDt.setDate(startDate); | 978 | endDt.setDate(startDate); |
979 | } | 979 | } |
980 | } | 980 | } |
981 | } else { | 981 | } else { |
982 | // todo | 982 | // todo |
983 | qDebug("tooooodoooooo "); | ||
984 | if (item->lastMultiItem()) { | 983 | if (item->lastMultiItem()) { |
985 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); | 984 | endDt.setTime(mAgenda->gyToTime(item->lastMultiItem()->cellYBottom()+1)); |
986 | endDt.setDate(startDate. | 985 | endDt.setDate(startDate. |
987 | addDays(item->lastMultiItem()->cellX() - item->cellX())); | 986 | addDays(item->lastMultiItem()->cellX() - item->cellX())); |
988 | } else { | 987 | } else { |
989 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); | 988 | //qDebug("tem->cellYBottom() %d",item->cellYBottom() ); |
990 | if ( item->cellYBottom() > 0 ) | 989 | if ( item->cellYBottom() > 0 ) |
991 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); | 990 | endDt.setTime(mAgenda->gyToTime(item->cellYBottom()+1)); |
992 | else | 991 | else |
993 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); | 992 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); |
994 | endDt.setDate(startDate); | 993 | endDt.setDate(startDate); |
995 | } | 994 | } |
996 | } | 995 | } |
997 | } | 996 | } |
998 | if ( item->incidence()->type() == "Event" ) { | 997 | if ( item->incidence()->type() == "Event" ) { |
999 | item->incidence()->setDtStart(startDt); | 998 | item->incidence()->setDtStart(startDt); |
1000 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); | 999 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); |
1001 | } else if ( item->incidence()->type() == "Todo" ) { | 1000 | } else if ( item->incidence()->type() == "Todo" ) { |
1002 | (static_cast<Todo*>(item->incidence()))->setDtDue(endDt); | 1001 | (static_cast<Todo*>(item->incidence()))->setDtDue(endDt); |
1003 | } | 1002 | } |
1004 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); | 1003 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); |
1005 | item->incidence()->setRevision(item->incidence()->revision()+1); | 1004 | item->incidence()->setRevision(item->incidence()->revision()+1); |
1006 | item->setItemDate(startDt.date()); | 1005 | item->setItemDate(startDt.date()); |
1007 | //item->updateItem(); | 1006 | //item->updateItem(); |