-rw-r--r-- | korganizer/kojournalview.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index a23a3b2..406df5a 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -38,4 +38,5 @@ #include "koprefs.h" #include <kglobal.h> +#include <ktextedit.h> #include <libkcal/calendar.h> @@ -178,4 +179,5 @@ void KOJournalView::showList(QPtrList<Journal> jl) int count = jl.count(); int iii = 0; + QWidget* fw = qApp->focusWidget (); while ( iii < count ) { if ( !mEntry ) { @@ -188,4 +190,8 @@ void KOJournalView::showList(QPtrList<Journal> jl) mEntry = 0; } else { + int xxx = -1, yyy = -1; + if ( ((QWidget*) mEntry->editor() ) == fw ) { + mEntry->editor()->getCursorPosition( &xxx,&yyy); + } mEntry->setVisibleMode( true ); mEntry->setDate(mDate); @@ -193,4 +199,7 @@ void KOJournalView::showList(QPtrList<Journal> jl) mEntry->setVisibleMode( true ); mEntry->show(); + if ( xxx > -1 && yyy > -1 ) { + mEntry->editor()->setCursorPosition( xxx, yyy ); + } mEntry = jEntries.next(); } |