1.1 --- a/mapeditor.cpp Wed Oct 24 14:41:34 2007 +0000
1.2 +++ b/mapeditor.cpp Tue Nov 06 13:54:41 2007 +0000
1.3 @@ -1315,6 +1315,19 @@
1.4 setFrameType (s);
1.5 }
1.6 /////////////////////////////////////////////////////////////////////
1.7 + } else if (com=="sortChildren")
1.8 + {
1.9 + if (xelection.isEmpty() )
1.10 + {
1.11 + parser.setError (Aborted,"Nothing selected");
1.12 + } else if (! selb )
1.13 + {
1.14 + parser.setError (Aborted,"Type of selection is not a branch");
1.15 + } else if (parser.checkParCount(0))
1.16 + {
1.17 + sortChildren();
1.18 + }
1.19 + /////////////////////////////////////////////////////////////////////
1.20 } else if (com=="toggleFlag")
1.21 {
1.22 if (xelection.isEmpty() )
1.23 @@ -2337,8 +2350,8 @@
1.24 {
1.25 if(bo->countBranches()>1)
1.26 {
1.27 + saveStateChangingPart(bo,bo, "sortChildren ()",QString("Sort children of %1").arg(getName(bo)));
1.28 bo->sortChildren();
1.29 - saveStateChangingPart(bo,bo, "sortChildren ()",QString("Sort children of %1").arg(getName(bo)));
1.30 mapCenter->reposition();
1.31 ensureSelectionVisible();
1.32 }