[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim/KDE/4.11] calendarviews/agenda: Ignore the drop when dropping in the same place as the origi
From: Sergio Martins <iamsergio () gmail ! com>
Date: 2013-09-30 17:03:39
Message-ID: E1VQgsl-0007nZ-28 () scm ! kde ! org
[Download RAW message or body]
Git commit b9b7bfe671a28874599e6b41a53289f969db94fa by Sergio Martins.
Committed on 30/09/2013 at 17:01.
Pushed by smartins into branch 'KDE/4.11'.
Ignore the drop when dropping in the same place as the origin.
Because dates remain the same.
M +6 -0 calendarviews/agenda/agendaview.cpp
http://commits.kde.org/kdepim/b9b7bfe671a28874599e6b41a53289f969db94fa
diff --git a/calendarviews/agenda/agendaview.cpp b/calendarviews/agenda/agendaview.cpp
index c9e1cc2..9adaab0 100644
--- a/calendarviews/agenda/agendaview.cpp
+++ b/calendarviews/agenda/agendaview.cpp
@@ -1946,6 +1946,12 @@ void AgendaView::slotIncidencesDropped( const KCalCore::Incidence::List &inciden
if ( existingItem.isValid() && existsInSameCollection ) {
KCalCore::Incidence::Ptr newIncidence = existingItem.payload<KCalCore::Incidence::Ptr>();
KCalCore::Incidence::Ptr oldIncidence( newIncidence->clone() );
+
+ if ( newIncidence->dtStart() == newTime ) {
+ // Nothing changed
+ continue;
+ }
+
newIncidence->setAllDay( allDay );
newIncidence->setDateTime( newTime, KCalCore::Incidence::RoleDnD );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic