summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
authorzautrix <zautrix>2005-02-23 10:58:09 (UTC)
committer zautrix <zautrix>2005-02-23 10:58:09 (UTC)
commit36704cb63582c161d2ab5c63e66ee63bbf3b865f (patch) (side-by-side diff)
tree1541d63b50f7bc50278c6fed164f4b5228f18362 /korganizer/koagenda.cpp
parent87a2f1a301beae2a8550c340348741c69f0ac1dd (diff)
downloadkdepimpi-36704cb63582c161d2ab5c63e66ee63bbf3b865f.zip
kdepimpi-36704cb63582c161d2ab5c63e66ee63bbf3b865f.tar.gz
kdepimpi-36704cb63582c161d2ab5c63e66ee63bbf3b865f.tar.bz2
fixed layout problem
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index a72e470..195b1fa 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1079,7 +1079,7 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
conflictItems.append(placeItem);
- // Adjust sub cell geometry of all items
+ // Adjust sub cell geometry of all direct conflict items
for ( item=conflictItems.first(); item != 0;
item=conflictItems.next() ) {
item->setSubCells(maxSubCells);
@@ -1099,7 +1099,34 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
// qDebug("moveChild %s %d %d ", item->incidence()->summary().latin1() ,x,y);
//item->updateItem();
}
-
+ // Adjust sub cell geometry of all conflict items of all conflict items
+ for ( item=conflictItems.first(); item != 0;
+ item=conflictItems.next() ) {
+ if ( placeItem != item ) {
+ KOAgendaItem *item2;
+ QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems();
+ for ( item2=conflictItems2.first(); item2 != 0;
+ item2=conflictItems2.next() ) {
+ if ( item2->subCells() != maxSubCells) {
+ item2->setSubCells(maxSubCells);
+ if (mAllDayMode) {
+ item2->resize(item2->cellWidth() * mGridSpacingX, newSubCellWidth);
+ } else {
+ item2->resize(newSubCellWidth, item2->cellHeight() * mGridSpacingY);
+ }
+ int x,y;
+ gridToContents(item2->cellX(),item2->cellYTop(),x,y);
+ if (mAllDayMode) {
+ y += item2->subCell() * newSubCellWidth;
+ } else {
+ x += item2->subCell() * newSubCellWidth;
+ }
+ moveChild(item2,x,y);
+ //qDebug("setttttt %d %s",maxSubCells, item2->text().latin1() );
+ }
+ }
+ }
+ }
} else {
placeItem->setSubCell(0);
placeItem->setSubCells(1);