author | zautrix <zautrix> | 2005-07-28 12:59:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-28 12:59:27 (UTC) |
commit | 8e21306a697d77c80d42f450a721cb3d7c23fd0f (patch) (side-by-side diff) | |
tree | a7eed1d0dafc2725709704a3658f1ff42b7d8b8b | |
parent | fee4c893fe8fd01af1b55c1ccd40213fc18a36b4 (diff) | |
download | kdepimpi-8e21306a697d77c80d42f450a721cb3d7c23fd0f.zip kdepimpi-8e21306a697d77c80d42f450a721cb3d7c23fd0f.tar.gz kdepimpi-8e21306a697d77c80d42f450a721cb3d7c23fd0f.tar.bz2 |
monv fix
-rw-r--r-- | korganizer/komonthview.cpp | 12 | ||||
-rw-r--r-- | korganizer/komonthview.h | 3 |
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 @@ -79,12 +79,13 @@ private: KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) : QListBox(parent, name, WRepaintNoErase) { #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); #endif + mBlockDeselect = false; mWT = new KNOWhatsThis(this); resetOnFocusIn = true; setVScrollBarMode(QScrollView::AlwaysOff); setHScrollBarMode(QScrollView::AlwaysOff); } KNoScrollListBox::~KNoScrollListBox() @@ -132,20 +133,24 @@ 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) { QListBoxItem* item = itemAt ( p ); if ( ! item ) { @@ -1107,15 +1112,14 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) } //selection( 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 ) { if ( !item ) { diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 61a141a..1a9d16d 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -84,13 +84,14 @@ class KNoScrollListBox: public QListBox void shiftDown(); void shiftUp(); void rightClick(); void nextCell(); void prevCell(); void highlightIncidence( Incidence * , MonthViewCell*, int ); - + protected: + bool mBlockDeselect; protected slots: void oneDown(); void keyPressEvent(QKeyEvent *); void keyReleaseEvent(QKeyEvent *); void mousePressEvent(QMouseEvent *); void focusInEvent ( QFocusEvent * ); |