summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index f860f7d..94c3b22 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1114,49 +1114,49 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
!moveItem->lastMultiItem()) {
setCursor(sizeVerCursor);
} else {
setCursor(arrowCursor);
}
}
}
/*
Place item in cell and take care that multiple items using the same cell do
not overlap. This method is not yet optimal. It doesn´t use the maximum space
it can get in all cases.
At the moment the method has a bug: When an item is placed only the sub cell
widths of the items are changed, which are within the Y region the item to
place spans. When the sub cell width change of one of this items affects a
cell, where other items are, which do not overlap in Y with the item to place,
the display gets corrupted, although the corruption looks quite nice.
*/
void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
{
QPtrList<KOAgendaItem> conflictItems;
int maxSubCells = 0;
- QIntDict<KOAgendaItem> subCellDict(5);
+ QIntDict<KOAgendaItem> subCellDict(7);
KOAgendaItem *item;
for ( item=mItems.first(); item != 0; item=mItems.next() ) {
if (item != placeItem) {
if (placeItem->cellX() <= item->cellXWidth() &&
placeItem->cellXWidth() >= item->cellX()) {
if ((placeItem->cellYTop() <= item->cellYBottom()) &&
(placeItem->cellYBottom() >= item->cellYTop())) {
conflictItems.append(item);
if (item->subCells() > maxSubCells)
maxSubCells = item->subCells();
subCellDict.insert(item->subCell(),item);
}
}
}
}
if (conflictItems.count() > 0) {
// Look for unused sub cell and insert item
int i;
for(i=0;i<maxSubCells;++i) {
if (!subCellDict.find(i)) {
placeItem->setSubCell(i);
break;