Minor fixes
authorinsilmaril
Wed, 10 Mar 2010 15:36:19 +0000
changeset 8340fad394bc330
parent 833 bfacef6f29c1
child 835 31841b366d5e
Minor fixes
findwidget.cpp
mainwindow.cpp
mapeditor.cpp
mapeditor.h
tex/vym.changelog
version.h
vymmodel.cpp
     1.1 --- a/findwidget.cpp	Tue Mar 09 13:09:05 2010 +0000
     1.2 +++ b/findwidget.cpp	Wed Mar 10 15:36:19 2010 +0000
     1.3 @@ -46,13 +46,17 @@
     1.4  
     1.5  	nextbutton = new QPushButton;
     1.6  	nextbutton->setText (tr("Next","Find widget"));
     1.7 -	nextbutton->setDefault (true);
     1.8 -	nextbutton->setShortcut (Qt::Key_Return);
     1.9  	connect ( nextbutton, SIGNAL( clicked() ), this, SLOT( nextPressed() ) );
    1.10  
    1.11 +	// QAction needed to only activate shortcut while FindWidget has focus
    1.12 +	QAction *a=new QAction (nextbutton->text(),this);
    1.13 +	a->setShortcut (Qt::Key_Return);
    1.14 +	a->setShortcutContext (Qt::WidgetWithChildrenShortcut);
    1.15 +	connect ( a, SIGNAL( triggered() ), this, SLOT( nextPressed() ) );
    1.16 +	addAction (a);
    1.17 +
    1.18  	showAllButton = new QPushButton;
    1.19  	showAllButton->setText (tr("Show all","Find widget"));
    1.20 -	//connect ( showAllButton, SIGNAL( clicked() ), this, SLOT( showAllPressed() ) );
    1.21  	connect ( showAllButton, SIGNAL( clicked() ), mainWindow, SLOT( editOpenFindWidget() ) );
    1.22  
    1.23  	row2Layout->addWidget (cancelbutton);
     2.1 --- a/mainwindow.cpp	Tue Mar 09 13:09:05 2010 +0000
     2.2 +++ b/mainwindow.cpp	Wed Mar 10 15:36:19 2010 +0000
     2.3 @@ -1921,11 +1921,12 @@
     2.4  	return NULL;	
     2.5  }
     2.6  
     2.7 -VymModel* Main::getModel(uint id) const	//FIXME-2 id not used
     2.8 +VymModel* Main::getModel(uint id) const	
     2.9  {
    2.10  	// Used in BugAgent
    2.11 -	if ( tabWidget->currentPage())
    2.12 -		return vymViews.at(tabWidget->currentIndex())->getModel();
    2.13 +	for (int i=0; i<vymViews.count();i++)
    2.14 +		if (vymViews.at(i)->getModel()->getID()==id)
    2.15 +			return vymViews.at(i)->getModel();
    2.16  	return NULL;	
    2.17  }
    2.18  
    2.19 @@ -3961,28 +3962,10 @@
    2.20  	if (!currentMapEditor()) return;
    2.21  	currentMapEditor()->testFunction1();
    2.22  */
    2.23 -/*
    2.24 -
    2.25 -	VymModel *m=currentModel();
    2.26 -	if (!m) return;
    2.27 -
    2.28 -	bool ok;
    2.29 -	QString text = QInputDialog::getText(
    2.30 -			"VYM", "Enter Filter:", QLineEdit::Normal,	// FIXME-3 no translation yet
    2.31 -			m->getSortFilter(), &ok, NULL);
    2.32 -	if ( ok) 
    2.33 -		// user entered something and pressed OK
    2.34 -		m->setSortFilter (text);
    2.35 -*/
    2.36  }
    2.37  
    2.38  void Main::testFunction2()
    2.39  {
    2.40 -	findResultWidget->setModel (currentModel());
    2.41 -	findResultWidget->addResult ("Test",currentModel()->getSelectedItem());
    2.42 -	
    2.43 -	return;
    2.44 -
    2.45  	if (!currentMapEditor()) return;
    2.46  	currentMapEditor()->testFunction2();
    2.47  }
     3.1 --- a/mapeditor.cpp	Tue Mar 09 13:09:05 2010 +0000
     3.2 +++ b/mapeditor.cpp	Wed Mar 10 15:36:19 2010 +0000
     3.3 @@ -1,7 +1,5 @@
     3.4  #include "mapeditor.h"
     3.5  
     3.6 -#include <iostream>	
     3.7 -
     3.8  #include <QObject>
     3.9  
    3.10  #include "branchitem.h"
    3.11 @@ -31,7 +29,7 @@
    3.12  ///////////////////////////////////////////////////////////////////////
    3.13  MapEditor::MapEditor( VymModel *vm) 
    3.14  {
    3.15 -	//cout << "Constructor ME "<<this<<endl;
    3.16 +	//qDebug() << "Constructor ME "<<this;
    3.17  	mapScene= new QGraphicsScene(NULL);
    3.18  	mapScene->setBackgroundBrush (QBrush(Qt::white, Qt::SolidPattern));
    3.19  
    3.20 @@ -162,7 +160,7 @@
    3.21  
    3.22  MapEditor::~MapEditor()
    3.23  {
    3.24 -	//cout <<"Destructor MapEditor for "<<model->getMapName().toStdString()<<endl;
    3.25 +	//qDebug() <<"Destructor MapEditor for "<<model->getMapName();
    3.26  	model->unregisterEditor(this);
    3.27  }
    3.28  
    3.29 @@ -425,8 +423,8 @@
    3.30  
    3.31  				if (rt.isNull()) rt=r1;
    3.32  				rt=addBBox (r1, rt);
    3.33 -				//FIXME-2 cout <<"ME: r1="<<r1<<"  "<<cur->getHeadingStd()<<endl;
    3.34 -				//cout <<"    rt="<<rt<<endl;
    3.35 +				//qDebug() <<"ME: r1="<<r1<<"  "<<cur->getHeadingStd();
    3.36 +				//qDebug() <<"    rt="<<rt;
    3.37  			}
    3.38  		}
    3.39  		model->nextBranch(cur,prev);
    3.40 @@ -472,7 +470,7 @@
    3.41  		mapCenter->calcBBoxSizeWithChilds();
    3.42  		QRectF totalBBox=mapCenter->getTotalBBox();
    3.43  		//QRectF mapRect=totalBBox;
    3.44 -		cout << "  map has =("<<totalBBox.x()<<","<<totalBBox.y()<<","<<totalBBox.width()<<","<<totalBBox.height()<<")\n";
    3.45 +		qDebug() << "  map has =("<<totalBBox.x()<<","<<totalBBox.y()<<","<<totalBBox.width()<<","<<totalBBox.height()<<")\n";
    3.46  	
    3.47  		mapRect.setRect (totalBBox.x(), totalBBox.y(), 
    3.48  			totalBBox.width(), totalBBox.height());
    3.49 @@ -488,7 +486,7 @@
    3.50  	{
    3.51  		setHideTmpMode (HideNone);
    3.52  	}	
    3.53 -	cout <<"  hidemode="<<hidemode<<endl;
    3.54 +	qDebug() <<"  hidemode="<<hidemode;
    3.55  */
    3.56  /*
    3.57  	// Toggle hidemode
    3.58 @@ -499,106 +497,8 @@
    3.59  */		
    3.60  }
    3.61  
    3.62 -TreeItem* MapEditor::findMapItem (QPointF p,TreeItem *exclude)
    3.63 +void MapEditor::autoLayout()
    3.64  {
    3.65 -	// Start with mapcenter, no images allowed at rootItem
    3.66 -	int i=0;
    3.67 -	BranchItem *bi=model->getRootItem()->getFirstBranch();
    3.68 -	TreeItem *found=NULL;
    3.69 -	while (bi)
    3.70 -	{
    3.71 -		found=bi->findMapItem (p, exclude);
    3.72 -		if (found) return found;
    3.73 -		i++;
    3.74 -		bi=model->getRootItem()->getBranchNum(i);
    3.75 -	}
    3.76 -	return NULL;
    3.77 -}
    3.78 -
    3.79 -AttributeTable* MapEditor::attributeTable()
    3.80 -{
    3.81 -	return attrTable;
    3.82 -}
    3.83 -
    3.84 -void MapEditor::testFunction1()
    3.85 -{
    3.86 -	cout << "ME::test1  selected TI="<<model->getSelectedItem()<<endl;
    3.87 -	model->setExportMode (true);
    3.88 -
    3.89 -	/*
    3.90 -	// Code copied from Qt sources
    3.91 -	QRectF rect=model->getSelectedBranchObj()->getBBox();
    3.92 -	int xmargin=50;
    3.93 -	int ymargin=50;
    3.94 -
    3.95 -    qreal width = viewport()->width();
    3.96 -    qreal height = viewport()->height();
    3.97 -    QRectF viewRect = matrix().mapRect(rect);
    3.98 -
    3.99 -    qreal left = horizontalScrollBar()->value();
   3.100 -    qreal right = left + width;
   3.101 -    qreal top = verticalScrollBar()->value();
   3.102 -    qreal bottom = top + height;
   3.103 -
   3.104 -    if (viewRect.left() <= left + xmargin) {
   3.105 -        // need to scroll from the left
   3.106 -  //      if (!d->leftIndent)
   3.107 -            horizontalScrollBar()->setValue(int(viewRect.left() - xmargin - 0.5));
   3.108 -    }
   3.109 -    if (viewRect.right() >= right - xmargin) {
   3.110 -        // need to scroll from the right
   3.111 -//        if (!d->leftIndent)
   3.112 -            horizontalScrollBar()->setValue(int(viewRect.right() - width + xmargin + 0.5));
   3.113 -    }
   3.114 -    if (viewRect.top() <= top + ymargin) {
   3.115 -        // need to scroll from the top
   3.116 -   //     if (!d->topIndent)
   3.117 -            verticalScrollBar()->setValue(int(viewRect.top() - ymargin - 0.5));
   3.118 -    }
   3.119 -    if (viewRect.bottom() >= bottom - ymargin) {
   3.120 -        // need to scroll from the bottom
   3.121 -//        if (!d->topIndent)
   3.122 -            verticalScrollBar()->setValue(int(viewRect.bottom() - height + ymargin + 0.5));
   3.123 -    }
   3.124 -	cout << "test1:  hor="<<horizontalScrollBar()->value()<<endl;
   3.125 -	cout << "test1:  ver="<<verticalScrollBar()->value()<<endl;
   3.126 -}
   3.127 -
   3.128 -*/
   3.129 -/*
   3.130 -	 QtPropertyAnimation *animation=new QtPropertyAnimation(this, "sceneRect");
   3.131 -	 animation->setDuration(5000);
   3.132 -	 //animation->setEasingCurve ( QtEasingCurve::OutElastic);
   3.133 -	 animation->setEasingCurve ( QtEasingCurve::OutQuint);
   3.134 -	 animation->setStartValue(sceneRect() );
   3.135 -	 animation->setEndValue(QRectF(50, 50, 1000, 1000));
   3.136 -
   3.137 -	 animation->start();
   3.138 -*/	 
   3.139 -/*
   3.140 -	QDialog *dia= new QDialog (this);
   3.141 -	dia->setGeometry (50,50,10,10);
   3.142 -
   3.143 -     dia->show();
   3.144 -     dia ->raise();
   3.145 -
   3.146 -	 QtPropertyAnimation *animation=new QtPropertyAnimation(dia, "geometry");
   3.147 -	 animation->setDuration(1000);
   3.148 -	 //animation->setEasingCurve ( QtEasingCurve::OutElastic);
   3.149 -	 animation->setEasingCurve ( QtEasingCurve::OutQuint);
   3.150 -	 animation->setStartValue(QRect(50, 50, 10, 10));
   3.151 -	 animation->setEndValue(QRect(250, 250, 100, 100));
   3.152 -
   3.153 -	 animation->start();
   3.154 - */
   3.155 -
   3.156 -}
   3.157 -	
   3.158 -void MapEditor::testFunction2()
   3.159 -{
   3.160 -	model->setExportMode (false);
   3.161 -	return;
   3.162 -
   3.163  	// Create list with all bounding polygons
   3.164  	QList <LinkableMapObj*> mapobjects;
   3.165  	QList <ConvexPolygon> polys; 
   3.166 @@ -659,19 +559,19 @@
   3.167  					if (polygonCollision (polys.at(i),polys.at(j), QPointF(0,0)).intersect )
   3.168  					{
   3.169  						collisions++;
   3.170 -						//cout << "Collision: "<<headings[i].toStdString()<<" - "<<headings[j].toStdString()<<endl;
   3.171 +						//qDebug() << "Collision: "<<headings[i]<<" - "<<headings[j];
   3.172  						v=polys.at(j).centroid()-polys.at(i).centroid();
   3.173  						// Move also away if centroids are identical
   3.174  						if (v.isNull()) 
   3.175  						{
   3.176 -							//cout << "v==0="<<polys[i].centroid()<<polys[j].centroid()<<" "<<v<<endl;
   3.177 +							//qDebug() << "v==0="<<polys[i].centroid()<<polys[j].centroid()<<" "<<v;
   3.178  							v.setX (rand()%200 -100);
   3.179  							v.setY (rand()%200 -100);
   3.180 -							//cout << v;
   3.181 +							//qDebug() << v;
   3.182  						}
   3.183  						v.normalize();
   3.184  						v.scale (2);
   3.185 -						//cout <<  "  v="<<v<<endl;
   3.186 +						//qDebug() <<  "  v="<<v;
   3.187  						vectors[j]=v;
   3.188  						vectors[i]=v;
   3.189  						vectors[i].invert();
   3.190 @@ -680,10 +580,10 @@
   3.191  			}
   3.192  			for (int i=0;i<vectors.size();i++)
   3.193  			{
   3.194 -				//cout << " v="<<vectors[i]<<" "<<headings[i].toStdString()<<endl;
   3.195 +				//qDebug() << " v="<<vectors[i]<<" "<<headings[i];
   3.196  				polys[i].translate (vectors[i]);
   3.197  			}
   3.198 -			cout << "Collisions: "<<collisions<<endl;
   3.199 +			if (debug) qDebug()<< "Collisions: "<<collisions;
   3.200  			//collisions=0;
   3.201  		}	
   3.202  
   3.203 @@ -693,9 +593,11 @@
   3.204  		{
   3.205  			Vector v=polys[i].at(0)-orgpos[i];
   3.206  			orients.append (mapobjects[i]->getOrientation());
   3.207 -			mapobjects[i]->moveBy(v.x(),v.y() );
   3.208 -			mapobjects[i]->setRelPos();
   3.209 +		//	mapobjects[i]->moveBy(v.x(),v.y() );
   3.210 +		//	mapobjects[i]->setRelPos();
   3.211 +			model->startAnimation ((BranchObj*)mapobjects[i], mapobjects[i]->getAbsPos(), mapobjects[i]->getAbsPos() + v);
   3.212  		}	
   3.213 +		/*
   3.214  		model->reposition();	
   3.215  		orientationChanged=false;
   3.216  		for (int i=0;i<polys.size();i++)
   3.217 @@ -704,14 +606,116 @@
   3.218  				orientationChanged=true;
   3.219  				break;
   3.220  			}
   3.221 -		cout << "Final: orientChanged="<<orientationChanged<<endl;
   3.222 +		*/
   3.223  		break;
   3.224 +
   3.225 +
   3.226  		//orientationChanged=false;
   3.227  	} // loop if orientation has changed
   3.228  
   3.229  	model->emitSelectionChanged();
   3.230  }
   3.231  
   3.232 +TreeItem* MapEditor::findMapItem (QPointF p,TreeItem *exclude)
   3.233 +{
   3.234 +	// Start with mapcenter, no images allowed at rootItem
   3.235 +	int i=0;
   3.236 +	BranchItem *bi=model->getRootItem()->getFirstBranch();
   3.237 +	TreeItem *found=NULL;
   3.238 +	while (bi)
   3.239 +	{
   3.240 +		found=bi->findMapItem (p, exclude);
   3.241 +		if (found) return found;
   3.242 +		i++;
   3.243 +		bi=model->getRootItem()->getBranchNum(i);
   3.244 +	}
   3.245 +	return NULL;
   3.246 +}
   3.247 +
   3.248 +AttributeTable* MapEditor::attributeTable()
   3.249 +{
   3.250 +	return attrTable;
   3.251 +}
   3.252 +
   3.253 +void MapEditor::testFunction1()
   3.254 +{
   3.255 +	qDebug()<< "ME::test1  selected TI="<<model->getSelectedItem();
   3.256 +	model->setExportMode (true);
   3.257 +
   3.258 +	/*
   3.259 +	// Code copied from Qt sources
   3.260 +	QRectF rect=model->getSelectedBranchObj()->getBBox();
   3.261 +	int xmargin=50;
   3.262 +	int ymargin=50;
   3.263 +
   3.264 +    qreal width = viewport()->width();
   3.265 +    qreal height = viewport()->height();
   3.266 +    QRectF viewRect = matrix().mapRect(rect);
   3.267 +
   3.268 +    qreal left = horizontalScrollBar()->value();
   3.269 +    qreal right = left + width;
   3.270 +    qreal top = verticalScrollBar()->value();
   3.271 +    qreal bottom = top + height;
   3.272 +
   3.273 +    if (viewRect.left() <= left + xmargin) {
   3.274 +        // need to scroll from the left
   3.275 +  //      if (!d->leftIndent)
   3.276 +            horizontalScrollBar()->setValue(int(viewRect.left() - xmargin - 0.5));
   3.277 +    }
   3.278 +    if (viewRect.right() >= right - xmargin) {
   3.279 +        // need to scroll from the right
   3.280 +//        if (!d->leftIndent)
   3.281 +            horizontalScrollBar()->setValue(int(viewRect.right() - width + xmargin + 0.5));
   3.282 +    }
   3.283 +    if (viewRect.top() <= top + ymargin) {
   3.284 +        // need to scroll from the top
   3.285 +   //     if (!d->topIndent)
   3.286 +            verticalScrollBar()->setValue(int(viewRect.top() - ymargin - 0.5));
   3.287 +    }
   3.288 +    if (viewRect.bottom() >= bottom - ymargin) {
   3.289 +        // need to scroll from the bottom
   3.290 +//        if (!d->topIndent)
   3.291 +            verticalScrollBar()->setValue(int(viewRect.bottom() - height + ymargin + 0.5));
   3.292 +    }
   3.293 +	qDebug() << "test1:  hor="<<horizontalScrollBar()->value();
   3.294 +	qDebug() << "test1:  ver="<<verticalScrollBar()->value();
   3.295 +}
   3.296 +
   3.297 +*/
   3.298 +/*
   3.299 +	 QtPropertyAnimation *animation=new QtPropertyAnimation(this, "sceneRect");
   3.300 +	 animation->setDuration(5000);
   3.301 +	 //animation->setEasingCurve ( QtEasingCurve::OutElastic);
   3.302 +	 animation->setEasingCurve ( QtEasingCurve::OutQuint);
   3.303 +	 animation->setStartValue(sceneRect() );
   3.304 +	 animation->setEndValue(QRectF(50, 50, 1000, 1000));
   3.305 +
   3.306 +	 animation->start();
   3.307 +*/	 
   3.308 +/*
   3.309 +	QDialog *dia= new QDialog (this);
   3.310 +	dia->setGeometry (50,50,10,10);
   3.311 +
   3.312 +     dia->show();
   3.313 +     dia ->raise();
   3.314 +
   3.315 +	 QtPropertyAnimation *animation=new QtPropertyAnimation(dia, "geometry");
   3.316 +	 animation->setDuration(1000);
   3.317 +	 //animation->setEasingCurve ( QtEasingCurve::OutElastic);
   3.318 +	 animation->setEasingCurve ( QtEasingCurve::OutQuint);
   3.319 +	 animation->setStartValue(QRect(50, 50, 10, 10));
   3.320 +	 animation->setEndValue(QRect(250, 250, 100, 100));
   3.321 +
   3.322 +	 animation->start();
   3.323 + */
   3.324 +
   3.325 +}
   3.326 +	
   3.327 +void MapEditor::testFunction2()
   3.328 +{
   3.329 +	autoLayout();
   3.330 +}
   3.331 +
   3.332  BranchItem* MapEditor::getBranchDirectAbove (BranchItem *bi)
   3.333  {
   3.334  	if (bi)
   3.335 @@ -1021,11 +1025,11 @@
   3.336  
   3.337  void MapEditor::mousePressEvent(QMouseEvent* e)
   3.338  {
   3.339 -//cout << "ME::mousePressed\n"; //FIXME-3
   3.340 +//qDebug() << "ME::mousePressed\n"; //FIXME-3
   3.341  	// Ignore right clicks, these will go to context menus
   3.342  	if (e->button() == Qt::RightButton )
   3.343  	{
   3.344 -		//cout << "  ME::ignoring right mouse event...\n";
   3.345 +		//qDebug() << "  ME::ignoring right mouse event...\n";
   3.346  		e->ignore();
   3.347  		return;
   3.348  	}
   3.349 @@ -1033,7 +1037,7 @@
   3.350  	//Ignore clicks while editing heading
   3.351  	if (model->isSelectionBlocked() ) 
   3.352  	{
   3.353 -		//cout << "  ME::ignoring other mouse event...\n";
   3.354 +		//qDebug() << "  ME::ignoring other mouse event...\n";
   3.355  		e->ignore();
   3.356  		return;
   3.357  	}
   3.358 @@ -1136,9 +1140,9 @@
   3.359      if (lmo) 
   3.360  	{	
   3.361  	/*
   3.362 -		cout << "ME::mouse pressed\n";
   3.363 -		cout << "  lmo="<<lmo<<endl;
   3.364 -		cout << "   ti="<<ti->getHeadingStd()<<endl;
   3.365 +		qDebug() << "ME::mouse pressed\n";
   3.366 +		qDebug() << "  lmo="<<lmo;
   3.367 +		qDebug() << "   ti="<<ti->getHeadingStd();
   3.368  	*/
   3.369  		// Select the clicked object
   3.370  
   3.371 @@ -1559,9 +1563,8 @@
   3.372  {
   3.373  	if (debug) 
   3.374  	{
   3.375 -		cout << "ME p="<<mapToScene (e->pos())<<"  scrollBarPos="<<getScrollBarPos();
   3.376 -		cout << "  min="<<QPointF(horizontalScrollBar()->minimum(),verticalScrollBar()->minimum());
   3.377 -		cout << endl;
   3.378 +		qDebug()<< "ME p="<<mapToScene (e->pos())<<"  scrollBarPos="<<getScrollBarPos() <<
   3.379 +		           "  min="<<QPointF(horizontalScrollBar()->minimum(),verticalScrollBar()->minimum());
   3.380  	}
   3.381  
   3.382  
   3.383 @@ -1617,30 +1620,30 @@
   3.384  		if (debug)
   3.385  		{
   3.386  			foreach (QString format,event->mimeData()->formats()) 
   3.387 -				cout << "MapEditor: Dropped format: "<<qPrintable (format)<<endl;
   3.388 +				qDebug()<< "MapEditor: Dropped format: "<<qPrintable (format);
   3.389  			foreach (QString url,event->mimeData()->urls())
   3.390 -				cout << "  URL:"<<url.toStdString()<<endl;
   3.391 +				qDebug()<< "  URL:"<<url;
   3.392  			//foreach (QString plain,event->mimeData()->text())
   3.393 -			//	cout << "   PLAIN:"<<plain.toStdString()<<endl;
   3.394 +			//	qDebug()<< "   PLAIN:"<<plain;
   3.395  			QByteArray ba=event->mimeData()->data("STRING");
   3.396  			
   3.397  			QString s;
   3.398  			s=ba;
   3.399 -			cout << "  STRING:" <<s.toStdString()<<endl;
   3.400 +			qDebug() << "  STRING:" <<s;
   3.401  
   3.402  			ba=event->mimeData()->data("TEXT");
   3.403  			s=ba;
   3.404 -			cout << "    TEXT:" <<s.toStdString()<<endl;
   3.405 +			qDebug() << "    TEXT:" <<s;
   3.406  
   3.407  			ba=event->mimeData()->data("COMPOUND_TEXT");
   3.408  			s=ba;
   3.409 -			cout << "   CTEXT:" <<s.toStdString()<<endl;
   3.410 +			qDebug() << "   CTEXT:" <<s;
   3.411  
   3.412  			ba=event->mimeData()->data("text/x-moz-url");
   3.413  			s=ba;
   3.414 -			cout << "   x-moz-url:" <<s.toStdString()<<endl;
   3.415 +			qDebug() << "   x-moz-url:" <<s;
   3.416  			foreach (char b,ba)
   3.417 -				if (b!=0) cout << "b="<<b<<endl;
   3.418 +				if (b!=0) qDebug() << "b="<<b;
   3.419  		}
   3.420  
   3.421  		if (event->mimeData()->hasImage()) 
   3.422 @@ -1825,15 +1828,15 @@
   3.423  	TreeItem *ti= static_cast<TreeItem*>(sel.internalPointer());
   3.424  
   3.425  /* testing
   3.426 -	cout << "ME::updateData\n";
   3.427 +	qDebug() << "ME::updateData\n";
   3.428  
   3.429 -	cout << "  ti="<<ti<<endl;
   3.430 -	cout << "  h="<<ti->getHeading().toStdString()<<endl;
   3.431 +	qDebug() << "  ti="<<ti;
   3.432 +	qDebug() << "  h="<<ti->getHeading();
   3.433  	*/
   3.434  	
   3.435  	if (ti->isBranchLikeType())
   3.436  	{
   3.437 -	//	cout << "  ->updating...\n";
   3.438 +	//	qDebug() << "  ->updating...\n";
   3.439  		BranchObj *bo=(BranchObj*) ( ((MapItem*)ti)->getLMO());
   3.440  		bo->updateData();
   3.441  	}
     4.1 --- a/mapeditor.h	Tue Mar 09 13:09:05 2010 +0000
     4.2 +++ b/mapeditor.h	Wed Mar 10 15:36:19 2010 +0000
     4.3 @@ -56,6 +56,7 @@
     4.4  	void setAntiAlias (bool);	//!< Set or unset antialiasing
     4.5  	void setSmoothPixmap(bool); //!< Set or unset smoothing of pixmaps
     4.6  	void setHideTmp (bool);		//!< Hide parts temporary
     4.7 +	void autoLayout();			//!< Auto layout of map by using collision detection
     4.8  public:
     4.9  	TreeItem *findMapItem (QPointF p,TreeItem *exclude);	//! find item in map at position p. Ignore item exclude 
    4.10  
     5.1 --- a/tex/vym.changelog	Tue Mar 09 13:09:05 2010 +0000
     5.2 +++ b/tex/vym.changelog	Wed Mar 10 15:36:19 2010 +0000
     5.3 @@ -1,3 +1,9 @@
     5.4 +-------------------------------------------------------------------
     5.5 +Wed Mar 10 16:35:23 CET 2010 - vym@insilmaril.de
     5.6 +
     5.7 +- Bugfix: MainWindow::getModel() returns correct model now
     5.8 +- Bugfix: Better focus handling in FindWidget
     5.9 +
    5.10  -------------------------------------------------------------------
    5.11  Tue Mar  9 14:04:10 CET 2010 - vym@insilmaril.de
    5.12  
     6.1 --- a/version.h	Tue Mar 09 13:09:05 2010 +0000
     6.2 +++ b/version.h	Wed Mar 10 15:36:19 2010 +0000
     6.3 @@ -7,7 +7,7 @@
     6.4  #define __VYM_VERSION "1.13.0"
     6.5  //#define __VYM_CODENAME "Codename: RC-1"
     6.6  #define __VYM_CODENAME "Codename: development version, not for production!"
     6.7 -#define __VYM_BUILD_DATE "2010-03-09"
     6.8 +#define __VYM_BUILD_DATE "2010-03-10"
     6.9  
    6.10  
    6.11  bool checkVersion(const QString &);
     7.1 --- a/vymmodel.cpp	Tue Mar 09 13:09:05 2010 +0000
     7.2 +++ b/vymmodel.cpp	Wed Mar 10 15:36:19 2010 +0000
     7.3 @@ -1562,6 +1562,7 @@
     7.4  	}
     7.5  	selti->setNote(s);
     7.6  	emitNoteHasChanged(selti);
     7.7 +	emitDataHasChanged(selti);
     7.8  }
     7.9  
    7.10  QString VymModel::getNote()
    7.11 @@ -1660,8 +1661,7 @@
    7.12  		{
    7.13  			i=cur->getNote().indexOf (s,i,cs);
    7.14  			if (i>=0) i++;
    7.15 -			qDebug()<<"i="<<i;
    7.16 -
    7.17 +			//qDebug()<<"i="<<i;
    7.18  		} 
    7.19  		nextBranch(cur,prev);
    7.20  	}
    7.21 @@ -4761,7 +4761,8 @@
    7.22  		ap.setTicks (animationTicks);
    7.23  		ap.setAnimated (true);
    7.24  		bo->setAnimation (ap);
    7.25 -		animObjList.append( bo );
    7.26 +		if (!animObjList.contains(bo))
    7.27 +			animObjList.append( bo );
    7.28  		animationTimer->setSingleShot (true);
    7.29  		animationTimer->start(animationInterval);
    7.30  	}