summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
Unidiff
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index d0a7b07..38bd93a 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -114,48 +114,49 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
114 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; 114 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor;
115 } 115 }
116 else { 116 else {
117 QStringList categories = mIncidence->categories(); 117 QStringList categories = mIncidence->categories();
118 QString cat = categories.first(); 118 QString cat = categories.first();
119 if (cat.isEmpty()) { 119 if (cat.isEmpty()) {
120 if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) 120 if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) )
121 mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; 121 mBackgroundColor =KOPrefs::instance()->mTodoDoneColor;
122 else 122 else
123 mBackgroundColor =KOPrefs::instance()->mEventColor; 123 mBackgroundColor =KOPrefs::instance()->mEventColor;
124 } else { 124 } else {
125 mBackgroundColor = *KOPrefs::instance()->categoryColor(cat); 125 mBackgroundColor = *KOPrefs::instance()->categoryColor(cat);
126 if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) { 126 if ( (incidence->type() == "Todo") &&((static_cast<Todo*>(incidence))->isCompleted()) ) {
127 if ( mBackgroundColor == KOPrefs::instance()->mEventColor ) 127 if ( mBackgroundColor == KOPrefs::instance()->mEventColor )
128 mBackgroundColor =KOPrefs::instance()->mTodoDoneColor; 128 mBackgroundColor =KOPrefs::instance()->mTodoDoneColor;
129 } 129 }
130 } 130 }
131 131
132 } 132 }
133 mColorGroup = QColorGroup( mBackgroundColor.light(), 133 mColorGroup = QColorGroup( mBackgroundColor.light(),
134 mBackgroundColor.dark(),mBackgroundColor.light(), 134 mBackgroundColor.dark(),mBackgroundColor.light(),
135 mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; 135 mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ;
136 setBackgroundColor( mBackgroundColor ); 136 setBackgroundColor( mBackgroundColor );
137 137
138 mConflictItems.clear();
138 setCellXY(0,0,1); 139 setCellXY(0,0,1);
139 setCellXWidth(0); 140 setCellXWidth(0);
140 setSubCell(0); 141 setSubCell(0);
141 setSubCells(1); 142 setSubCells(1);
142 setMultiItem(0,0,0); 143 setMultiItem(0,0,0);
143 startMove(); 144 startMove();
144 mSelected = true; 145 mSelected = true;
145 select(false); 146 select(false);
146 QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont); 147 QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont);
147 mFontPixelSize = fontinf.height();; 148 mFontPixelSize = fontinf.height();;
148 hide(); 149 hide();
149 xPaintCoord = -1; 150 xPaintCoord = -1;
150 yPaintCoord = -1; 151 yPaintCoord = -1;
151} 152}
152 153
153 154
154KOAgendaItem::~KOAgendaItem() 155KOAgendaItem::~KOAgendaItem()
155{ 156{
156 // qDebug("deleteKOAgendaItem::~KOAgendaItem( "); 157 // qDebug("deleteKOAgendaItem::~KOAgendaItem( ");
157 158
158} 159}
159 160
160void KOAgendaItem::recreateIncidence() 161void KOAgendaItem::recreateIncidence()
161{ 162{