From 701cd3c2b2b713c12797f5bda24c35d3a7889539 Mon Sep 17 00:00:00 2001 From: zautrix Date: Tue, 05 Oct 2004 08:32:25 +0000 Subject: warning dialog fixes --- (limited to 'korganizer/calendarview.cpp') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index fecc7e2..687943e 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1523,15 +1523,28 @@ bool CalendarView::openCalendar(QString filename, bool merge) } else { // while failing to load, the calendar object could // have become partially populated. Clear it out. - if ( !merge ) mCalendar->close(); + if ( !merge ) { + mCalendar->close(); + mViewManager->setDocumentId( filename ); + mDialogManager->setDocumentId( filename ); + mTodoList->setDocumentId( filename ); + } - KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); + //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); + QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); globalFlagBlockAgenda = 2; + mCalendar->reInitAlarmSettings(); + setSyncEventsReadOnly(); + updateUnmanagedViews(); updateView(); } return false; } +void CalendarView::showOpenError() +{ + KMessageBox::error(this,i18n("Couldn't load calendar\n.")); +} void CalendarView::setLoadedFileVersion(QDateTime dt) { loadedFileVersion = dt; -- cgit v0.9.0.2