X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Fcommon%2Ftimers.cpp;h=4ba3e94874008a724e97654d3bc67343a50ca534;hp=88bbb3e2501a64bd5af2d82bf219d39db7aae325;hb=2c8998278759b5bf6fc3bcf75afd289c214b6c84;hpb=d042c124580649327968a6950ef8e6f0ca2be399 diff --git a/source/common/timers.cpp b/source/common/timers.cpp index 88bbb3e..4ba3e94 100644 --- a/source/common/timers.cpp +++ b/source/common/timers.cpp @@ -297,7 +297,7 @@ void wxActListProcTimer::Notify(){ ueventdata->ItemLabel = _("Stopped"); wxPostEvent(static_cast(ActMgrPtr), uevent); - iter->second = 5; + iter->second = 6; } else if (iter->second == 4){ @@ -309,6 +309,17 @@ void wxActListProcTimer::Notify(){ } + // Delete the connection object if finished. + + if (iter->second > 4){ + + std::map::iterator ConnObjectIter = ActListConnObjectsPtr->find(iter->first); + + delete ConnObjectIter->second; + ConnObjectIter->second = nullptr; + + } + // Insert a finish date. wxDateTime adt; @@ -345,7 +356,7 @@ void wxActListProcTimer::SetupPointers(std::map *ActList, std::map *ActListDetail, bool *TasksActive, wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress, void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer, - std::map *ActListFinDT, std::map *ActListConn){ + std::map *ActListFinDT, std::map *ActListConnObjects){ // Setup the pointers for wxActListProcTimer. @@ -360,7 +371,7 @@ void wxActListProcTimer::SetupPointers(std::map *ActList, std::map