1.1 --- a/mapeditor.cpp Tue Oct 16 09:53:22 2007 +0000
1.2 +++ b/mapeditor.cpp Tue Oct 23 13:05:22 2007 +0000
1.3 @@ -2174,7 +2174,7 @@
1.4 void MapEditor::addMapInsertInt (const QString &path, int pos)
1.5 {
1.6 BranchObj *sel=xelection.getBranch();
1.7 - if (sel);
1.8 + if (sel)
1.9 {
1.10 QString pathDir=path.left(path.findRev("/"));
1.11 QDir d(pathDir);
1.12 @@ -2330,6 +2330,21 @@
1.13 }
1.14 }
1.15
1.16 +void MapEditor::sortChildren()
1.17 +{
1.18 + BranchObj* bo=xelection.getBranch();
1.19 + if (bo)
1.20 + {
1.21 + if(bo->countBranches()>1)
1.22 + {
1.23 + bo->sortChildren();
1.24 + saveStateChangingPart(bo,bo, "sortChildren ()",QString("Sort children of %1").arg(getName(bo)));
1.25 + mapCenter->reposition();
1.26 + ensureSelectionVisible();
1.27 + }
1.28 + }
1.29 +}
1.30 +
1.31 void MapEditor::linkTo(const QString &dstString)
1.32 {
1.33 FloatImageObj *fio=xelection.getFloatImage();