+ void sortChildren(){
+ LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
+ SALOME_ListIO selected;
+ if( aSel ) {
+ aSel->selectedObjects( selected );
+
+ if(selected.Extent()){
+ Handle(SALOME_InteractiveObject) anIObject = selected.First();
+ _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+ _PTR(SObject) aSObj = aStudy->FindObjectID(anIObject->getEntry());
+ if (aSObj) {
+ if ( aStudy->GetUseCaseBuilder()->SortChildren( aSObj, true/*AscendingOrder*/ ) ) {
+ SMESHGUI::GetSMESHGUI()->updateObjBrowser();
+ }
+ }
+ }
+ }
+ }
+