diff -r 6e4b586aa88a -r 25e634a7e1dc branchitem.cpp --- a/branchitem.cpp Wed Jun 03 20:37:17 2009 +0000 +++ b/branchitem.cpp Mon Jun 08 11:36:56 2009 +0000 @@ -7,7 +7,7 @@ using namespace std; -BranchItem::BranchItem(const QList &data, TreeItem *parent):TreeItem (data,parent) +BranchItem::BranchItem(const QList &data, MapItem *parent):MapItem (data,parent) { //cout << "Constr. BranchItem\n"; @@ -18,7 +18,7 @@ BranchItem::~BranchItem() { - //cout << "Destr. BranchItem "<saveToDir (tmpdir,prefix); -*/ + // Save Images + for (int i=0; isaveToDir (tmpdir,prefix); // save note if (!note.isEmpty() ) @@ -310,15 +307,19 @@ if (getBranchObj()->isInClickBox (p) && (this != excludeTI) && getBranchObj()->isVisibleObj() ) return this; -/* FIXME-2 // Search float images - for (int i=0; iisInClickBox(p) && - (floatimage.at(i) != excludeTI) && - floatimage.at(i)->getParObj()!= excludeTI && - floatimage.at(i)->isVisibleObj() - ) return floatimage.at(i)->getTreeItem(); -*/ - return NULL; + // Search images + ImageItem *ii; + for (int i=0; igetLMO(); + if (mo && mo->isInClickBox(p) && + (ii != excludeTI) && + this!= excludeTI && + mo->isVisibleObj() + ) return ii; + } + return NULL; } TreeItem* BranchItem::findID (QString sid) @@ -353,7 +354,7 @@ if (lmo) { - lmo->setParObj (parentItem->getLMO() ); + lmo->setParObj ( ((MapItem*)parentItem)->getLMO() ); } } @@ -375,9 +376,9 @@ newbo->setFrameType (FrameObj::Rectangle); } else { - newbo->setParObj(parentItem->getLMO() ); + newbo->setParObj( ((MapItem*)parentItem)->getLMO() ); // Set visibility depending on parents - if (((BranchItem*)parentItem)->scrolled || !parentItem->getLMO()->isVisibleObj() ) + if (((BranchItem*)parentItem)->scrolled || !((MapItem*)parentItem)->getLMO()->isVisibleObj() ) newbo->setVisibility (false); } newbo->setDefAttr(BranchObj::NewBranch);