From 4a9bf75c2ef12a40be3aea1d147f3703aee48638 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 23 Feb 2005 21:53:18 +0000 Subject: morelayout fixes --- (limited to 'korganizer/koagenda.cpp') diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 195b1fa..ec81d44 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1181,7 +1181,30 @@ void KOAgenda::finishUpdate() { KOAgendaItem *item; - globalFlagBlockAgendaItemPaint = 1; + globalFlagBlockAgendaItemPaint = 1; + // Adjust sub cell geometry of all conflict items of all conflict items of all conflict items ... of the conflict item with the max number of conflictitems + for ( item=mItems.first(); item != 0; item=mItems.next() ) { + if ( !item->checkLayout() ) { + //qDebug(" conflictitem found "); + int newSubCellWidth; + if (mAllDayMode) newSubCellWidth = mGridSpacingY / item->subCells(); + else newSubCellWidth = mGridSpacingX / item->subCells(); + + if (mAllDayMode) { + item->resize(item->cellWidth() * mGridSpacingX, newSubCellWidth); + } else { + item->resize(newSubCellWidth, item->cellHeight() * mGridSpacingY); + } + int x,y; + gridToContents(item->cellX(),item->cellYTop(),x,y); + if (mAllDayMode) { + y += item->subCell() * newSubCellWidth; + } else { + x += item->subCell() * newSubCellWidth; + } + moveChild(item,x,y); + } + } for ( item=mItems.first(); item != 0; item=mItems.next() ) { if ( !item->isVisible() ) item->show(); -- cgit v0.9.0.2