summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
authorzautrix <zautrix>2005-07-28 12:59:27 (UTC)
committer zautrix <zautrix>2005-07-28 12:59:27 (UTC)
commit8e21306a697d77c80d42f450a721cb3d7c23fd0f (patch) (unidiff)
treea7eed1d0dafc2725709704a3658f1ff42b7d8b8b /korganizer/komonthview.cpp
parentfee4c893fe8fd01af1b55c1ccd40213fc18a36b4 (diff)
downloadkdepimpi-8e21306a697d77c80d42f450a721cb3d7c23fd0f.zip
kdepimpi-8e21306a697d77c80d42f450a721cb3d7c23fd0f.tar.gz
kdepimpi-8e21306a697d77c80d42f450a721cb3d7c23fd0f.tar.bz2
monv fix
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp12
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
@@ -82,6 +82,7 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
82#ifndef DESKTOP_VERSION 82#ifndef DESKTOP_VERSION
83 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); 83 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
84#endif 84#endif
85 mBlockDeselect = false;
85 mWT = new KNOWhatsThis(this); 86 mWT = new KNOWhatsThis(this);
86 resetOnFocusIn = true; 87 resetOnFocusIn = true;
87 setVScrollBarMode(QScrollView::AlwaysOff); 88 setVScrollBarMode(QScrollView::AlwaysOff);
@@ -135,14 +136,18 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e )
135} 136}
136void KNoScrollListBox::focusOutEvent ( QFocusEvent * e ) 137void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
137{ 138{
139 if ( ! mBlockDeselect ) {
138 int i = currentItem (); 140 int i = currentItem ();
139 if ( i >= 0 ) { 141 if ( i >= 0 ) {
140 setSelected ( i, false ); 142 setSelected ( i, false );
141 } 143 }
142 QListBox::focusOutEvent ( e ); 144 QListBox::focusOutEvent ( e );
145 }
143 setVScrollBarMode(QScrollView::AlwaysOff); 146 setVScrollBarMode(QScrollView::AlwaysOff);
144 setHScrollBarMode(QScrollView::AlwaysOff); 147 setHScrollBarMode(QScrollView::AlwaysOff);
145 emit highlightIncidence( 0, (MonthViewCell*)this, 0 ); 148 if ( ! mBlockDeselect )
149 emit highlightIncidence( 0, (MonthViewCell*)this, 0 );
150 mBlockDeselect = false;
146} 151}
147 152
148QString KNoScrollListBox::getWhatsThisText(QPoint p) 153QString KNoScrollListBox::getWhatsThisText(QPoint p)
@@ -1110,9 +1115,8 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
1110 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 1115 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
1111 Incidence *incidence = eventItem->incidence(); 1116 Incidence *incidence = eventItem->incidence();
1112 if ( incidence ) { 1117 if ( incidence ) {
1118 mBlockDeselect = true;
1113 mMonthView->showContextMenu( incidence ); 1119 mMonthView->showContextMenu( incidence );
1114 selection( item );
1115 doHighLight( incidence );
1116 } 1120 }
1117} 1121}
1118 1122