summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 38bd93a..042a789 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -765,2 +765,20 @@ void KOAgendaItem::addConflictItem(KOAgendaItem *ci)
mConflictItems.append(ci);
}
+
+bool KOAgendaItem::checkLayout()
+{
+ if ( !mConflictItems.count() )
+ return true;
+ int max = 0;
+ KOAgendaItem *item;
+ for ( item=mConflictItems.first(); item != 0;
+ item=mConflictItems.next() ) {
+ if ( item->subCells() > max )
+ max = item->subCells();
+ }
+ if ( max > subCells() ) {
+ setSubCells( max );
+ return false;
+ }
+ return true;
+}