From d7738fdfc685192eb2f8317db6ffad3c246001c8 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 24 Feb 2006 18:49:56 +0000 Subject: kapi sync --- (limited to 'korganizer') diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h index a69846c..ee17da8 100644 --- a/korganizer/journalentry.h +++ b/korganizer/journalentry.h @@ -56,6 +56,7 @@ class JournalEntry : public QFrame { void setVisibleMode( bool b ) { visibleMode = b;} void fillCalendar( int id = 0 ); void resizeEvent(QResizeEvent* e ) ; + KTextEdit * editor() {return mEditor;}; protected slots: void slotSaveTemplate(); void slotLoadTemplate(); 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 @@ #include #include "koprefs.h" #include +#include #include @@ -177,6 +178,7 @@ void KOJournalView::showList(QPtrList jl) JournalEntry* firstEntry = mEntry; int count = jl.count(); int iii = 0; + QWidget* fw = qApp->focusWidget (); while ( iii < count ) { if ( !mEntry ) { mEntry = getNewEntry(); @@ -187,11 +189,18 @@ void KOJournalView::showList(QPtrList jl) mEntry->show(); mEntry = 0; } else { + int xxx = -1, yyy = -1; + if ( ((QWidget*) mEntry->editor() ) == fw ) { + mEntry->editor()->getCursorPosition( &xxx,&yyy); + } mEntry->setVisibleMode( true ); mEntry->setDate(mDate); mEntry->setJournal(jl.at(iii), false); mEntry->setVisibleMode( true ); mEntry->show(); + if ( xxx > -1 && yyy > -1 ) { + mEntry->editor()->setCursorPosition( xxx, yyy ); + } mEntry = jEntries.next(); } ++iii; -- cgit v0.9.0.2