branchobj.cpp
changeset 735 84ae10f6e3a3
parent 730 0594d7b7099d
child 738 716a777c1c98
     1.1 --- a/branchobj.cpp	Thu Jan 15 00:52:35 2009 +0000
     1.2 +++ b/branchobj.cpp	Tue Jan 20 15:23:16 2009 +0000
     1.3 @@ -1080,7 +1080,7 @@
     1.4  	bo->depth=depth+1;
     1.5  	bo->setDefAttr(MovedBranch);
     1.6  	if (scrolled) tmpUnscroll();
     1.7 -	setLastSelectedBranch (bo);
     1.8 +	//setLastSelectedBranch (bo);	//FIXME needed?
     1.9  	return bo;
    1.10  }
    1.11  
    1.12 @@ -1114,7 +1114,7 @@
    1.13  	bo->depth=depth+1;
    1.14  	bo->setDefAttr (MovedBranch);
    1.15  	if (scrolled) tmpUnscroll();
    1.16 -	setLastSelectedBranch (bo);
    1.17 +	//setLastSelectedBranch (bo); //FIXME needed?
    1.18  	qSort (branch.begin(),branch.end(), isAbove);
    1.19  	return bo;
    1.20  }
    1.21 @@ -1167,6 +1167,7 @@
    1.22  
    1.23  void BranchObj::setLastSelectedBranch (BranchObj* bo)
    1.24  {
    1.25 +	cout << "BO::setLastSelectedBranch for "<<getHeading().toStdString()<<endl;
    1.26      lastSelectedBranch=branch.indexOf(bo);
    1.27  }
    1.28  
    1.29 @@ -1554,7 +1555,7 @@
    1.30  	bboxTotal.setHeight(max (r.height(),  bbox.height()));
    1.31  }
    1.32  
    1.33 -void BranchObj::select()
    1.34 +void BranchObj::select()	// FIXME try to get rid of this in BO completely
    1.35  {
    1.36  	// update NoteEditor
    1.37  	textEditor->setText(note.getNote() );
    1.38 @@ -1569,10 +1570,7 @@
    1.39  	// set selected and visible
    1.40      LinkableMapObj::select();
    1.41  
    1.42 -	// Tell parent that I am selected now:
    1.43 -	BranchObj* po=(BranchObj*)(parObj);
    1.44 -    if (po)	// TODO	    Try to get rid of this cast...
    1.45 -        po->setLastSelectedBranch(this);
    1.46 +    //if (po)	po->setLastSelectedBranch(this);
    1.47  		
    1.48  	// temporary unscroll, if we have scrolled parents somewhere
    1.49  	if (parObj) ((BranchObj*)(parObj))->tmpUnscroll();