+ // if the history line is not in the end, move it to the end before save, otherwise
+ // problems with results restore and (the most important) naming problems will appear
+ // due to change evolution to SELECTION (problems in NamedShape and Name)
+ FeaturePtr aWasCurrent;
+ std::shared_ptr<Model_Session> aSession =
+ std::dynamic_pointer_cast<Model_Session>(Model_Session::get());
+ if (currentFeature(false) != lastFeature()) {
+ aSession->setCheckTransactions(false);
+ aWasCurrent = currentFeature(false);
+ setCurrentFeature(lastFeature(), false);
+ }