diff -r bf3ea1f1520b -r 59614eaf5fbb treeitem.cpp --- a/treeitem.cpp Tue Apr 28 20:53:44 2009 +0000 +++ b/treeitem.cpp Wed Apr 29 18:46:31 2009 +0000 @@ -5,12 +5,13 @@ #include "branchobj.h" #include "branchitem.h" +#include "mapcenteritem.h" #include "vymmodel.h" using namespace std; -TreeItem::TreeItem(const QList &data, TreeItem *parent) +TreeItem::TreeItem(const QList &data, TreeItem *parent):MapItem() { init(); parentItem = parent; @@ -46,7 +47,6 @@ parentItem = NULL; itemData.clear(); - lmo=NULL; branchOffset=0; branchCounter=0; @@ -60,8 +60,6 @@ // Reset ID objID=""; - - } QString TreeItem::saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset) @@ -377,41 +375,6 @@ parentItem->lastSelectedBranchNum=parentItem->childItems.indexOf(this); } -TreeItem* TreeItem::findBySelectString (const QString &s) //FIXME-1 -{ -/* - LinkableMapObj *lmo=this; - QString part; - QString typ; - QString num; - while (!s.isEmpty() ) - { - part=s.section(",",0,0); - typ=part.left (3); - num=part.right(part.length() - 3); - if (typ=="mc:") - { - if (depth>0) - return false; // in a subtree there is no center - else - break; - } else - if (typ=="bo:") - lmo=lmo->getTreeItem()->getBranchObjNum (num.toInt()); - else - if (typ=="fi:") - lmo=((BranchObj*)lmo)->getFloatImageNum (num.toUInt()); - if (!lmo) break; - - if (s.contains(",")) - s=s.right(s.length() - part.length() -1 ); - else - break; - } - */ - return NULL; -} - void TreeItem::setLastSelectedBranch(int i) { lastSelectedBranchNum=i; @@ -510,13 +473,4 @@ } -LinkableMapObj* TreeItem::getLMO() // FIXME-3 VM should be unnecessary in the end -{ - return lmo; -} -void TreeItem::setLMO(LinkableMapObj *l) -{ - lmo=l; -} -