summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneral.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp13
1 files changed, 9 insertions, 4 deletions
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()
{