-rw-r--r-- | korganizer/koagenda.cpp | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index c339b57..662576f 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -60,7 +60,7 @@ extern int globalFlagBlockAgendaItemPaint; | |||
60 | extern int globalFlagBlockAgendaItemUpdate; | 60 | extern int globalFlagBlockAgendaItemUpdate; |
61 | extern int globalFlagBlockStartup; | 61 | extern int globalFlagBlockStartup; |
62 | 62 | ||
63 | bool KOAgenda::mInvalidPixmap = false; | 63 | |
64 | //////////////////////////////////////////////////////////////////////////// | 64 | //////////////////////////////////////////////////////////////////////////// |
65 | MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) | 65 | MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) |
66 | : QFrame(_agenda->viewport(),name), agenda(_agenda) | 66 | : QFrame(_agenda->viewport(),name), agenda(_agenda) |
@@ -330,6 +330,7 @@ void KOAgenda::shrinkPixmap() | |||
330 | } | 330 | } |
331 | void KOAgenda::slotContentMove(int,int) | 331 | void KOAgenda::slotContentMove(int,int) |
332 | { | 332 | { |
333 | emit sendPing(); | ||
333 | if ( mActionType == NOP ) | 334 | if ( mActionType == NOP ) |
334 | slotClearSelection(); | 335 | slotClearSelection(); |
335 | if ( mSelectedItem && !mActionItem ) { | 336 | if ( mSelectedItem && !mActionItem ) { |
@@ -438,6 +439,15 @@ void KOAgenda::categoryChanged(Incidence * inc) | |||
438 | } | 439 | } |
439 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | 440 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) |
440 | { | 441 | { |
442 | |||
443 | if ( mInvalidPixmap ) { | ||
444 | mInvalidPixmap = false; | ||
445 | qDebug("InvalidPixmap "); | ||
446 | computeSizes(); | ||
447 | emit updateViewSignal(); | ||
448 | return true; | ||
449 | } | ||
450 | emit sendPing(); | ||
441 | static int startX = 0; | 451 | static int startX = 0; |
442 | static int startY = 0; | 452 | static int startY = 0; |
443 | int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 ); | 453 | int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 ); |
@@ -1267,16 +1277,20 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1267 | if ( mInvalidPixmap ) { | 1277 | if ( mInvalidPixmap ) { |
1268 | mInvalidPixmap = false; | 1278 | mInvalidPixmap = false; |
1269 | qDebug("InvalidPixmap "); | 1279 | qDebug("InvalidPixmap "); |
1270 | QTimer::singleShot( 0, this, SIGNAL( updateViewSignal() )); | 1280 | computeSizes(); |
1281 | emit updateViewSignal(); | ||
1271 | return; | 1282 | return; |
1272 | } | 1283 | } |
1273 | if ( ! mAllDayMode ) { | 1284 | if ( ! mAllDayMode ) { |
1274 | // currently not working for | 1285 | // currently not working for |
1275 | 1286 | ||
1276 | //qDebug("KOAgenda::drawContents "); | 1287 | //qDebug("KOAgenda::drawContents "); |
1277 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | 1288 | #if 0 |
1278 | ;//drawContentsToPainter(); | 1289 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) { |
1279 | 1290 | qDebug("WAU "); | |
1291 | drawContentsToPainter(); | ||
1292 | } | ||
1293 | #endif | ||
1280 | QPaintDevice* pd = p->device(); | 1294 | QPaintDevice* pd = p->device(); |
1281 | p->end(); | 1295 | p->end(); |
1282 | int vx, vy; | 1296 | int vx, vy; |
@@ -1320,10 +1334,13 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1320 | } | 1334 | } |
1321 | p->begin( pd ); | 1335 | p->begin( pd ); |
1322 | } else { | 1336 | } else { |
1323 | 1337 | #if 0 | |
1324 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | 1338 | qDebug("mCurPixWid %d %d ",mCurPixWid, contentsWidth() ); |
1325 | ;//drawContentsToPainter(); | 1339 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) { |
1326 | 1340 | qDebug("WAUWAU "); | |
1341 | drawContentsToPainter(); | ||
1342 | } | ||
1343 | #endif | ||
1327 | QPaintDevice* pd = p->device(); | 1344 | QPaintDevice* pd = p->device(); |
1328 | p->end(); | 1345 | p->end(); |
1329 | int vx, vy; | 1346 | int vx, vy; |