From 4c19ba3345d1af263c02ebe564e56d9dec679347 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 30 Jun 2005 12:37:10 +0000 Subject: fixx --- (limited to 'korganizer/journalentry.cpp') diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index 9e2c902..ca8d5f7 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp @@ -162,8 +162,8 @@ void JournalEntry::slotLoadTemplate() void JournalEntry::setDate(const QDate &date) { showOnlyMode = false; - mDate = date; writeJournal(); + mDate = date; int id = mCalendar->defaultCalendar(); QString calname = KOPrefs::instance()->getCalendar( id )->mName; mTitleLabel->setText( " (" + calname +")"); @@ -179,13 +179,20 @@ void JournalEntry::toggleShowJournal() // we have to protect mJournal from deleting if mJournal has empty text visibleMode = false; // set to true via :setShowOnly() emit showJournalOnly( mJournal ); + //QTimer::singleShot( 0, this, SLOT( setVisibleOn() ) ); } } +void JournalEntry::setVisibleOn() +{ + visibleMode = true; +} void JournalEntry::setShowOnly() { showOnlyMode = true; - mEditor->setFocus(); - visibleMode = true; + if ( mTitle->text().isEmpty() ) + mTitle->setFocus(); + else + mEditor->setFocus(); } void JournalEntry::setJournal(Journal *journal) { -- cgit v0.9.0.2