summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp21
-rw-r--r--korganizer/mainwindow.cpp12
2 files changed, 21 insertions, 12 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 3ab4bb4..a76f2ed 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -372,3 +372,3 @@ void CalendarView::init()
mBlockShowDates = false;
-
+ mConflictingEvent = 0;
mDatePickerMode = 0;
@@ -2795,5 +2795,6 @@ void CalendarView::checkConflictForEvent()
if ( ! mConflictingEvent ) return;
+ Event * conflictingEvent = mConflictingEvent;
+ mConflictingEvent = 0;
QDateTime current = QDateTime::currentDateTime();
- if ( ! mConflictingEvent->matchTime( &current, 0 ) ) {
- mConflictingEvent = 0;
+ if ( ! conflictingEvent->matchTime( &current, 0 ) ) {
return;
@@ -2815,3 +2816,3 @@ void CalendarView::checkConflictForEvent()
if ( !skip && !test->doesFloat() ) {
- if ( mConflictingEvent->isOverlapping ( test, &retVal, &current ) ) {
+ if ( conflictingEvent->isOverlapping ( test, &retVal, &current ) ) {
if ( ! found ) {
@@ -2832,3 +2833,3 @@ void CalendarView::checkConflictForEvent()
if ( found ) {
- QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( mConflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ;
+ QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ;
qApp->processEvents();
@@ -2844,6 +2845,5 @@ void CalendarView::checkConflictForEvent()
mViewManager->agendaView()->setStartHour( hour );
- topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( mConflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) );
+ topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( conflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) );
} else
topLevelWidget()->setCaption( i18n("No conflict found") );
- mConflictingEvent = 0;
return;
@@ -4094,8 +4094,9 @@ void CalendarView::setModified(bool modified)
{
+ //qDebug("CalendarView::setModified %d ", modified);
if ( modified )
emit signalmodified();
- if (mModified != modified) {
- mModified = modified;
+ mModified = modified;
+ if ( mModified )
emit modifiedChanged(mModified);
- }
+
}
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 279955f..77d0ac8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1916,2 +1916,6 @@ void MainWindow::slotModifiedChanged( bool )
int msec;
+ if ( mCalendarModifiedFlag ) {
+ //qDebug(" MainWindow timer is running ");
+ return;
+ }
// we store the changes after 1 minute,
@@ -1977,4 +1981,5 @@ void MainWindow::save()
}
- if ( mSyncManager->blockSave() )
+ if ( mSyncManager->blockSave() ) {
return;
+ }
mSyncManager->setBlockSave(true);
@@ -2003,4 +2008,7 @@ void MainWindow::save()
qDebug(savemes);
- } else
+ } else {
setCaption(i18n("Saving cancelled!"));
+ mCalendarModifiedFlag = false;
+ slotModifiedChanged( true );
+ }
mSyncManager->setBlockSave( false );