1.1 --- a/mapeditor.cpp Tue Jan 15 13:06:59 2008 +0000
1.2 +++ b/mapeditor.cpp Tue Jan 15 13:06:59 2008 +0000
1.3 @@ -2685,18 +2685,13 @@
1.4
1.5 bool MapEditor::select (const QString &s)
1.6 {
1.7 - LinkableMapObj *lmo=model->findObjBySelect(s);
1.8 -
1.9 - // Finally select the found object
1.10 - if (lmo)
1.11 + if (xelection.select(s))
1.12 {
1.13 - xelection.unselect();
1.14 - xelection.select(lmo);
1.15 xelection.update();
1.16 ensureSelectionVisible();
1.17 sendSelection ();
1.18 return true;
1.19 - }
1.20 + }
1.21 return false;
1.22 }
1.23
1.24 @@ -4258,9 +4253,8 @@
1.25 void MapEditor::testFunction2()
1.26 {
1.27
1.28 - cout << "Selection (org): "<<xelection.getSelectString().ascii()<<endl;
1.29 - cout << "Selection (model): "<<model->getSelectString(xelection.getBranch()).ascii()<<endl;
1.30 -// model->addMapCenter();
1.31 + xelection.select (model->addMapCenter());
1.32 + ensureSelectionVisible();
1.33
1.34 /*
1.35 // Toggle hidemode
1.36 @@ -4269,14 +4263,6 @@
1.37 else
1.38 setHideTmpMode (HideExport);
1.39 */
1.40 -/*
1.41 - LinkableMapObj *lmo=xelection.getBranch();
1.42 - if (lmo)
1.43 - {
1.44 - cout << "LMO::id="<<lmo->getID().ascii()<<endl;
1.45 - cout << " BO::id="<<((BranchObj*)lmo)->getID().ascii()<<endl;
1.46 - }
1.47 -*/
1.48 }
1.49
1.50 void MapEditor::contextMenuEvent ( QContextMenuEvent * e )