-rw-r--r-- | korganizer/komonthview.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4aeb20c..8d06040 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -81,8 +81,9 @@ 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); setHScrollBarMode(QScrollView::AlwaysOff); @@ -134,16 +135,20 @@ 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) { @@ -1109,11 +1114,10 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) //qApp->processEvents(); MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); Incidence *incidence = eventItem->incidence(); if ( incidence ) { + mBlockDeselect = true; mMonthView->showContextMenu( incidence ); - selection( item ); - doHighLight( incidence ); } } void MonthViewCell::selection( QListBoxItem *item ) |