-rw-r--r-- | korganizer/komonthview.cpp | 8 | ||||
-rw-r--r-- | korganizer/komonthview.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4aeb20c..8d06040 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -84,2 +84,3 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) #endif + mBlockDeselect = false; mWT = new KNOWhatsThis(this); @@ -137,2 +138,3 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e ) { + if ( ! mBlockDeselect ) { int i = currentItem (); @@ -142,5 +144,8 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e ) QListBox::focusOutEvent ( e ); + } setVScrollBarMode(QScrollView::AlwaysOff); setHScrollBarMode(QScrollView::AlwaysOff); + if ( ! mBlockDeselect ) emit highlightIncidence( 0, (MonthViewCell*)this, 0 ); + mBlockDeselect = false; } @@ -1112,5 +1117,4 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) 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 @@ -89,3 +89,4 @@ class KNoScrollListBox: public QListBox void highlightIncidence( Incidence * , MonthViewCell*, int ); - + protected: + bool mBlockDeselect; protected slots: |