More work on removing Selection class
authorinsilmaril
Thu, 22 Jan 2009 11:39:53 +0000
changeset 73621f115d48daf
parent 735 84ae10f6e3a3
child 737 53e51e8d47e7
More work on removing Selection class
mapeditor.cpp
version.h
vymmodel.cpp
xml-vym.cpp
     1.1 --- a/mapeditor.cpp	Tue Jan 20 15:23:16 2009 +0000
     1.2 +++ b/mapeditor.cpp	Thu Jan 22 11:39:53 2009 +0000
     1.3 @@ -835,7 +835,7 @@
     1.4              }
     1.5  		}
     1.6  	
     1.7 -		if (model->selectionType() == Selection::Branch )
     1.8 +		if (model->selectionType() == TreeItem::Branch )
     1.9  		{	// A branch was moved
    1.10  			
    1.11  			// save the position in case we link to mapcenter
     2.1 --- a/version.h	Tue Jan 20 15:23:16 2009 +0000
     2.2 +++ b/version.h	Thu Jan 22 11:39:53 2009 +0000
     2.3 @@ -7,7 +7,7 @@
     2.4  #define __VYM_VERSION "1.13.0"
     2.5  //#define __VYM_CODENAME "Codename: RC-1"
     2.6  #define __VYM_CODENAME "Codename: development version"
     2.7 -#define __VYM_BUILD_DATE "2009-01-20"
     2.8 +#define __VYM_BUILD_DATE "2009-01-22"
     2.9  
    2.10  
    2.11  bool checkVersion(const QString &);
     3.1 --- a/vymmodel.cpp	Tue Jan 20 15:23:16 2009 +0000
     3.2 +++ b/vymmodel.cpp	Thu Jan 22 11:39:53 2009 +0000
     3.3 @@ -1499,12 +1499,13 @@
     3.4  			QString("Set heading of %1 to \"%2\"").arg(getObjectName(sel)).arg(s) );
     3.5  		sel->setHeading(s );
     3.6  		/* FIXME testing only
     3.7 -		TreeItem *ti=getSelectedBranchItem();
     3.8 +		*/
     3.9 +		TreeItem *ti=getSelectedTreeItem();
    3.10  		if (ti)
    3.11  		{
    3.12  			ti->setHeading (s);
    3.13  			//FIXME VM ix is wrong ModelIndex below, ix2 is (hopefully) correct:
    3.14 -			QModelIndex ix=index( ti->row(), ti->column(), index (0,0,QModelIndex()) );
    3.15 +			//QModelIndex ix=index( ti->row(), ti->column(), index (0,0,QModelIndex()) );
    3.16  			//FIXME VM testing only cout <<"VM::setHeading  s="<<s.toStdString()<<"  ti="<<ti<<"  r,c=("<<ti->row()<<","<<ti->column()<<")"<<endl;
    3.17  			QModelIndex ix2=index (ti);
    3.18  			emit (dataChanged ( ix2,ix2));
    3.19 @@ -1516,7 +1517,6 @@
    3.20  
    3.21  		//cout <<"                (r,c)=("<<ix2.row()<<","<<ix2.column()<<")"<<endl;
    3.22  
    3.23 -		*/
    3.24  		reposition();
    3.25  		selection.update();
    3.26  		ensureSelectionVisible();
    3.27 @@ -4937,11 +4937,8 @@
    3.28  				// Mainbranch, return 
    3.29  				s= "bo:" + QString("%1").arg(((BranchObj*)lmo)->getNum());
    3.30  			else	
    3.31 -			{
    3.32 -				cout << "VM::getSelectString  lmo="<<lmo<<"  d="<<lmo->getDepth()<<"  s="<<s.toStdString()<<"  h="<<((BranchObj*)lmo)->getHeading().toStdString()<<endl;
    3.33  				// Branch, call myself recursively
    3.34  				s= getSelectString(par) + ",bo:" + QString("%1").arg(((BranchObj*)lmo)->getNum());
    3.35 -			}
    3.36  		} else
    3.37  		{
    3.38  			// MapCenter
     4.1 --- a/xml-vym.cpp	Tue Jan 20 15:23:16 2009 +0000
     4.2 +++ b/xml-vym.cpp	Thu Jan 22 11:39:53 2009 +0000
     4.3 @@ -35,13 +35,13 @@
     4.4  {
     4.5      QColor col;
     4.6  	/* Testing
     4.7 -	*/	
     4.8  	cout << "startElement <"<< qPrintable(eName)
     4.9  		<<">  state="<<state 
    4.10  		<<"  laststate="<<stateStack.last()
    4.11  		<<"   loadMode="<<loadMode
    4.12  	//	<<"       line="<<QXmlDefaultHandler::lineNumber()
    4.13  		<<endl;
    4.14 +	*/	
    4.15  	stateStack.append (state);	
    4.16      if ( state == StateInit && (eName == "vymmap")  ) 
    4.17  	{
    4.18 @@ -121,9 +121,7 @@
    4.19  			// Really use the found mapcenter as MCO in a new map
    4.20  
    4.21  			model->createMapCenter(); 
    4.22 -			cout << "ok0\n";
    4.23  			lastBranch=model->getSelectedBranch();
    4.24 -			cout << "ok1 lastBranch="<<lastBranch<<endl;
    4.25  		} else
    4.26  		{
    4.27  			// Treat the found mapcenter as a branch