From 4a9bf75c2ef12a40be3aea1d147f3703aee48638 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 23 Feb 2005 21:53:18 +0000 Subject: morelayout fixes --- (limited to 'korganizer/koagendaitem.cpp') diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 38bd93a..042a789 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -764,3 +764,21 @@ void KOAgendaItem::addConflictItem(KOAgendaItem *ci) if (mConflictItems.find(ci)<0) 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; +} -- cgit v0.9.0.2