summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp12
-rw-r--r--korganizer/komonthview.h3
2 files changed, 10 insertions, 5 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 4aeb20c..8d06040 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -83,4 +83,5 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
#endif
+ mBlockDeselect = false;
mWT = new KNOWhatsThis(this);
resetOnFocusIn = true;
@@ -136,12 +137,16 @@ 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;
}
@@ -1111,7 +1116,6 @@ void MonthViewCell::contextMenu( QListBoxItem *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
@@ -88,5 +88,6 @@ class KNoScrollListBox: public QListBox
void prevCell();
void highlightIncidence( Incidence * , MonthViewCell*, int );
-
+ protected:
+ bool mBlockDeselect;
protected slots:
void oneDown();