-rw-r--r-- | korganizer/koagenda.cpp | 2 |
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) | |||
1114 | !moveItem->lastMultiItem()) { | 1114 | !moveItem->lastMultiItem()) { |
1115 | setCursor(sizeVerCursor); | 1115 | setCursor(sizeVerCursor); |
1116 | } else { | 1116 | } else { |
1117 | setCursor(arrowCursor); | 1117 | setCursor(arrowCursor); |
1118 | } | 1118 | } |
1119 | } | 1119 | } |
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | 1122 | ||
1123 | /* | 1123 | /* |
1124 | Place item in cell and take care that multiple items using the same cell do | 1124 | Place item in cell and take care that multiple items using the same cell do |
1125 | not overlap. This method is not yet optimal. It doesn´t use the maximum space | 1125 | not overlap. This method is not yet optimal. It doesn´t use the maximum space |
1126 | it can get in all cases. | 1126 | it can get in all cases. |
1127 | At the moment the method has a bug: When an item is placed only the sub cell | 1127 | At the moment the method has a bug: When an item is placed only the sub cell |
1128 | widths of the items are changed, which are within the Y region the item to | 1128 | widths of the items are changed, which are within the Y region the item to |
1129 | place spans. When the sub cell width change of one of this items affects a | 1129 | place spans. When the sub cell width change of one of this items affects a |
1130 | cell, where other items are, which do not overlap in Y with the item to place, | 1130 | cell, where other items are, which do not overlap in Y with the item to place, |
1131 | the display gets corrupted, although the corruption looks quite nice. | 1131 | the display gets corrupted, although the corruption looks quite nice. |
1132 | */ | 1132 | */ |
1133 | void KOAgenda::placeSubCells(KOAgendaItem *placeItem) | 1133 | void KOAgenda::placeSubCells(KOAgendaItem *placeItem) |
1134 | { | 1134 | { |
1135 | 1135 | ||
1136 | QPtrList<KOAgendaItem> conflictItems; | 1136 | QPtrList<KOAgendaItem> conflictItems; |
1137 | int maxSubCells = 0; | 1137 | int maxSubCells = 0; |
1138 | QIntDict<KOAgendaItem> subCellDict(5); | 1138 | QIntDict<KOAgendaItem> subCellDict(7); |
1139 | 1139 | ||
1140 | KOAgendaItem *item; | 1140 | KOAgendaItem *item; |
1141 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1141 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1142 | if (item != placeItem) { | 1142 | if (item != placeItem) { |
1143 | if (placeItem->cellX() <= item->cellXWidth() && | 1143 | if (placeItem->cellX() <= item->cellXWidth() && |
1144 | placeItem->cellXWidth() >= item->cellX()) { | 1144 | placeItem->cellXWidth() >= item->cellX()) { |
1145 | if ((placeItem->cellYTop() <= item->cellYBottom()) && | 1145 | if ((placeItem->cellYTop() <= item->cellYBottom()) && |
1146 | (placeItem->cellYBottom() >= item->cellYTop())) { | 1146 | (placeItem->cellYBottom() >= item->cellYTop())) { |
1147 | conflictItems.append(item); | 1147 | conflictItems.append(item); |
1148 | if (item->subCells() > maxSubCells) | 1148 | if (item->subCells() > maxSubCells) |
1149 | maxSubCells = item->subCells(); | 1149 | maxSubCells = item->subCells(); |
1150 | subCellDict.insert(item->subCell(),item); | 1150 | subCellDict.insert(item->subCell(),item); |
1151 | } | 1151 | } |
1152 | } | 1152 | } |
1153 | } | 1153 | } |
1154 | } | 1154 | } |
1155 | 1155 | ||
1156 | if (conflictItems.count() > 0) { | 1156 | if (conflictItems.count() > 0) { |
1157 | // Look for unused sub cell and insert item | 1157 | // Look for unused sub cell and insert item |
1158 | int i; | 1158 | int i; |
1159 | for(i=0;i<maxSubCells;++i) { | 1159 | for(i=0;i<maxSubCells;++i) { |
1160 | if (!subCellDict.find(i)) { | 1160 | if (!subCellDict.find(i)) { |
1161 | placeItem->setSubCell(i); | 1161 | placeItem->setSubCell(i); |
1162 | break; | 1162 | break; |