author | zautrix <zautrix> | 2005-04-06 09:41:54 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-06 09:41:54 (UTC) |
commit | 03c5656deeec67eefcefb4faa1bfc9a9bc3254ef (patch) (side-by-side diff) | |
tree | b514080a9b5256373967602d3a0ec41c68a70126 | |
parent | cf4848d972efe96640f2d5f5d52704306d0cbe4c (diff) | |
download | kdepimpi-03c5656deeec67eefcefb4faa1bfc9a9bc3254ef.zip kdepimpi-03c5656deeec67eefcefb4faa1bfc9a9bc3254ef.tar.gz kdepimpi-03c5656deeec67eefcefb4faa1bfc9a9bc3254ef.tar.bz2 |
focus fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 13 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.h | 3 | ||||
-rw-r--r-- | korganizer/koeventeditor.cpp | 1 |
4 files changed, 15 insertions, 6 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 524f6fc..c598214 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,5 +1,9 @@ Info about the changes in new versions of KDE-Pim/Pi +********** VERSION 2.0.25 ************ + +And again fixed some bugs. + ********** VERSION 2.0.24 ************ Fixed again a lot of small bugs. diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index abc80d4..f54660f 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -59,6 +59,7 @@ KOEditorGeneral::KOEditorGeneral(QObject* parent, const char* name) : QObject( parent, name) { + mNextFocus = 0; } KOEditorGeneral::~KOEditorGeneral() @@ -105,15 +106,19 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) } void KOEditorGeneral::setFocusOn( int i ) { - qApp->processEvents(); - if ( i == 1 ) { + mNextFocus = i; + QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() )); +} +void KOEditorGeneral::slotSetFocusOn() +{ + mNextFocus; + if ( mNextFocus == 1 ) { mDescriptionEdit->setFocus(); mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); } - if ( i == 2 ) { + if ( mNextFocus == 2 ) { mSummaryEdit->setFocus(); } - } void KOEditorGeneral::editCategories() { diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index f4728c7..2069e9c 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h @@ -81,12 +81,13 @@ class KOEditorGeneral : public QObject void alarmDisable( bool disable ); void pickAlarmSound(); void pickAlarmProgram(); - + void slotSetFocusOn(); signals: void openCategoryDialog(); void allAccepted(); protected: + int mNextFocus; //QLineEdit *mSummaryEdit; //QLineEdit *mLocationEdit; KOLocationBox *mSummaryEdit; diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index 337db9b..e23e680 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp @@ -186,7 +186,6 @@ void KOEventEditor::editEvent(Event *event, bool showDescription) mEvent = event; readEvent(mEvent); - qApp->processEvents(); if ( showDescription ) { showPage( 1 ); mGeneral->setFocusOn( 1 ); |