From ff5ec803a39b225e03edcd1bf2df3198dafcc16e Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 12 Apr 2014 23:19:02 +0200 Subject: Added last and first attributes to index tree node --- src/template.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/template.cpp b/src/template.cpp index 2590486..64d3523 100644 --- a/src/template.cpp +++ b/src/template.cpp @@ -2075,7 +2075,14 @@ void TemplateContextImpl::addIndexEntry(const QCString &indexName,const QValueLi { entry->set((*it).key,(*it).value); } + if (list->count()>0) + { + TemplateStruct *lastEntry = dynamic_cast(list->at(list->count()-1).toStruct()); + lastEntry->set("last",false); + } entry->set("is_leaf_node",true); + entry->set("first",list->count()==0); + entry->set("last",true); stack->push(new TemplateVariant(entry)); list->append(entry); } -- cgit v0.12