# HG changeset patch # User insilmaril # Date 1232624393 0 # Node ID 21f115d48daf53c473b171aa3b53a0344b2bbd65 # Parent 84ae10f6e3a3bb6069ce102e4642e885ab35ec34 More work on removing Selection class diff -r 84ae10f6e3a3 -r 21f115d48daf mapeditor.cpp --- a/mapeditor.cpp Tue Jan 20 15:23:16 2009 +0000 +++ b/mapeditor.cpp Thu Jan 22 11:39:53 2009 +0000 @@ -835,7 +835,7 @@ } } - if (model->selectionType() == Selection::Branch ) + if (model->selectionType() == TreeItem::Branch ) { // A branch was moved // save the position in case we link to mapcenter diff -r 84ae10f6e3a3 -r 21f115d48daf version.h --- a/version.h Tue Jan 20 15:23:16 2009 +0000 +++ b/version.h Thu Jan 22 11:39:53 2009 +0000 @@ -7,7 +7,7 @@ #define __VYM_VERSION "1.13.0" //#define __VYM_CODENAME "Codename: RC-1" #define __VYM_CODENAME "Codename: development version" -#define __VYM_BUILD_DATE "2009-01-20" +#define __VYM_BUILD_DATE "2009-01-22" bool checkVersion(const QString &); diff -r 84ae10f6e3a3 -r 21f115d48daf vymmodel.cpp --- a/vymmodel.cpp Tue Jan 20 15:23:16 2009 +0000 +++ b/vymmodel.cpp Thu Jan 22 11:39:53 2009 +0000 @@ -1499,12 +1499,13 @@ QString("Set heading of %1 to \"%2\"").arg(getObjectName(sel)).arg(s) ); sel->setHeading(s ); /* FIXME testing only - TreeItem *ti=getSelectedBranchItem(); + */ + TreeItem *ti=getSelectedTreeItem(); if (ti) { ti->setHeading (s); //FIXME VM ix is wrong ModelIndex below, ix2 is (hopefully) correct: - QModelIndex ix=index( ti->row(), ti->column(), index (0,0,QModelIndex()) ); + //QModelIndex ix=index( ti->row(), ti->column(), index (0,0,QModelIndex()) ); //FIXME VM testing only cout <<"VM::setHeading s="<<s.toStdString()<<" ti="<<ti<<" r,c=("<<ti->row()<<","<<ti->column()<<")"<<endl; QModelIndex ix2=index (ti); emit (dataChanged ( ix2,ix2)); @@ -1516,7 +1517,6 @@ //cout <<" (r,c)=("<<ix2.row()<<","<<ix2.column()<<")"<<endl; - */ reposition(); selection.update(); ensureSelectionVisible(); @@ -4937,11 +4937,8 @@ // Mainbranch, return s= "bo:" + QString("%1").arg(((BranchObj*)lmo)->getNum()); else - { - cout << "VM::getSelectString lmo="<<lmo<<" d="<<lmo->getDepth()<<" s="<<s.toStdString()<<" h="<<((BranchObj*)lmo)->getHeading().toStdString()<<endl; // Branch, call myself recursively s= getSelectString(par) + ",bo:" + QString("%1").arg(((BranchObj*)lmo)->getNum()); - } } else { // MapCenter diff -r 84ae10f6e3a3 -r 21f115d48daf xml-vym.cpp --- a/xml-vym.cpp Tue Jan 20 15:23:16 2009 +0000 +++ b/xml-vym.cpp Thu Jan 22 11:39:53 2009 +0000 @@ -35,13 +35,13 @@ { QColor col; /* Testing - */ cout << "startElement <"<< qPrintable(eName) <<"> state="<<state <<" laststate="<<stateStack.last() <<" loadMode="<<loadMode // <<" line="<<QXmlDefaultHandler::lineNumber() <<endl; + */ stateStack.append (state); if ( state == StateInit && (eName == "vymmap") ) { @@ -121,9 +121,7 @@ // Really use the found mapcenter as MCO in a new map model->createMapCenter(); - cout << "ok0\n"; lastBranch=model->getSelectedBranch(); - cout << "ok1 lastBranch="<<lastBranch<<endl; } else { // Treat the found mapcenter as a branch