summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 195b1fa..ec81d44 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1182,5 +1182,28 @@ 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() )