[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise/kdepim/korganizer
From: Sergio Luis Martins <iamsergio () gmail ! com>
Date: 2010-10-20 17:47:46
Message-ID: 20101020174746.44B27AC897 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1187906 by smartins:
Fixes "Parallel events in the agenda view: last changed events are always on the right side"
Fixes kolab/issue4113
MERGE: trunk
M +6 -3 koagenda.cpp
M +2 -2 koagenda.h
M +10 -4 koagendaview.cpp
M +1 -1 koagendaview.h
--- branches/kdepim/enterprise/kdepim/korganizer/koagenda.cpp #1187905:1187906
@@ -1848,7 +1848,7 @@
marcus_bains();
}
-void KOAgenda::removeIncidence( Incidence *incidence )
+void KOAgenda::removeIncidence( Incidence *incidence, bool relayoutNeighbours )
{
// First find all items to be deleted and store them
// in its own list. Otherwise removeAgendaItem will reset
@@ -1865,7 +1865,7 @@
}
for ( it = itemsToRemove.begin(); it != itemsToRemove.end(); ++it ) {
- removeAgendaItem( *it );
+ removeAgendaItem( *it, relayoutNeighbours );
}
}
@@ -1885,7 +1885,7 @@
agendaItem->show();
}
-bool KOAgenda::removeAgendaItem( KOAgendaItem::GPtr item )
+bool KOAgenda::removeAgendaItem( KOAgendaItem::GPtr item, bool relayoutNeighbours )
{
// we found the item. Let's remove it and update the conflicts
bool taken = false;
@@ -1899,12 +1899,15 @@
taken = true;
}
+ if ( relayoutNeighbours ) {
for ( it = conflictItems.begin(); it != conflictItems.end(); ++it ) {
// the item itself is also in its own conflictItems list!
if ( *it != thisItem ) {
placeSubCells( *it );
}
}
+ }
+
mItemsToDelete.append( thisItem );
QTimer::singleShot( 0, this, SLOT( deleteItemsToDelete() ) );
return taken;
--- branches/kdepim/enterprise/kdepim/korganizer/koagenda.h #1187905:1187906
@@ -122,7 +122,7 @@
* This function removes the items from the view, but doesn't delete them immediately.
* Instead, they are queued in mItemsToDelete and later deleted by
* the slot deleteItemsToDelete() (called by QTimer::singleShot ) */
- void removeIncidence( Incidence *incidence );
+ void removeIncidence( Incidence *incidence, bool relayoutNeighbours = true );
void changeColumns( int columns );
@@ -175,7 +175,7 @@
Select the item associated with a given uid. Linear search, use carefully.
*/
void selectItemByUID( const QString& uid );
- bool removeAgendaItem( KOAgendaItem::GPtr item );
+ bool removeAgendaItem( KOAgendaItem::GPtr item, bool relayoutNeighbours = true );
void showAgendaItem( KOAgendaItem::GPtr item );
signals:
--- branches/kdepim/enterprise/kdepim/korganizer/koagendaview.cpp #1187905:1187906
@@ -1180,7 +1180,13 @@
case KOGlobals::INCIDENCEEDITED:
{
if ( mAllowAgendaUpdate ) {
- removeIncidence( incidence );
+ /**
+ * No need to relayout neighbours, if we do, they will be re-placed
+ * and occupy the space where the item we're deleting && re-adding is.
+ * Fixes: https://issues.kolab.org/issue4113
+ * "Parallel events in the agenda view: last changed events are always on the right side"
+ **/
+ removeIncidence( incidence, false /** relayout neighbours */ );
changeIncidenceDisplayAdded( incidence );
}
updateEventIndicators();
@@ -1600,10 +1606,10 @@
mAllDayAgenda->finishTypeAhead();
}
-void KOAgendaView::removeIncidence( Incidence *incidence )
+void KOAgendaView::removeIncidence( Incidence *incidence, bool relayoutNeighbours )
{
- mAgenda->removeIncidence( incidence );
- mAllDayAgenda->removeIncidence( incidence );
+ mAgenda->removeIncidence( incidence, relayoutNeighbours );
+ mAllDayAgenda->removeIncidence( incidence, relayoutNeighbours );
}
void KOAgendaView::updateEventIndicators()
--- branches/kdepim/enterprise/kdepim/korganizer/koagendaview.h #1187905:1187906
@@ -229,7 +229,7 @@
*/
void setHolidayMasks();
- void removeIncidence( Incidence * );
+ void removeIncidence( Incidence *, bool relayoutIncidence = true );
/**
Updates the event indicators after a certain incidence was modified or
removed.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic