mapeditor.cpp
branchrelease-1-12-maintained
changeset 70 e3a85616dbc5
parent 66 c4893070033f
child 74 98449ef9eccd
     1.1 --- a/mapeditor.cpp	Wed May 06 11:06:17 2009 +0000
     1.2 +++ b/mapeditor.cpp	Wed Jul 22 11:47:03 2009 +0000
     1.3 @@ -4973,6 +4973,10 @@
     1.4  			copyingObj=false;	
     1.5  			if (dst ) 
     1.6  			{
     1.7 +				// Don't unscroll if relinked to a scrolled parent, but
     1.8 +				// select parent instead
     1.9 +				bool selectParent=false;
    1.10 +
    1.11  				// We have a destination, relink to that
    1.12  
    1.13  				BranchObj* bsel=xelection.getBranch();
    1.14 @@ -4994,6 +4998,7 @@
    1.15  					bsel->linkTo ( (BranchObj*)(bdst->getParObj()), bdst->getNum()+1);
    1.16  				} else	
    1.17  				{	// Append to dst
    1.18 +					if (bdst->isScrolled()) selectParent=true;
    1.19  					preDstParStr=model->getSelectString(dst);
    1.20  					bsel->linkTo (bdst,-1);
    1.21  					if (dst->getDepth()==0) bsel->move (savePos);
    1.22 @@ -5014,6 +5019,8 @@
    1.23  					preSelStr, redoCom,
    1.24  					QString("Relink %1 to %2").arg(getName(bsel)).arg(getName(dst)) );
    1.25  
    1.26 +				if (selectParent) select (bdst);
    1.27 +
    1.28  				model->reposition();	// not necessary if we undo temporary move  below
    1.29  			} else
    1.30  			{