From 8e21306a697d77c80d42f450a721cb3d7c23fd0f Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 28 Jul 2005 12:59:27 +0000 Subject: monv fix --- diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4aeb20c..8d06040 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -82,6 +82,7 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); #endif + mBlockDeselect = false; mWT = new KNOWhatsThis(this); resetOnFocusIn = true; setVScrollBarMode(QScrollView::AlwaysOff); @@ -135,14 +136,18 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) } void KNoScrollListBox::focusOutEvent ( QFocusEvent * e ) { + if ( ! mBlockDeselect ) { int i = currentItem (); if ( i >= 0 ) { - setSelected ( i, false ); + setSelected ( i, false ); } QListBox::focusOutEvent ( e ); + } setVScrollBarMode(QScrollView::AlwaysOff); setHScrollBarMode(QScrollView::AlwaysOff); - emit highlightIncidence( 0, (MonthViewCell*)this, 0 ); + if ( ! mBlockDeselect ) + emit highlightIncidence( 0, (MonthViewCell*)this, 0 ); + mBlockDeselect = false; } QString KNoScrollListBox::getWhatsThisText(QPoint p) @@ -1110,9 +1115,8 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) MonthViewItem *eventItem = static_cast( item ); Incidence *incidence = eventItem->incidence(); if ( incidence ) { + mBlockDeselect = true; mMonthView->showContextMenu( incidence ); - selection( item ); - doHighLight( incidence ); } } diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 61a141a..1a9d16d 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -87,7 +87,8 @@ class KNoScrollListBox: public QListBox void nextCell(); void prevCell(); void highlightIncidence( Incidence * , MonthViewCell*, int ); - + protected: + bool mBlockDeselect; protected slots: void oneDown(); void keyPressEvent(QKeyEvent *); -- cgit v0.9.0.2