[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim/KDE/4.11] calendarviews/agenda: Fix DnD of events from the all day area.
From:       Sergio Martins <iamsergio () gmail ! com>
Date:       2013-09-30 16:57:34
Message-ID: E1VQgms-0001TL-Ma () scm ! kde ! org
[Download RAW message or body]

Git commit b38afa6ac35d6baf158892addab71e361b4e34ae by Sergio Martins.
Committed on 30/09/2013 at 16:54.
Pushed by smartins into branch 'KDE/4.11'.

Fix DnD of events from the all day area.

Only multi-agenda has collectionId() != -1. This is a simple
drag case, where we preserve the collection, we just turn off
the all day property.

M  +1    -1    calendarviews/agenda/agendaview.cpp

http://commits.kde.org/kdepim/b38afa6ac35d6baf158892addab71e361b4e34ae

diff --git a/calendarviews/agenda/agendaview.cpp b/calendarviews/agenda/agendaview.cpp
index d12d8e8..c9e1cc2 100644
--- a/calendarviews/agenda/agendaview.cpp
+++ b/calendarviews/agenda/agendaview.cpp
@@ -1941,7 +1941,7 @@ void AgendaView::slotIncidencesDropped( const KCalCore::Incidence::List &inciden
   Q_FOREACH ( const KCalCore::Incidence::Ptr &incidence, incidences ) {
     const Akonadi::Item existingItem = calendar()->item( incidence );
     const bool existsInSameCollection = existingItem.isValid() &&
-                                               existingItem.storageCollectionId() == collectionId();
+                                               ( existingItem.storageCollectionId() == collectionId() || \
collectionId() == -1 );  
     if ( existingItem.isValid() && existsInSameCollection ) {
       KCalCore::Incidence::Ptr newIncidence = existingItem.payload<KCalCore::Incidence::Ptr>();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic