-rw-r--r-- | korganizer/koagendaitem.cpp | 18 |
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 @@ -761,6 +761,24 @@ void KOAgendaItem::setConflictItems(QPtrList<KOAgendaItem> ci) 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; +} |