##// END OF EJS Templates
Discard an added event remove it now.
perrinel -
r1354:2fbafc860af0
parent child
Show More
@@ -190,6 +190,7 void CatalogueController::addEvent(std::shared_ptr<DBEvent> event)
190 impl->m_CatalogueDao.updateEvent(eventTemp);
190 impl->m_CatalogueDao.updateEvent(eventTemp);
191 }
191 }
192
192
193
193 // update event parameter
194 // update event parameter
194 auto uniqIdPredicate = std::make_shared<ComparaisonPredicate>(
195 auto uniqIdPredicate = std::make_shared<ComparaisonPredicate>(
195 QString{"uniqId"}, event->getUniqId(), ComparaisonOperation::EQUALEQUAL);
196 QString{"uniqId"}, event->getUniqId(), ComparaisonOperation::EQUALEQUAL);
@@ -202,11 +203,9 void CatalogueController::addEvent(std::shared_ptr<DBEvent> event)
202 workPred->AddRequestPredicate(uniqIdPredicate);
203 workPred->AddRequestPredicate(uniqIdPredicate);
203 workPred->AddRequestPredicate(workRepositoryPredicate);
204 workPred->AddRequestPredicate(workRepositoryPredicate);
204
205
206
205 auto workEvent = impl->m_CatalogueDao.getEvent(workPred);
207 auto workEvent = impl->m_CatalogueDao.getEvent(workPred);
206 *event = workEvent;
208 *event = workEvent;
207
208 auto uniqueId = impl->eventUniqueKey(event);
209 impl->m_EventKeysWithChanges.insert(uniqueId);
210 }
209 }
211
210
212 void CatalogueController::saveEvent(std::shared_ptr<DBEvent> event)
211 void CatalogueController::saveEvent(std::shared_ptr<DBEvent> event)
General Comments 0
You need to be logged in to leave comments. Login now