]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fixed method GetLoggedDeltas, now they are sorted by object's entries OB_SRN
authorsrn <srn@opencascade.com>
Mon, 1 Feb 2010 11:05:19 +0000 (11:05 +0000)
committersrn <srn@opencascade.com>
Mon, 1 Feb 2010 11:05:19 +0000 (11:05 +0000)
src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx

index 07f3d3b7f7357bdae1ce6c629a3932a1542c430b..aa5b02ab58e0a877eb8655e838ddd41fe0c29993 100644 (file)
@@ -42,6 +42,7 @@ using namespace std;
 #include "SALOMEDSImpl_IParameters.hxx"
 #include "SALOMEDSImpl_ScalarVariable.hxx"
 
+#include <algorithm>
 #include <fstream>
 
 #define DIRECTORYID       16661
@@ -1994,10 +1995,16 @@ vector< StudyDelta > SALOMEDSImpl_Study::GetLoggedDeltas()
 
   map<string, StudyDelta>::const_iterator p = _deltas.begin();
 
+  vector<string> entries(_deltas.size());
   for(size_t i = 0; p != _deltas.end(); i++, p++) {
-    aDeltas[i] = p->second;
+    entries[i] = p->first;
   } 
 
+  std::sort(entries.begin(), entries.end());
+  for(size_t i = 0, aSize = entries.size(); i<aSize; i++) {
+    aDeltas[i] = _deltas[entries[i]];
+  }
+
   _deltas.clear();
 
   return aDeltas;