Salome HOME
Fix for the issue #577
[modules/shaper.git] / src / Model / Model_Objects.cpp
index 5d27392b94eee04a3880e2398d97907f43a33870..1361a931a49baca81ba39b0b83ee3ac10d237a62 100644 (file)
@@ -339,10 +339,9 @@ ObjectPtr Model_Objects::object(TDF_Label theLabel)
 
 ObjectPtr Model_Objects::object(const std::string& theGroupID, const int theIndex)
 {
-  createHistory(theGroupID);
-  //TODO: mpv stabilization hotfix
-  if (myHistory[theGroupID].size() <= (const unsigned int)theIndex)
+  if (theIndex == -1)
     return ObjectPtr();
+  createHistory(theGroupID);
   return myHistory[theGroupID][theIndex];
 }