1.1 --- a/branchitem.cpp Mon May 18 11:22:41 2009 +0000
1.2 +++ b/branchitem.cpp Wed May 20 15:40:14 2009 +0000
1.3 @@ -18,7 +18,7 @@
1.4
1.5 BranchItem::~BranchItem()
1.6 {
1.7 -// cout << "Destr. BranchItem "<<getHeadingStd()<<endl;
1.8 + //cout << "Destr. BranchItem "<<getHeadingStd()<<endl;
1.9 if (lmo)
1.10 {
1.11 delete lmo;
1.12 @@ -205,8 +205,6 @@
1.13
1.14 bool BranchItem::toggleScroll()
1.15 {
1.16 -
1.17 - if (!branchCount()>0) return false;
1.18 BranchObj *bo=NULL;
1.19 if (scrolled)
1.20 {
1.21 @@ -220,7 +218,6 @@
1.22 if (bo) bo->setVisibility(true);
1.23 }
1.24 }
1.25 - model->reposition();
1.26 } else
1.27 {
1.28 scrolled=true;
1.29 @@ -234,6 +231,7 @@
1.30 }
1.31 }
1.32 }
1.33 + model->reposition(); // FIXME-3 we don't really want to update view from here...
1.34 return true;
1.35 }
1.36
1.37 @@ -350,9 +348,12 @@
1.38 // Initialize BranchObj, order of things is important...
1.39 BranchObj* newbo=new BranchObj(scene);
1.40 lmo=newbo;
1.41 - newbo->setParObj(parent()->getLMO() );
1.42 + BranchObj* parbo=(BranchObj*)(parentItem->getLMO());
1.43 + newbo->setParObj(parbo);
1.44 newbo->setTreeItem (this);
1.45 newbo->setDefAttr(BranchObj::NewBranch);
1.46 + if (((BranchItem*)parentItem)->scrolled || !parbo->isVisibleObj() )
1.47 + newbo->setVisibility (false);
1.48
1.49 initLMO();
1.50