mapeditor.cpp
branchrelease-1-12-maintained
changeset 72 b4f008d1ea01
parent 66 c4893070033f
child 74 98449ef9eccd
     1.1 --- a/mapeditor.cpp	Wed Apr 08 12:02:07 2009 +0000
     1.2 +++ b/mapeditor.cpp	Fri Jul 24 08:55:40 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  			{