1.1 --- a/mapeditor.cpp Tue Aug 05 07:36:53 2008 +0000
1.2 +++ b/mapeditor.cpp Mon Oct 06 11:10:20 2008 +0000
1.3 @@ -267,7 +267,7 @@
1.4 QString("%1 (\"%2\")").arg(u).arg(f),
1.5 bo,
1.6 QString("%1 (\"%2\")").arg(r).arg(f),
1.7 - QString("Toggling standard flag \"%1\" of %2").arg(f).arg(getName(bo)));
1.8 + QString("Toggling standard flag \"%1\" of %2").arg(f).arg(model->getObjectName(bo)));
1.9 bo->toggleStandardFlag (f,mainWindow->useFlagGroups());
1.10 model->updateSelection();
1.11 }
1.12 @@ -652,7 +652,7 @@
1.13 "moveRel "+pold,
1.14 fio,
1.15 "moveRel "+pnow,
1.16 - QString("Move %1 to relative position %2").arg(getName(fio)).arg(pnow));
1.17 + QString("Move %1 to relative position %2").arg(model->getObjectName(fio)).arg(pnow));
1.18 fio->getParObj()->requestReposition();
1.19 model->reposition();
1.20
1.21 @@ -774,7 +774,7 @@
1.22 tmpXLink->setEnd ( ((BranchObj*)(dst)) );
1.23 tmpXLink->updateXLink();
1.24 tmpXLink->activate(); //FIXME savestate missing
1.25 - //model->saveStateComplete(QString("Activate xLink from %1 to %2").arg(getName(tmpXLink->getBegin())).arg(getName(tmpXLink->getEnd())) );
1.26 + //model->saveStateComplete(QString("Activate xLink from %1 to %2").arg(model->getObjectName(tmpXLink->getBegin())).arg(model->getObjectName(tmpXLink->getEnd())) );
1.27 } else
1.28 {
1.29 delete(tmpXLink);
1.30 @@ -797,7 +797,7 @@
1.31 "moveRel "+pold,
1.32 fo,
1.33 "moveRel "+pnow,
1.34 - QString("Move %1 to relative position %2").arg(getName(fo)).arg(pnow));
1.35 + QString("Move %1 to relative position %2").arg(model->getObjectName(fo)).arg(pnow));
1.36
1.37 fo->getParObj()->requestReposition();
1.38 model->reposition();
1.39 @@ -822,7 +822,7 @@
1.40 "move "+pold,
1.41 bo,
1.42 "move "+pnow,
1.43 - QString("Move mapcenter %1 to position %2").arg(getName(bo)).arg(pnow));
1.44 + QString("Move mapcenter %1 to position %2").arg(model->getObjectName(bo)).arg(pnow));
1.45 }
1.46 }
1.47
1.48 @@ -880,7 +880,7 @@
1.49 model->saveState (
1.50 postSelStr,undoCom,
1.51 preSelStr, redoCom,
1.52 - QString("Relink %1 to %2").arg(getName(bsel)).arg(getName(dst)) );
1.53 + QString("Relink %1 to %2").arg(model->getObjectName(bsel)).arg(model->getObjectName(dst)) );
1.54
1.55 model->reposition(); // not necessary if we undo temporary move below
1.56 } else
1.57 @@ -900,7 +900,7 @@
1.58 model->saveState(
1.59 model->getSelectString(lmosel), "moveRel "+qpointfToString(movingObj_orgRelPos),
1.60 preSelStr, "moveRel "+ps,
1.61 - QString("Move %1 to relative position %2").arg(getName(lmosel)).arg(ps));
1.62 + QString("Move %1 to relative position %2").arg(model->getObjectName(lmosel)).arg(ps));
1.63 }
1.64 }
1.65
1.66 @@ -1054,6 +1054,13 @@
1.67 }
1.68
1.69
1.70 -// FIXME the following are not needed...
1.71 -QString MapEditor::getName(const LinkableMapObj*) {return QString();}
1.72 +void MapEditor::setSelectionModel (QItemSelectionModel *sm)
1.73 +{
1.74 + selModel=sm;
1.75 +}
1.76
1.77 +QItemSelectionModel* MapEditor::selectionModel ()
1.78 +{
1.79 + return selModel;
1.80 +}
1.81 +