summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-06 11:26:40 (UTC)
committer zautrix <zautrix>2005-07-06 11:26:40 (UTC)
commit62a3094163367227c98494d7f69724aba4927584 (patch) (unidiff)
treed48fdf9012da83a68f563f24ba72cc610b38da2f
parent7e22293b1ec1ee190ca8db6c8ecd079bafdae520 (diff)
downloadkdepimpi-62a3094163367227c98494d7f69724aba4927584.zip
kdepimpi-62a3094163367227c98494d7f69724aba4927584.tar.gz
kdepimpi-62a3094163367227c98494d7f69724aba4927584.tar.bz2
fixx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index acdf5a0..b290020 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1035,129 +1035,130 @@ void KOAgenda::endItemAction()
1035 } 1035 }
1036 placeSubCells( placeItem ); 1036 placeSubCells( placeItem );
1037 placeItem = placeItem->nextMultiItem(); 1037 placeItem = placeItem->nextMultiItem();
1038 } 1038 }
1039 globalFlagBlockAgendaItemPaint = 0; 1039 globalFlagBlockAgendaItemPaint = 0;
1040 for ( item=oldconflictItems.first(); item != 0; 1040 for ( item=oldconflictItems.first(); item != 0;
1041 item=oldconflictItems.next() ) { 1041 item=oldconflictItems.next() ) {
1042 globalFlagBlockAgendaItemUpdate = 0; 1042 globalFlagBlockAgendaItemUpdate = 0;
1043 item->repaintMe(); 1043 item->repaintMe();
1044 globalFlagBlockAgendaItemUpdate = 1; 1044 globalFlagBlockAgendaItemUpdate = 1;
1045 item->repaint( false ); 1045 item->repaint( false );
1046 } 1046 }
1047 placeItem = modifiedItem; 1047 placeItem = modifiedItem;
1048 1048
1049 while ( placeItem ) { 1049 while ( placeItem ) {
1050 //qDebug("placeItem %s ", placeItem->incidence()->summary().latin1()); 1050 //qDebug("placeItem %s ", placeItem->incidence()->summary().latin1());
1051 globalFlagBlockAgendaItemUpdate = 0; 1051 globalFlagBlockAgendaItemUpdate = 0;
1052 placeItem->repaintMe(); 1052 placeItem->repaintMe();
1053 globalFlagBlockAgendaItemUpdate = 1; 1053 globalFlagBlockAgendaItemUpdate = 1;
1054 placeItem->repaint(false); 1054 placeItem->repaint(false);
1055 placeItem = placeItem->nextMultiItem(); 1055 placeItem = placeItem->nextMultiItem();
1056 } 1056 }
1057 emit itemModified( modifiedItem, mActionType ); 1057 emit itemModified( modifiedItem, mActionType );
1058 1058
1059 1059
1060 placeItem = modifiedItem; 1060 placeItem = modifiedItem;
1061 while ( placeItem ) { 1061 while ( placeItem ) {
1062 oldconflictItems = placeItem->conflictItems(); 1062 oldconflictItems = placeItem->conflictItems();
1063 for ( item=oldconflictItems.first(); item != 0; 1063 for ( item=oldconflictItems.first(); item != 0;
1064 item=oldconflictItems.next() ) { 1064 item=oldconflictItems.next() ) {
1065 placeSubCells(item); 1065 placeSubCells(item);
1066 } 1066 }
1067 placeSubCells( placeItem ); 1067 placeSubCells( placeItem );
1068 placeItem = placeItem->nextMultiItem(); 1068 placeItem = placeItem->nextMultiItem();
1069 1069
1070 } 1070 }
1071 placeItem = modifiedItem; 1071 placeItem = modifiedItem;
1072 while ( placeItem ) { 1072 while ( placeItem ) {
1073 oldconflictItems = placeItem->conflictItems(); 1073 oldconflictItems = placeItem->conflictItems();
1074 for ( item=oldconflictItems.first(); item != 0; 1074 for ( item=oldconflictItems.first(); item != 0;
1075 item=oldconflictItems.next() ) { 1075 item=oldconflictItems.next() ) {
1076 globalFlagBlockAgendaItemUpdate = 0; 1076 globalFlagBlockAgendaItemUpdate = 0;
1077 item->repaintMe(); 1077 item->repaintMe();
1078 globalFlagBlockAgendaItemUpdate = 1; 1078 globalFlagBlockAgendaItemUpdate = 1;
1079 item->repaint(false); 1079 item->repaint(false);
1080 } 1080 }
1081 placeItem = placeItem->nextMultiItem(); 1081 placeItem = placeItem->nextMultiItem();
1082 } 1082 }
1083 /* 1083 /*
1084 1084
1085 oldconflictItems = modifiedItem->conflictItems(); 1085 oldconflictItems = modifiedItem->conflictItems();
1086 for ( item=oldconflictItems.first(); item != 0; 1086 for ( item=oldconflictItems.first(); item != 0;
1087 item=oldconflictItems.next() ) { 1087 item=oldconflictItems.next() ) {
1088 globalFlagBlockAgendaItemUpdate = 0; 1088 globalFlagBlockAgendaItemUpdate = 0;
1089 item->paintMe(false); 1089 item->paintMe(false);
1090 globalFlagBlockAgendaItemUpdate = 1; 1090 globalFlagBlockAgendaItemUpdate = 1;
1091 item->repaint(false); 1091 item->repaint(false);
1092 } 1092 }
1093 */ 1093 */
1094 1094
1095 1095
1096 } 1096 }
1097 1097
1098 } 1098 }
1099 1099 if ( mActionItem )
1100 emit incidenceSelected( mActionItem->incidence() );
1100 mScrollUpTimer.stop(); 1101 mScrollUpTimer.stop();
1101 mScrollDownTimer.stop(); 1102 mScrollDownTimer.stop();
1102 setCursor( arrowCursor ); 1103 setCursor( arrowCursor );
1103 mActionItem = 0; 1104 mActionItem = 0;
1104 mActionType = NOP; 1105 mActionType = NOP;
1105 mItemMoved = 0; 1106 mItemMoved = 0;
1106 1107
1107} 1108}
1108 1109
1109void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) 1110void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
1110{ 1111{
1111// kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl; 1112// kdDebug() << "viewportPos: " << viewportPos.x() << "," << viewportPos.y() << endl;
1112// QPoint point = viewport()->mapToGlobal(viewportPos); 1113// QPoint point = viewport()->mapToGlobal(viewportPos);
1113// kdDebug() << "Global: " << point.x() << "," << point.y() << endl; 1114// kdDebug() << "Global: " << point.x() << "," << point.y() << endl;
1114// point = clipper()->mapFromGlobal(point); 1115// point = clipper()->mapFromGlobal(point);
1115// kdDebug() << "clipper: " << point.x() << "," << point.y() << endl; 1116// kdDebug() << "clipper: " << point.x() << "," << point.y() << endl;
1116 1117
1117 int x,y; 1118 int x,y;
1118 viewportToContents(viewportPos.x(),viewportPos.y(),x,y); 1119 viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
1119// kdDebug() << "contents: " << x << "," << y << "\n" << endl; 1120// kdDebug() << "contents: " << x << "," << y << "\n" << endl;
1120 int gx,gy; 1121 int gx,gy;
1121 contentsToGrid(x,y,gx,gy); 1122 contentsToGrid(x,y,gx,gy);
1122 1123
1123 // Change cursor to resize cursor if appropriate 1124 // Change cursor to resize cursor if appropriate
1124 if (mAllDayMode) { 1125 if (mAllDayMode) {
1125 int gridDistanceX = (x - gx * mGridSpacingX); 1126 int gridDistanceX = (x - gx * mGridSpacingX);
1126 if (gridDistanceX < mResizeBorderWidth && 1127 if (gridDistanceX < mResizeBorderWidth &&
1127 moveItem->cellX() == gx) { 1128 moveItem->cellX() == gx) {
1128 setCursor(sizeHorCursor); 1129 setCursor(sizeHorCursor);
1129 } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && 1130 } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth &&
1130 moveItem->cellXWidth() == gx) { 1131 moveItem->cellXWidth() == gx) {
1131 setCursor(sizeHorCursor); 1132 setCursor(sizeHorCursor);
1132 } else { 1133 } else {
1133 setCursor(arrowCursor); 1134 setCursor(arrowCursor);
1134 } 1135 }
1135 } else { 1136 } else {
1136 int gridDistanceY = (y - gy * mGridSpacingY); 1137 int gridDistanceY = (y - gy * mGridSpacingY);
1137 if (gridDistanceY < mResizeBorderWidth && 1138 if (gridDistanceY < mResizeBorderWidth &&
1138 moveItem->cellYTop() == gy && 1139 moveItem->cellYTop() == gy &&
1139 !moveItem->firstMultiItem()) { 1140 !moveItem->firstMultiItem()) {
1140 setCursor(sizeVerCursor); 1141 setCursor(sizeVerCursor);
1141 } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && 1142 } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth &&
1142 moveItem->cellYBottom() == gy && 1143 moveItem->cellYBottom() == gy &&
1143 !moveItem->lastMultiItem()) { 1144 !moveItem->lastMultiItem()) {
1144 setCursor(sizeVerCursor); 1145 setCursor(sizeVerCursor);
1145 } else { 1146 } else {
1146 setCursor(arrowCursor); 1147 setCursor(arrowCursor);
1147 } 1148 }
1148 } 1149 }
1149} 1150}
1150 1151
1151 1152
1152/* 1153/*
1153 Place item in cell and take care that multiple items using the same cell do 1154 Place item in cell and take care that multiple items using the same cell do
1154 not overlap. This method is not yet optimal. It doesn´t use the maximum space 1155 not overlap. This method is not yet optimal. It doesn´t use the maximum space
1155 it can get in all cases. 1156 it can get in all cases.
1156 At the moment the method has a bug: When an item is placed only the sub cell 1157 At the moment the method has a bug: When an item is placed only the sub cell
1157 widths of the items are changed, which are within the Y region the item to 1158 widths of the items are changed, which are within the Y region the item to
1158 place spans. When the sub cell width change of one of this items affects a 1159 place spans. When the sub cell width change of one of this items affects a
1159 cell, where other items are, which do not overlap in Y with the item to place, 1160 cell, where other items are, which do not overlap in Y with the item to place,
1160 the display gets corrupted, although the corruption looks quite nice. 1161 the display gets corrupted, although the corruption looks quite nice.
1161*/ 1162*/
1162void KOAgenda::placeSubCells(KOAgendaItem *placeItem) 1163void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
1163{ 1164{