diff -r 040f32294895 -r 497f19b3c1fe mapeditor.cpp --- a/mapeditor.cpp Wed Oct 24 14:41:34 2007 +0000 +++ b/mapeditor.cpp Tue Nov 06 13:54:41 2007 +0000 @@ -1315,6 +1315,19 @@ setFrameType (s); } ///////////////////////////////////////////////////////////////////// + } else if (com=="sortChildren") + { + if (xelection.isEmpty() ) + { + parser.setError (Aborted,"Nothing selected"); + } else if (! selb ) + { + parser.setError (Aborted,"Type of selection is not a branch"); + } else if (parser.checkParCount(0)) + { + sortChildren(); + } + ///////////////////////////////////////////////////////////////////// } else if (com=="toggleFlag") { if (xelection.isEmpty() ) @@ -2337,8 +2350,8 @@ { if(bo->countBranches()>1) { + saveStateChangingPart(bo,bo, "sortChildren ()",QString("Sort children of %1").arg(getName(bo))); bo->sortChildren(); - saveStateChangingPart(bo,bo, "sortChildren ()",QString("Sort children of %1").arg(getName(bo))); mapCenter->reposition(); ensureSelectionVisible(); }