summaryrefslogtreecommitdiffabout
path: root/korganizer/kojournalview.cpp
Unidiff
Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kojournalview.cpp9
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
@@ -37,6 +37,7 @@
37#include <kdebug.h> 37#include <kdebug.h>
38#include "koprefs.h" 38#include "koprefs.h"
39#include <kglobal.h> 39#include <kglobal.h>
40#include <ktextedit.h>
40 41
41#include <libkcal/calendar.h> 42#include <libkcal/calendar.h>
42 43
@@ -177,6 +178,7 @@ void KOJournalView::showList(QPtrList<Journal> jl)
177 JournalEntry* firstEntry = mEntry; 178 JournalEntry* firstEntry = mEntry;
178 int count = jl.count(); 179 int count = jl.count();
179 int iii = 0; 180 int iii = 0;
181 QWidget* fw = qApp->focusWidget ();
180 while ( iii < count ) { 182 while ( iii < count ) {
181 if ( !mEntry ) { 183 if ( !mEntry ) {
182 mEntry = getNewEntry(); 184 mEntry = getNewEntry();
@@ -187,11 +189,18 @@ void KOJournalView::showList(QPtrList<Journal> jl)
187 mEntry->show(); 189 mEntry->show();
188 mEntry = 0; 190 mEntry = 0;
189 } else { 191 } else {
192 int xxx = -1, yyy = -1;
193 if ( ((QWidget*) mEntry->editor() ) == fw ) {
194 mEntry->editor()->getCursorPosition( &xxx,&yyy);
195 }
190 mEntry->setVisibleMode( true ); 196 mEntry->setVisibleMode( true );
191 mEntry->setDate(mDate); 197 mEntry->setDate(mDate);
192 mEntry->setJournal(jl.at(iii), false); 198 mEntry->setJournal(jl.at(iii), false);
193 mEntry->setVisibleMode( true ); 199 mEntry->setVisibleMode( true );
194 mEntry->show(); 200 mEntry->show();
201 if ( xxx > -1 && yyy > -1 ) {
202 mEntry->editor()->setCursorPosition( xxx, yyy );
203 }
195 mEntry = jEntries.next(); 204 mEntry = jEntries.next();
196 } 205 }
197 ++iii; 206 ++iii;