-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 31 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 1 |
3 files changed, 31 insertions, 2 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 05c1afd..28029ee 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -5,2 +5,3 @@ Info about the changes in new versions of KDE-Pim/Pi | |||
5 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | 5 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. |
6 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. | ||
6 | 7 | ||
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index a72e470..195b1fa 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1081,3 +1081,3 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) | |||
1081 | 1081 | ||
1082 | // Adjust sub cell geometry of all items | 1082 | // Adjust sub cell geometry of all direct conflict items |
1083 | for ( item=conflictItems.first(); item != 0; | 1083 | for ( item=conflictItems.first(); item != 0; |
@@ -1101,3 +1101,30 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) | |||
1101 | } | 1101 | } |
1102 | 1102 | // Adjust sub cell geometry of all conflict items of all conflict items | |
1103 | for ( item=conflictItems.first(); item != 0; | ||
1104 | item=conflictItems.next() ) { | ||
1105 | if ( placeItem != item ) { | ||
1106 | KOAgendaItem *item2; | ||
1107 | QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); | ||
1108 | for ( item2=conflictItems2.first(); item2 != 0; | ||
1109 | item2=conflictItems2.next() ) { | ||
1110 | if ( item2->subCells() != maxSubCells) { | ||
1111 | item2->setSubCells(maxSubCells); | ||
1112 | if (mAllDayMode) { | ||
1113 | item2->resize(item2->cellWidth() * mGridSpacingX, newSubCellWidth); | ||
1114 | } else { | ||
1115 | item2->resize(newSubCellWidth, item2->cellHeight() * mGridSpacingY); | ||
1116 | } | ||
1117 | int x,y; | ||
1118 | gridToContents(item2->cellX(),item2->cellYTop(),x,y); | ||
1119 | if (mAllDayMode) { | ||
1120 | y += item2->subCell() * newSubCellWidth; | ||
1121 | } else { | ||
1122 | x += item2->subCell() * newSubCellWidth; | ||
1123 | } | ||
1124 | moveChild(item2,x,y); | ||
1125 | //qDebug("setttttt %d %s",maxSubCells, item2->text().latin1() ); | ||
1126 | } | ||
1127 | } | ||
1128 | } | ||
1129 | } | ||
1103 | } else { | 1130 | } else { |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index d0a7b07..38bd93a 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -137,2 +137,3 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd ) | |||
137 | 137 | ||
138 | mConflictItems.clear(); | ||
138 | setCellXY(0,0,1); | 139 | setCellXY(0,0,1); |